Skip to content

Commit 815ebb2

Browse files
authored
Merge branch 'main' into recipe/async_policy_sglang
2 parents c9e7d09 + 51f3190 commit 815ebb2

File tree

298 files changed

+19156
-8635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+19156
-8635
lines changed

.github/workflows/e2e_ascend.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,11 @@ jobs:
6868
test:
6969
if: github.repository_owner == 'volcengine'
7070
name: verl Ascend test (self-host)
71-
runs-on: [self-hosted, npu-0]
71+
runs-on: linux-aarch64-a2-8
7272
timeout-minutes: 60 # Increase this timeout value as needed
7373
container:
74-
image: quay.io/ascend/verl:verl-8.3.rc1-910b-ubuntu22.04-py3.11-latest
75-
volumes:
76-
- /usr/local/dcmi:/usr/local/dcmi
77-
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
78-
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
79-
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
80-
- /etc/ascend_install.info:/etc/ascend_install.info
81-
- /data00/dataset:/github/home/dataset
82-
- /data00/models:/github/home/models
83-
# Use self-host cache speed up pip and model download
84-
# - /home/action/actions-runner/_work/cache:/github/home/.cache/
74+
image: swr.ap-southeast-1.myhuaweicloud.com/base_image/ascend-ci/verl/verl:verl-8.3.rc1-910b-ubuntu22.04-py3.11-latest
8575
options: >-
86-
--device /dev/davinci0
87-
--device /dev/davinci_manager
88-
--device /dev/devmm_svm
89-
--device /dev/hisi_hdc
90-
--network host
91-
--privileged
9276
--shm-size 16g
9377
env:
9478
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
@@ -101,6 +85,9 @@ jobs:
10185
run: |
10286
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
10387
npu-smi info
88+
- name: Check initial pip list from image
89+
run: |
90+
pip list
10491
- name: Checkout volcengine/verl repo
10592
uses: actions/checkout@v4
10693
with:
@@ -110,12 +97,15 @@ jobs:
11097
run: |
11198
pip install -r requirements-npu.txt
11299
pip install -e .
100+
- name: Check final pip list
101+
run: |
102+
pip list
113103
- name: Preprocess gsm8k dataset
114104
run: |
115-
python examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/dataset/openai/gsm8k
105+
python examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/.cache/datasets/openai/gsm8k
116106
- name: Preprocess geo3k dataset
117107
run: |
118-
python examples/data_preprocess/geo3k.py --local_dataset_path ${HOME}/dataset/hiyouga/geometry3k
108+
python examples/data_preprocess/geo3k.py --local_dataset_path ${HOME}/.cache/datasets/hiyouga/geometry3k
119109
- name: Running gsm8k e2e qwen3 training tests with PPO on ASCEND NPU
120110
run: |
121111
ray stop --force

.github/workflows/e2e_ppo_trainer_megatron_sglang_2.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -105,40 +105,6 @@ jobs:
105105
faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}"
106106
mlp-image: "${{ env.IMAGE }}"
107107

108-
e2e_ppo_trainer_megatron-moe-expert-parallel:
109-
needs: setup
110-
runs-on: ["${{ needs.setup.outputs.runner-label || 'L20x8' }}"]
111-
timeout-minutes: 60 # Increase this timeout value as needed
112-
env:
113-
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
114-
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
115-
NO_PROXY: "localhost,127.0.0.1,hf-mirror.com"
116-
HF_ENDPOINT: "https://hf-mirror.com"
117-
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
118-
steps:
119-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
120-
with:
121-
fetch-depth: 0
122-
- name: Install the current repository
123-
run: |
124-
pip3 install --no-deps -e .[test]
125-
- name: Prepare GSM8K dataset
126-
run: |
127-
python3 examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/models/hf_data/gsm8k
128-
- name: Running GSM8K E2E training tests with 3D parallelism on 8 L20 GPUs with Megatron (DeepSeek)
129-
run: |
130-
ray stop --force
131-
MEGATRON_CI_DISABLE_EXPANDABLE_SEGMENTS=1 \
132-
ADV_ESTIMATOR=grpo USE_DUMMY_MODEL=True DUMMY_MODEL_CONFIG_PATH=tests/special_e2e/ppo_trainer/expert_parallel/qwen2moe_minimal.json \
133-
PPO_MAX_TOKEN_LEN=512 FWD_MAX_TOKEN_LEN=512 \
134-
MAX_PROMPT_LENGTH=256 MAX_RESPONSE_LENGTH=256 \
135-
MODEL_ID=Qwen/Qwen1.5-MoE-A2.7B-Chat \
136-
ENGINE=sglang COMMON_PP=2 COMMON_VPP=null COMMON_CP=1 COMMON_TP=4 COMMON_EP=4 COMMON_ETP=1 INFER_TP=8 \
137-
USE_DIST_CKPT=True ALL_OFFLOAD=True SKIP_SAVE_HF_MODEL=1 bash tests/special_e2e/run_ppo_trainer_megatron.sh
138-
- name: clean up
139-
run: |
140-
rm -rf checkpoints
141-
142108
e2e_ppo_trainer_megatron-qwen2_5vl-3b:
143109
needs: setup
144110
runs-on: ["${{ needs.setup.outputs.runner-label || 'L20x8' }}"]
@@ -260,7 +226,6 @@ jobs:
260226
needs:
261227
[
262228
setup,
263-
e2e_ppo_trainer_megatron-moe-expert-parallel,
264229
e2e_ppo_trainer_megatron-qwen2_5vl-3b,
265230
e2e_ppo_trainer_sglang,
266231
e2e_ppo_trainer_sglang_vlm

.github/workflows/e2e_ppo_trainer_megatron_vllm.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ jobs:
122122
- name: Install the current repository
123123
run: |
124124
pip3 install --no-deps -e .[test]
125+
pip3 install mbridge
125126
pip3 install math-verify transformers==$TRANSFORMERS_VERSION
126127
- name: Prepare GSM8K dataset
127128
run: |
@@ -136,6 +137,25 @@ jobs:
136137
ray stop --force
137138
RESUME_MODE=auto MODEL_ID=deepseek-ai/deepseek-coder-1.3b-instruct TOTAL_TRAIN_STEPS=2 SAVE_FREQ=1 COMMON_PP=4 COMMON_VPP=null COMMON_CP=1 USE_MBRIDGE=True USE_DIST_CKPT=False \
138139
bash tests/special_e2e/run_ppo_trainer_megatron.sh
140+
- name: clean up and install Megatron-Bridge
141+
run: |
142+
rm -rf checkpoints
143+
pip3 install git+https://github.com/NVIDIA-NeMo/Megatron-Bridge.git@af21db0 --no-deps --no-build-isolation
144+
pip3 install git+https://github.com/NVIDIA/Megatron-LM.git@3cbe5c6 --no-deps --no-build-isolation
145+
pip3 install "nvidia-modelopt[torch]>=0.37.0" transformers==4.57.1
146+
- name: Running GSM8K E2E training tests with 3D parallelism on 8 L20 GPUs with Megatron, use Megatron-Bridge LoRA e2e to pre-load and save (Deepseek)
147+
run: |
148+
ray stop --force
149+
ALL_OFFLOAD=True SAVE_FREQ=1 MODEL_ID=deepseek-ai/deepseek-coder-1.3b-instruct COMMON_PP=4 LORA_RANK=8 COMMON_VPP=null COMMON_CP=1 USE_MBRIDGE=True VANILLA_MBRIDGE=False VALUE_VANILLA_MBRIDGE=False USE_DIST_CKPT=False \
150+
bash tests/special_e2e/run_ppo_trainer_megatron.sh
151+
- name: Running GSM8K E2E training tests with 3D parallelism on 8 L20 GPUs with Megatron, use Megatron-Bridge LoRA e2e to pre-load and save (Deepseek)
152+
run: |
153+
ray stop --force
154+
RESUME_MODE=auto MODEL_ID=deepseek-ai/deepseek-coder-1.3b-instruct TOTAL_TRAIN_STEPS=2 SAVE_FREQ=1 COMMON_PP=4 LORA_RANK=8 COMMON_VPP=null COMMON_CP=1 USE_MBRIDGE=True VANILLA_MBRIDGE=False VALUE_VANILLA_MBRIDGE=False USE_DIST_CKPT=False \
155+
bash tests/special_e2e/run_ppo_trainer_megatron.sh
156+
- name: clean up
157+
run: |
158+
rm -rf checkpoints
139159
- name: Running GSM8K E2E training tests with 3D parallelism on 8 L20 GPUs with Megatron (DeepSeek)
140160
run: |
141161
ray stop --force
@@ -294,4 +314,4 @@ jobs:
294314
with:
295315
mode: "destroy"
296316
faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}"
297-
mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}"
317+
mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}"

.github/workflows/e2e_ppo_trainer_megatron_vllm_2.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,23 +155,36 @@ jobs:
155155
- name: Install the current repository
156156
run: |
157157
pip3 install --no-deps -e .[test]
158-
pip3 install mbridge
159-
pip3 install transformers==$TRANSFORMERS_VERSION
158+
pip3 install git+https://github.com/NVIDIA-NeMo/Megatron-Bridge.git@af21db0 --no-deps --no-build-isolation
159+
pip3 install git+https://github.com/NVIDIA/Megatron-LM.git@3cbe5c6 --no-deps --no-build-isolation
160+
pip3 install "nvidia-modelopt[torch]>=0.37.0" transformers==4.57.1
160161
- name: Prepare GSM8K dataset
161162
run: |
162163
python3 examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/models/hf_data/gsm8k
163-
- name: Running GSM8K E2E training tests with 3D parallelism on 8 L20 GPUs with Megatron (DeepSeek)
164+
- name: Running GSM8K E2E training tests with 3D parallelism on 8 L20 GPUs with Megatron-Bridge (Qwen3-30B-A3B-Instruct-2507)
164165
run: |
165166
ray stop --force
166167
ADV_ESTIMATOR=grpo USE_DUMMY_MODEL=True DUMMY_MODEL_CONFIG_PATH=tests/special_e2e/ppo_trainer/expert_parallel/qwen2moe_minimal.json \
167168
PPO_MAX_TOKEN_LEN=1024 FWD_MAX_TOKEN_LEN=1024 \
168169
MAX_PROMPT_LENGTH=512 MAX_RESPONSE_LENGTH=512 \
169-
MODEL_ID=Qwen/Qwen1.5-MoE-A2.7B-Chat USE_MBRIDGE=True \
170+
MODEL_ID=Qwen/Qwen3-30B-A3B-Instruct-2507 USE_MBRIDGE=True VANILLA_MBRIDGE=False VALUE_VANILLA_MBRIDGE=False \
170171
COMMON_PP=2 COMMON_VPP=null COMMON_CP=1 COMMON_TP=4 COMMON_EP=4 COMMON_ETP=1 INFER_TP=8 \
171172
USE_DIST_CKPT=True ALL_OFFLOAD=True SKIP_SAVE_HF_MODEL=1 bash tests/special_e2e/run_ppo_trainer_megatron.sh
172173
- name: clean up
173174
run: |
174175
rm -rf checkpoints
176+
- name: Running GSM8K E2E training tests with 3D parallelism on 8 L20 GPUs with Megatron-Bridge LoRA (Qwen3-30B-A3B-Instruct-2507)
177+
run: |
178+
ray stop --force
179+
ADV_ESTIMATOR=grpo USE_DUMMY_MODEL=True DUMMY_MODEL_CONFIG_PATH=tests/special_e2e/ppo_trainer/expert_parallel/qwen2moe_minimal.json \
180+
PPO_MAX_TOKEN_LEN=1024 FWD_MAX_TOKEN_LEN=1024 \
181+
MAX_PROMPT_LENGTH=512 MAX_RESPONSE_LENGTH=512 LORA_RANK=8 CRITIC_LORA_RANK=8 \
182+
MODEL_ID=Qwen/Qwen3-30B-A3B-Instruct-2507 USE_MBRIDGE=True VANILLA_MBRIDGE=False VALUE_VANILLA_MBRIDGE=False \
183+
COMMON_PP=2 COMMON_VPP=null COMMON_CP=1 COMMON_TP=4 COMMON_EP=2 COMMON_ETP=1 INFER_TP=8 \
184+
USE_DIST_CKPT=False ALL_OFFLOAD=True SKIP_SAVE_HF_MODEL=1 bash tests/special_e2e/run_ppo_trainer_megatron.sh
185+
- name: clean up
186+
run: |
187+
rm -rf checkpoints
175188
e2e_ppo_trainer_megatron-qwen2_5vl-3b:
176189
needs: setup
177190
runs-on: ["${{ needs.setup.outputs.runner-label || 'L20x8' }}"]
@@ -405,7 +418,6 @@ jobs:
405418
[
406419
setup,
407420
e2e_ppo_trainer_megatron-deepseek-override-transformer-config,
408-
e2e_ppo_trainer_megatron-moe-expert-parallel,
409421
e2e_ppo_trainer_megatron-qwen2_5vl-3b,
410422
e2e_ppo_trainer_vllm,
411423
e2e_ppo_trainer_vllm_vlm
@@ -417,4 +429,4 @@ jobs:
417429
with:
418430
mode: "destroy"
419431
faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}"
420-
mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}"
432+
mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}"

.github/workflows/e2e_sft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
e2e_sft:
9292
needs: setup
9393
runs-on: ["${{ needs.setup.outputs.runner-label || 'L20x8' }}"]
94-
timeout-minutes: 25 # Increase this timeout value as needed
94+
timeout-minutes: 30 # Increase this timeout value as needed
9595
env:
9696
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
9797
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# # Tests layout
2+
3+
# Each folder under tests/ corresponds to a test category for a sub-namespace in verl. For instance:
4+
# - `tests/trainer` for testing functionality related to `verl/trainer`
5+
# - `tests/models` for testing functionality related to `verl/models`
6+
# - ...
7+
8+
# There are a few folders with `special_` prefix, created for special purposes:
9+
# - `special_distributed`: unit tests that must run with multiple GPUs
10+
# - `special_e2e`: end-to-end tests with training/generation scripts
11+
# - `special_npu`: tests for NPUs
12+
# - `special_sanity`: a suite of quick sanity tests
13+
# - `special_standalone`: a set of test that are designed to run in dedicated environments
14+
15+
# Accelerators for tests
16+
# - By default tests are run with GPU available, except for the ones under `special_npu`, and any test script whose name ends with `on_cpu.py`.
17+
# - For test scripts with `on_cpu.py` name suffix would be tested on CPU resources in linux environment.
18+
19+
# # Workflow layout
20+
21+
# All CI tests are configured by yaml files in `.github/workflows/`. Here's an overview of all test configs:
22+
# 1. A list of always triggered CPU sanity tests: `check-pr-title.yml`, `secrets_scan.yml`, `check-pr-title,yml`, `pre-commit.yml`, `doc.yml`
23+
# 2. Some heavy multi-GPU unit tests, such as `model.yml`, `vllm.yml`, `sgl.yml`
24+
# 3. End-to-end tests: `e2e_*.yml`
25+
# 4. Unit tests
26+
# - `cpu_unit_tests.yml`, run pytest on all scripts with file name pattern `tests/**/test_*_on_cpu.py`
27+
# - `gpu_unit_tests.yml`, run pytest on all scripts with file without the `on_cpu.py` suffix.
28+
# - Since cpu/gpu unit tests by default runs all tests under `tests`, please make sure tests are manually excluded in them when
29+
# - new workflow yaml is added to `.github/workflows`
30+
# - new tests are added to workflow mentioned in 2.
31+
32+
33+
name: e2e_transferqueue
34+
35+
on:
36+
# Trigger the workflow on push or pull request,
37+
# but only for the main branch
38+
# For push, for now only anti-patterns are specified so it is more conservative
39+
# and achieves higher coverage.
40+
push:
41+
branches:
42+
- main
43+
- v0.*
44+
paths:
45+
- "**/*.py"
46+
- "!**/*.md"
47+
- "!**/*.sh"
48+
# Other entrypoints
49+
- "!examples/*trainer*"
50+
- "!tests/**"
51+
- "!verl/trainer/main_*.py"
52+
- "!verl/trainer/fsdp_sft_trainer.py"
53+
- "!recipe/**"
54+
- "recipe/transfer_queue/**"
55+
pull_request:
56+
branches:
57+
- main
58+
- v0.*
59+
paths:
60+
- "**/*.py"
61+
- "!**/*.md"
62+
- "!**/*.sh"
63+
# Other entrypoints
64+
- "!examples/**"
65+
- "!tests/**"
66+
- "!verl/trainer/main_*.py"
67+
- "!verl/trainer/fsdp_sft_trainer.py"
68+
# Other recipes
69+
- "!recipe/**"
70+
# Home
71+
- "recipe/transfer_queue"
72+
# Entrypoints
73+
- ".github/workflows/e2e_transferqueue.yml"
74+
- "examples/data_preprocess/gsm8k.py"
75+
- "tests/special_e2e/run_transferqueue.sh"
76+
77+
# Cancel jobs on the same ref if a new one is triggered
78+
concurrency:
79+
group: ${{ github.workflow }}-${{ github.ref }}
80+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
81+
82+
# Declare permissions just read content.
83+
permissions:
84+
contents: read
85+
86+
env:
87+
IMAGE: "verl-ci-cn-beijing.cr.volces.com/verlai/verl:vllm011.dev7"
88+
DYNAMIC_RUNNER_ENDPOINT: "https://sd10g3clalm04ug7alq90.apigateway-cn-beijing.volceapi.com/runner"
89+
TRANSFORMERS_VERSION: "4.56.2"
90+
91+
jobs:
92+
setup:
93+
if: github.repository_owner == 'volcengine'
94+
runs-on: ubuntu-latest
95+
outputs:
96+
runner-label: ${{ steps.create-runner.outputs.runner-label }}
97+
mlp-task-id: ${{ steps.create-runner.outputs.mlp-task-id }}
98+
steps:
99+
- uses: actions/checkout@v4
100+
- id: create-runner
101+
uses: volcengine/vemlp-github-runner@v1
102+
with:
103+
mode: "create"
104+
faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}"
105+
mlp-image: "${{ env.IMAGE }}"
106+
107+
# Test FSDP strategy
108+
e2e_transferqueue_fsdp:
109+
needs: setup
110+
runs-on: [ "${{ needs.setup.outputs.runner-label || 'L20x8' }}" ]
111+
timeout-minutes: 10 # Increase timeout for async training
112+
env:
113+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
114+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
115+
NO_PROXY: "localhost,127.0.0.1,hf-mirror.com"
116+
HF_ENDPOINT: "https://hf-mirror.com"
117+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
118+
ACTOR_STRATEGY: "fsdp"
119+
steps:
120+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
121+
with:
122+
fetch-depth: 0
123+
- name: Install the current repository
124+
run: |
125+
pip3 install --no-deps -e .[test,gpu]
126+
pip3 install transformers==$TRANSFORMERS_VERSION
127+
pip3 install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple TransferQueue==0.1.2.dev0
128+
- name: Prepare GSM8K dataset
129+
run: |
130+
python3 examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/models/hf_data/gsm8k
131+
- name: Running the E2E test with TransferQueue (FSDP)
132+
run: |
133+
ray stop --force
134+
bash tests/special_e2e/run_transferqueue.sh
135+
136+
# Test Megatron strategy
137+
e2e_transferqueue_megatron:
138+
needs: setup
139+
runs-on: [ "${{ needs.setup.outputs.runner-label || 'L20x8' }}" ]
140+
timeout-minutes: 10 # Increase timeout for async training
141+
env:
142+
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
143+
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
144+
NO_PROXY: "localhost,127.0.0.1,hf-mirror.com"
145+
HF_ENDPOINT: "https://hf-mirror.com"
146+
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
147+
ACTOR_STRATEGY: "megatron"
148+
steps:
149+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
150+
with:
151+
fetch-depth: 0
152+
- name: Install the current repository
153+
run: |
154+
pip3 install --no-deps -e .[test,gpu]
155+
pip3 install transformers==$TRANSFORMERS_VERSION
156+
pip3 install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple TransferQueue==0.1.2.dev0
157+
- name: Prepare GSM8K dataset
158+
run: |
159+
python3 examples/data_preprocess/gsm8k.py --local_dataset_path ${HOME}/models/hf_data/gsm8k
160+
- name: Running the E2E test with TransferQueue (Megatron)
161+
run: |
162+
ray stop --force
163+
bash tests/special_e2e/run_transferqueue.sh
164+
165+
cleanup:
166+
runs-on: ubuntu-latest
167+
needs:
168+
[
169+
setup,
170+
e2e_transferqueue_fsdp,
171+
e2e_transferqueue_megatron
172+
]
173+
if: always()
174+
steps:
175+
- id: destroy-runner
176+
uses: volcengine/vemlp-github-runner@v1
177+
with:
178+
mode: "destroy"
179+
faas-url: "${{ env.DYNAMIC_RUNNER_ENDPOINT }}"
180+
mlp-task-id: "${{ needs.setup.outputs.mlp-task-id }}"

0 commit comments

Comments
 (0)