Skip to content

Commit e363d60

Browse files
authored
[misc] chore: rename huggingface-cli to hf to favor transformers v5 (verl-project#5145)
### What does this PR do? - As title ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as `[{modules}] {type}: {description}` (This will be checked by the CI) - `{modules}` include `fsdp`, `megatron`, `veomni`, `sglang`, `vllm`, `rollout`, `trainer`, `ci`, `training_utils`, `recipe`, `hardware`, `deployment`, `ray`, `worker`, `single_controller`, `misc`, `perf`, `model`, `algo`, `env`, `tool`, `ckpt`, `doc`, `data`, `cfg`, `reward` - If this PR involves multiple modules, separate them with `,` like `[megatron, fsdp, doc]` - `{type}` is in `feat`, `fix`, `refactor`, `chore`, `test` - If this PR breaks any API (CLI arguments, config, function signature, etc.), add `[BREAKING]` to the beginning of the title. - Example: `[BREAKING][fsdp, megatron] feat: dynamic batching` ### Test > For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc. ### API and Usage Example > Demonstrate how the API changes if any, and provide usage example(s) if possible. ```python # Add code snippet or script demonstrating how to use this ``` ### Design & Code Changes > Demonstrate the high-level design if this PR is complex, and list the specific changes. ### Checklist Before Submitting > [!IMPORTANT] > Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review. - [ ] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): `pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always` - [ ] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/volcengine/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the `ci-request` channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the `verl` Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the `recipe` submodule, please also update the reference to the submodule commit via `git submodule update --remote` or `cd recipe && git pull origin main`.
1 parent 15e28de commit e363d60

30 files changed

Lines changed: 41 additions & 38 deletions

.github/workflows/vllm.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,13 @@ jobs:
109109
run: |
110110
pip3 install -r requirements-test.txt
111111
pip3 install --no-deps -e .
112+
pip3 install --upgrade "transformers<5.0"
112113
# - name: Download Model to Use
113114
# run: |
114-
# huggingface-cli download Qwen/Qwen2.5-0.5B-Instruct --local-dir ${HOME}/models/Qwen/Qwen2.5-0.5B-Instruct
115-
# huggingface-cli download Qwen/Qwen2.5-1.5B-Instruct --local-dir ${HOME}/models/Qwen/Qwen2.5-1.5B-Instruct
116-
# huggingface-cli download Qwen/Qwen2.5-VL-3B-Instruct --local-dir ${HOME}/models/Qwen/Qwen2.5-VL-3B-Instruct
117-
# huggingface-cli download OldKingMeister/Qwen2.5-1.5B-Instruct-YaRN --local-dir ${HOME}/models/OldKingMeister/Qwen2.5-1.5B-Instruct-YaRN
115+
# hf download Qwen/Qwen2.5-0.5B-Instruct --local-dir ${HOME}/models/Qwen/Qwen2.5-0.5B-Instruct
116+
# hf download Qwen/Qwen2.5-1.5B-Instruct --local-dir ${HOME}/models/Qwen/Qwen2.5-1.5B-Instruct
117+
# hf download Qwen/Qwen2.5-VL-3B-Instruct --local-dir ${HOME}/models/Qwen/Qwen2.5-VL-3B-Instruct
118+
# hf download OldKingMeister/Qwen2.5-1.5B-Instruct-YaRN --local-dir ${HOME}/models/OldKingMeister/Qwen2.5-1.5B-Instruct-YaRN
118119
# export HF_HUB_OFFLINE=1
119120
- name: Prepare gsm8k dataset
120121
run: |
@@ -146,6 +147,7 @@ jobs:
146147
pip3 install cupy-cuda12x pytest-asyncio
147148
pip3 install -r requirements-test.txt
148149
pip3 install --no-deps -e .
150+
pip3 install --upgrade "transformers<5.0"
149151
- name: Test vLLM ServerAdapter with Checkpoint Engine (NCCL)
150152
run: |
151153
ROLLOUT_NAME=vllm pytest -svvv tests/checkpoint_engine/test_special_server_adapter.py

docs/algo/spin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The following steps outline how to set up the environment and run the SPIN recip
118118
python3 examples/data_preprocess/gsm8k.py --local_save_dir ~/data/gsm8k # Adjusted path
119119
120120
# Download the base model (Example: Qwen2.5-3B-Instruct)
121-
huggingface-cli download Qwen/Qwen2.5-3B-Instruct --local-dir $HOME/models/Qwen2.5-3B-Instruct
121+
hf download Qwen/Qwen2.5-3B-Instruct --local-dir $HOME/models/Qwen2.5-3B-Instruct
122122
```
123123

124124
4. **Configure:**

docs/algo/sppo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ python3 -m uv pip install -e ".[sglang]"
2222
export WANDB_API_KEY=<YOUR_WANDB_API_KEY>
2323
2424
python3 examples/data_preprocess/math_dataset.py --local_dir ~/data/math
25-
huggingface-cli download Qwen/Qwen2.5-7B-Instruct --local-dir $HOME/models/Qwen2.5-7B-Instruct
25+
hf download Qwen/Qwen2.5-7B-Instruct --local-dir $HOME/models/Qwen2.5-7B-Instruct
2626
2727
export CUDA_VISIBLE_DEVICES=0,1,2,3
2828
bash recipe/sppo/run_qwen2.5-7b_rm.sh

docs/ascend_tutorial/examples/ascend_sglang_best_practices.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ SGLang 是当前主流的高性能开源推理引擎, 昇腾已经全面原生
4848
.. code-block:: bash
4949
5050
export HF_ENDPOINT=https://hf-mirror.com
51-
huggingface-cli download --resume-download Qwen/Qwen3-30B-A3B --local-dir /path/to/local_dir
51+
hf download --resume-download Qwen/Qwen3-30B-A3B --local-dir /path/to/local_dir
5252
5353
**下载数据集**
5454

@@ -80,7 +80,7 @@ SGLang 是当前主流的高性能开源推理引擎, 昇腾已经全面原生
8080
.. code-block:: bash
8181
8282
export HF_ENDPOINT=https://hf-mirror.com
83-
huggingface-cli download --resume-download Qwen/Qwen2.5-32B --local-dir /path/to/local_dir
83+
hf download --resume-download Qwen/Qwen2.5-32B --local-dir /path/to/local_dir
8484
8585
**下载及处理数据集**
8686

docs/examples/gsm8k_example.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ There're three ways to prepare the model checkpoints for post-training:
5757

5858
.. code:: bash
5959
60-
huggingface-cli download deepseek-ai/deepseek-math-7b-instruct --local-dir ~/models/deepseek-math-7b-instruct --local-dir-use-symlinks False
60+
hf download deepseek-ai/deepseek-math-7b-instruct --local-dir ~/models/deepseek-math-7b-instruct --local-dir-use-symlinks False
6161
# or
6262
modelscope download --model deepseek-ai/deepseek-math-7b-instruct --local_dir ~/models/deepseek-math-7b-instruct
6363

docs/sglang_multiturn/multiturn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ This method works well for Qwen3 series. However, Qwen/QwQ-32B currently has a b
296296
.. code-block:: bash
297297
298298
pip install huggingface_hub
299-
huggingface-cli download Qwen/QwQ-32B --revision refs/pr/81
299+
hf download Qwen/QwQ-32B --revision refs/pr/81
300300
301301
.. _fix: https://huggingface.co/Qwen/QwQ-32B/discussions/81
302302

examples/grpo_trainer/run_deepseek671b_math_megatron_80gb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -x
33
# # 0. download HF checkpoint
44
# # remove the `quantization_config` in the `config.json`
55
# # set `num_nextn_predict_layers=0` to disable MTP, which is not currently supported
6-
# huggingface-cli download deepseek-ai/DeepSeek-V3-0324
6+
# hf download deepseek-ai/DeepSeek-V3-0324
77

88
# no offline dist checkpoint needed, now with mbridge>=0.13.0, we can directly init model from huggingface downloaded fp8 weights
99
# tested on docker://verlai/verl:app-verl0.5-transformers4.55.4-vllm0.10.0-mcore0.13.0-te2.2

examples/ppo_trainer/run_moonlight16b_a3b_gsm8k_megatron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export CUDA_DEVICE_MAX_CONNECTIONS=1 # For megatron communication/computation ov
44

55

66
# 0. download the model
7-
huggingface-cli download moonshotai/Moonlight-16B-A3B-Instruct
7+
hf download moonshotai/Moonlight-16B-A3B-Instruct
88

99
# 1. convert the model to mcore format
1010
# change the HF_MODEL_PATH and DIST_CKPT_PATH to your own path

examples/ppo_trainer/run_qwen1.5_moe_a2.7b-gsm8k_megatron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -x
33
export CUDA_DEVICE_MAX_CONNECTIONS=1 # For megatron communication/computation overlapping
44

55
# 0. download the model
6-
#huggingface-cli download Qwen/Qwen1.5-MoE-A2.7B-Chat
6+
#hf download Qwen/Qwen1.5-MoE-A2.7B-Chat
77

88
# 1. convert the model to mcore format
99
# change the HF_MODEL_PATH and DIST_CKPT_PATH to your own path

examples/ppo_trainer/run_qwen2-7b_rm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ test_files="['$gsm8k_test_path', '$math_test_path']"
1717

1818

1919
# prepare model ckpt
20-
huggingface-cli download Qwen/Qwen2-7B-Instruct --local-dir $HOME/models/Qwen2-7B-Instruct &
21-
huggingface-cli download sfairXC/FsfairX-LLaMA3-RM-v0.1 --local-dir $HOME/models/FsfairX-LLaMA3-RM-v0.1 &
20+
hf download Qwen/Qwen2-7B-Instruct --local-dir $HOME/models/Qwen2-7B-Instruct &
21+
hf download sfairXC/FsfairX-LLaMA3-RM-v0.1 --local-dir $HOME/models/FsfairX-LLaMA3-RM-v0.1 &
2222
wait
2323

2424
python3 -m verl.trainer.main_ppo \

0 commit comments

Comments
 (0)