Skip to content

Commit 4de247f

Browse files
zyzshishuiSwordFaithocss884zhaochenyang20eric-haibin-lin
authored
[sglang] refactor: Unify async rollout under SGLangRollout, and support sglang==0.4.6.post5 (#1717)
### Checklist Before Starting - [x] Search for similar PR(s). ### What does this PR do? - Unify the functionality of SGLangRollout and AsyncSGLangRollout, remove original SGLangRollout and rename AsyncSGLangRollout to SGLangRollout. - Make trivial changes due to modification in sglang==0.4.6.post5. ### High-Level Design > Demonstrate the high-level design if this PR is complex. ### Specific Changes > List the specific changes. ### API > Demonstrate how the API changes if any. ### Usage Example > Provide usage example(s) for easier usage. ```python # Add code snippet or script demonstrating how to use this ``` ### 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, evaluatuion results, etc. ### Additional Info. - **Issue Number**: Fixes issue # or discussion # if any. - **Training**: [Note which backend this PR will affect: FSDP, Megatron, both, or none] - **Inference**: [Note which backend this PR will affect: vLLM, SGLang, both, or none] ### Checklist Before Submitting - [ ] Read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide). - [ ] Apply [pre-commit checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting). - [ ] Add `[BREAKING]` to the PR title if it breaks any API. - [ ] Update the documentation about your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs). - [ ] Add CI test(s) if necessary. --------- Co-authored-by: zyzshishui <@qq.com> Co-authored-by: Xiang Long <[email protected]> Co-authored-by: ocss884 <[email protected]> Co-authored-by: zhaochenyang20 <[email protected]> Co-authored-by: H <[email protected]>
1 parent cef6361 commit 4de247f

37 files changed

+1117
-1658
lines changed

.github/workflows/e2e_ppo_trainer.yml

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ jobs:
204204
HF_ENDPOINT: "https://hf-mirror.com"
205205
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
206206
container:
207-
image: ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post4
207+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
208208
options: --gpus all --shm-size=10g
209209
steps:
210210
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -222,7 +222,7 @@ jobs:
222222
ray stop --force
223223
ENGINE=sglang bash tests/e2e/ppo_trainer/run_function_reward.sh
224224
225-
e2e_ppo_trainer_sglang_async:
225+
e2e_ppo_trainer_sglang_multiturn_with_tool:
226226
runs-on: [L20x8]
227227
needs: pre_commit_for_ppo
228228
timeout-minutes: 40 # Increase this timeout value as needed
@@ -233,36 +233,7 @@ jobs:
233233
HF_ENDPOINT: "https://hf-mirror.com"
234234
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
235235
container:
236-
image: ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post4
237-
options: --gpus all --shm-size=10g
238-
steps:
239-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
240-
with:
241-
fetch-depth: 0
242-
- name: Install the current repository
243-
run: |
244-
pip3 install -e .[test,gpu,sglang] --no-deps
245-
- name: Prepare gsm8k dataset
246-
run: |
247-
ray stop --force
248-
python3 examples/data_preprocess/gsm8k.py
249-
- name: Running GSM8K E2E training tests on 8 L20 GPUs with rmpad using function rm and save ckpt with sglang async
250-
run: |
251-
ray stop --force
252-
ENGINE=sglang_async bash tests/e2e/ppo_trainer/run_function_reward.sh
253-
254-
e2e_ppo_trainer_sglang_async_with_tool:
255-
runs-on: [L20x8]
256-
needs: pre_commit_for_ppo
257-
timeout-minutes: 40 # Increase this timeout value as needed
258-
env:
259-
HTTP_PROXY: ${{ secrets.PROXY_HTTP }}
260-
HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }}
261-
NO_PROXY: "localhost,127.0.0.1,hf-mirror.com"
262-
HF_ENDPOINT: "https://hf-mirror.com"
263-
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
264-
container:
265-
image: ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post4
236+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
266237
options: --gpus all --shm-size=10g
267238
steps:
268239
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -275,7 +246,7 @@ jobs:
275246
run: |
276247
ray stop --force
277248
python3 examples/data_preprocess/gsm8k_multiturn_w_tool.py --local_dir $HOME/data/gsm8k_verl_sgl_multi_turn_preprocessed
278-
- name: Running GSM8K with tool E2E training tests on 8 L20 GPUs with rmpad using function rm and save ckpt with sglang async
249+
- name: Running GSM8K with tool E2E training tests on 8 L20 GPUs with rmpad using function rm and save ckpt with sglang
279250
run: |
280251
ray stop --force
281252
bash tests/e2e/run_gsm8k_fsdp_sgl_multiturn_w_tool.sh
@@ -295,7 +266,7 @@ jobs:
295266
HF_ENDPOINT: "https://hf-mirror.com"
296267
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
297268
container:
298-
image: ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post4
269+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
299270
options: --gpus all --shm-size=50g # Visual dataloader requires large memory
300271
steps:
301272
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -367,7 +338,7 @@ jobs:
367338
HF_ENDPOINT: "https://hf-mirror.com"
368339
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
369340
container:
370-
image: ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post4
341+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
371342
options: --gpus all --shm-size=50g # Visual dataloader requires large memory
372343
steps:
373344
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/e2e_ppo_trainer_megatron.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
HF_ENDPOINT: "https://hf-mirror.com"
5151
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
5252
container:
53-
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
53+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
5454
options: --gpus all --shm-size=10g
5555
steps:
5656
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -92,7 +92,7 @@ jobs:
9292
HF_ENDPOINT: "https://hf-mirror.com"
9393
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
9494
container:
95-
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
95+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
9696
options: --gpus all --shm-size=10g
9797
steps:
9898
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -134,7 +134,7 @@ jobs:
134134
HF_ENDPOINT: "https://hf-mirror.com"
135135
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
136136
container:
137-
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
137+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
138138
options: --gpus all --shm-size=10g
139139
steps:
140140
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -167,7 +167,7 @@ jobs:
167167
HF_ENDPOINT: "https://hf-mirror.com"
168168
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
169169
container:
170-
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
170+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
171171
options: --gpus all --shm-size=10g
172172
steps:
173173
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -206,7 +206,7 @@ jobs:
206206
HF_ENDPOINT: "https://hf-mirror.com"
207207
HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable
208208
container:
209-
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3
209+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
210210
options: --gpus all --shm-size=10g
211211
steps:
212212
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/sgl.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
HF_HUB_ENABLE_HF_TRANSFER: 1
5757
SGL_DISABLE_TP_MEMORY_INBALANCE_CHECK: "True"
5858
container:
59-
image: ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post4
59+
image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3
6060
options: --gpus all --shm-size=10g
6161
steps:
6262
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -73,11 +73,7 @@ jobs:
7373
- name: Test the latest SGLang
7474
run: |
7575
cd tests/workers/rollout
76-
torchrun --nnodes=1 --nproc_per_node=4 $(which pytest) -s test_sglang_spmd.py
77-
- name: Test the latest SGLang async
78-
run: |
79-
cd tests/workers/rollout
80-
torchrun --nnodes=1 --nproc_per_node=2 $(which pytest) -s test_sglang_async_spmd.py
76+
torchrun --nnodes=1 --nproc_per_node=2 $(which pytest) -s test_sglang_spmd.py
8177
- name: Test the latest SGLang Rollout async with tool
8278
run: |
8379
cd tests/workers/rollout

docker/Dockerfile.rocm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Support - Traing: fsdp; Inference: vllm
77
# FROM rocm/vllm:rocm6.2_mi300_ubuntu20.04_py3.9_vllm_0.6.4
88
# Support - Traing: fsdp; Inference: vllm, sglang
9-
FROM lmsysorg/sglang:v0.4.6.post4-rocm630
9+
FROM lmsysorg/sglang:v0.4.6.post5-rocm630
1010

1111
# Set working directory
1212
# WORKDIR $PWD/app

docker/Dockerfile.sglang

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ RUN pip config set global.index-url "${PIP_INDEX}" && \
3636
pip config set global.extra-index-url "${PIP_INDEX}" && \
3737
python -m pip install --upgrade pip
3838

39-
# Install sglang-0.4.6.post4 and torch-memory-saver
40-
RUN pip install "sglang[all]==0.4.6.post4" --no-cache-dir --find-links https://flashinfer.ai/whl/cu124/torch2.6/flashinfer-python && pip install torch-memory-saver --no-cache-dir
39+
# Install sglang-0.4.6.post5 and torch-memory-saver
40+
RUN pip uninstall -y cuda-python && pip install "sglang[all]==0.4.6.post5" --no-cache-dir --find-links https://flashinfer.ai/whl/cu124/torch2.6/flashinfer-python && pip install torch-memory-saver --no-cache-dir
4141

4242
# Install torch-2.6.0
4343
RUN pip install --no-cache-dir torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 tensordict torchdata \

docker/Dockerfile.vllm.sglang.megatron

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ RUN aria2c --always-resume=true --max-tries=99999 https://developer.download.nvi
5656
update-alternatives --set cuda /usr/local/cuda-12.4 && \
5757
rm -rf /usr/local/cuda-12.6
5858

59-
# Install torch-2.6.0+cu124 + vllm-0.8.5.post1 + sglang-0.4.6.post4
59+
# Install torch-2.6.0+cu124 + vllm-0.8.5.post1 + sglang-0.4.6.post5
6060
# torch-2.6.0+cu124: cxx11abi=False
6161
# torch-2.6.0+cu126: cxx11abi=True
6262
# see https://github.com/flashinfer-ai/flashinfer/issues/911
6363
# Install sglang-0.4.6.post1 and torch-memory-saver
64-
RUN pip install "sglang[all]==0.4.6.post1" --no-cache-dir --find-links https://flashinfer.ai/whl/cu124/torch2.6/flashinfer-python && pip install torch-memory-saver --no-cache-dir
64+
RUN pip install "sglang[all]==0.4.6.post5" --no-cache-dir --find-links https://flashinfer.ai/whl/cu124/torch2.6/flashinfer-python && pip install torch-memory-saver --no-cache-dir
6565

6666
RUN pip install --no-cache-dir "vllm==0.8.5.post1" "torch==2.6.0" "torchvision==0.21.0" "torchaudio==2.6.0" "tensordict==0.6.2" torchdata
6767

docs/amd_tutorial/amd_build_dockerfile_page.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ docker/Dockerfile.rocm
2222
# Support - Traing: fsdp; Inference: vllm
2323
# FROM rocm/vllm:rocm6.2_mi300_ubuntu20.04_py3.9_vllm_0.6.4
2424
# Support - Traing: fsdp; Inference: vllm, sglang
25-
FROM lmsysorg/sglang:v0.4.6.post4-rocm630
25+
FROM lmsysorg/sglang:v0.4.6.post5-rocm630
2626
2727
# Set working directory
2828
# WORKDIR $PWD/app

docs/sglang_multiturn/multiturn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ To enable multi-turn rollout, make sure to configure the following fields in you
1111
actor_rollout_ref:
1212
rollout:
1313
multi_turn: True
14-
name: "sglang_async"
14+
name: "sglang"
1515
16-
These configuration activates the sglang_async engine for multi-turn interaction during rollout.
16+
These configuration activates the sglang engine for multi-turn interaction during rollout.
1717

1818
Custom Tool Configuration
1919
~~~~~~~~~~~~~~~~~~~~~~~~~

docs/start/install.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ For vLLM with Megatron or FSDP, please use the stable version of image ``whatcan
4242

4343
For latest vLLM with FSDP, please refer to ``hiyouga/verl:ngc-th2.6.0-cu126-vllm0.8.4-flashinfer0.2.2-cxx11abi0``.
4444

45-
For SGLang with FSDP, please use ``ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post4`` which is provided by SGLang RL Group.
45+
For SGLang with FSDP, please use ``ocss884/verl-sglang:ngc-th2.6.0-cu126-sglang0.4.6.post5`` which is provided by SGLang RL Group.
4646

4747
See files under ``docker/`` for NGC-based image or if you want to build your own.
4848

@@ -79,7 +79,7 @@ See files under ``docker/`` for NGC-based image or if you want to build your own
7979
- **Flash Attenttion**: 2.7.4.post1
8080
- **Flash Infer**: 0.2.2.post1
8181
- **vLLM**: 0.8.5
82-
- **SGLang**: 0.4.6.post4
82+
- **SGLang**: 0.4.6.post5
8383
- **Megatron-LM**: core_v0.12.0
8484
- **TransformerEngine**: 2.3
8585
- **Ray**: 2.44.1

docs/workers/sglang_worker.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Please always follow the following command to install SGLang with verl.
2121
.. code-block:: bash
2222
2323
pip install --upgrade pip
24-
# Currently 0.4.6.post4, subject to updates at any time, please refer to the latest version specified in `setup.py`
24+
# Currently 0.4.6.post5, subject to updates at any time, please refer to the latest version specified in `setup.py`
2525
pip install -e ".[sglang]"
2626
2727
You can check the following dependencies are in your environment:
@@ -31,8 +31,8 @@ You can check the following dependencies are in your environment:
3131
- **PyTorch**: 2.6.0+cu124
3232
- **CUDA**: 12.4
3333
- **flashinfer-python**: 0.2.5+cu124torch2.6
34-
- **sgLang**: 0.4.6.post4
35-
- **sgl-kernel**: 0.1.2.post1
34+
- **sgLang**: 0.4.6.post5
35+
- **sgl-kernel**: 0.1.4
3636

3737
Using SGLang as the Inference Backend for PPO Training on a Single Machine
3838
-------------------------------------------------------------------------
@@ -87,7 +87,7 @@ Why export SGL_DISABLE_TP_MEMORY_INBALANCE_CHECK?
8787

8888
1. ``verl`` initializes a ``SGLangRollout`` module during rollout, which is used to evaluate/generate samples.
8989

90-
2. ``SGLangRollout`` will initialize ``VerlEngine``, and further initialize a ``torch.distributed.DeviceMesh``, used to support Tensor Parallel (TP).
90+
2. ``SGLangRollout`` will initialize ``Engine``, and further initialize a ``torch.distributed.DeviceMesh``, used to support Tensor Parallel (TP).
9191

9292
3. ``DeviceMesh.init()`` internally checks the free GPU memory of all participating devices. If the difference is too large (more than ~10%), it directly reports an error to avoid initialization failures or deadlocks.
9393

@@ -111,7 +111,7 @@ Early workers already use up GPU memory → late workers still have empty memory
111111

112112
**3. SGLang's TP init uses "all-device broadcast", but there's no uniform release timing**
113113

114-
Although ``SGLangRollout`` may only involve subset of GPUs, its ``VerlEngine`` initialization calls ``torch.distributed.init_process_group()`` and broadcasts weights, so:
114+
Although ``SGLangRollout`` may only involve subset of GPUs, its ``Engine`` initialization calls ``torch.distributed.init_process_group()`` and broadcasts weights, so:
115115

116116
- Non-rollout GPUs also join the communication.
117117
- Later on, ``DeviceMesh`` init will fail due to "inconsistent memory".

examples/sglang_multiturn/config/gsm8k_multiturn_grpo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ data:
1515
actor_rollout_ref:
1616
hybrid_engine: True
1717
rollout:
18-
name: sglang_async
18+
name: sglang
1919
multi_turn:
2020
enable: True
2121
max_turns: 5

examples/sglang_multiturn/config/gsm8k_multiturn_megatron_grpo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ data:
1515
actor_rollout_ref:
1616
hybrid_engine: True
1717
rollout:
18-
name: sglang_async
18+
name: sglang
1919
multi_turn:
2020
enable: True
2121
max_turns: 5

examples/sglang_multiturn/run_qwen2.5-3b_gsm8k_multiturn.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ python3 -m verl.trainer.main_ppo \
3232
actor_rollout_ref.actor.fsdp_config.optimizer_offload=False \
3333
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=32 \
3434
actor_rollout_ref.rollout.tensor_model_parallel_size=2 \
35-
actor_rollout_ref.rollout.name=sglang_async \
35+
actor_rollout_ref.rollout.name=sglang \
3636
actor_rollout_ref.rollout.gpu_memory_utilization=0.5 \
3737
actor_rollout_ref.rollout.n=16 \
3838
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=32 \
@@ -41,7 +41,7 @@ python3 -m verl.trainer.main_ppo \
4141
trainer.critic_warmup=0 \
4242
trainer.logger=['console','wandb'] \
4343
trainer.project_name='gsm8k_async_rl' \
44-
trainer.experiment_name='qwen2.5-3b_function_rm-gsm8k-async-sgl-multi-w-tool-verify-n16' \
44+
trainer.experiment_name='qwen2.5-3b_function_rm-gsm8k-sgl-multi-w-tool-verify-n16' \
4545
trainer.n_gpus_per_node=8 \
4646
trainer.nnodes=1 \
4747
trainer.save_freq=-1 \

examples/sglang_multiturn/run_qwen2.5-3b_gsm8k_multiturn_4xgpu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ python3 -m verl.trainer.main_ppo \
3232
actor_rollout_ref.actor.fsdp_config.optimizer_offload=False \
3333
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=32 \
3434
actor_rollout_ref.rollout.tensor_model_parallel_size=2 \
35-
actor_rollout_ref.rollout.name=sglang_async \
35+
actor_rollout_ref.rollout.name=sglang \
3636
actor_rollout_ref.rollout.gpu_memory_utilization=0.5 \
3737
actor_rollout_ref.rollout.n=16 \
3838
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=32 \

examples/sglang_multiturn/run_qwen2.5-3b_megatron_gsm8k_multiturn.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ python3 -m verl.trainer.main_ppo \
4545
actor_rollout_ref.ref.megatron.tensor_model_parallel_size=2 \
4646
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=16 \
4747
actor_rollout_ref.rollout.tensor_model_parallel_size=2 \
48-
actor_rollout_ref.rollout.name=sglang_async \
48+
actor_rollout_ref.rollout.name=sglang \
4949
actor_rollout_ref.rollout.gpu_memory_utilization=0.5 \
5050
actor_rollout_ref.rollout.n=8 \
5151
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=16 \
5252
algorithm.use_kl_in_reward=False \
5353
trainer.critic_warmup=0 \
5454
trainer.logger=['console','wandb'] \
5555
trainer.project_name='gsm8k_async_rl' \
56-
trainer.experiment_name='qwen2.5-3b_function_rm-gsm8k-async-sgl-multi-w-tool-n8-mcore-v2505201745_seed42' \
56+
trainer.experiment_name='qwen2.5-3b_function_rm-gsm8k-sgl-multi-w-tool-n8-mcore-v2505201745_seed42' \
5757
trainer.n_gpus_per_node=8 \
5858
trainer.nnodes=1 \
5959
trainer.save_freq=-1 \

requirements_sglang.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ torchdata
1717
torchvision
1818
transformers
1919
wandb
20-
sglang[all]==0.4.6.post4
20+
sglang[all]==0.4.6.post5
2121
torch-memory-saver>=0.0.5
22-
huggingface_hub
22+
huggingface_hub

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@
4949
GPU_REQUIRES = ["liger-kernel", "flash-attn"]
5050
MATH_REQUIRES = ["math-verify"] # Add math-verify as an optional dependency
5151
VLLM_REQUIRES = ["tensordict<=0.6.2", "vllm<=0.8.5"]
52-
SGLANG_REQUIRES = ["tensordict<=0.6.2", "sglang[srt,openai]==0.4.6.post4", "torch-memory-saver>=0.0.5", "torch==2.6.0"]
52+
SGLANG_REQUIRES = [
53+
"tensordict<=0.6.2",
54+
"sglang[srt,openai]==0.4.6.post5",
55+
"torch-memory-saver>=0.0.5",
56+
"torch==2.6.0",
57+
]
5358

5459
extras_require = {
5560
"test": TEST_REQUIRES,

tests/e2e/run_gsm8k_fsdp_sgl_multiturn_w_tool.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ python3 -m verl.trainer.main_ppo \
3636
actor_rollout_ref.actor.fsdp_config.optimizer_offload=False \
3737
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=32 \
3838
actor_rollout_ref.rollout.tensor_model_parallel_size=2 \
39-
actor_rollout_ref.rollout.name=sglang_async \
39+
actor_rollout_ref.rollout.name=sglang \
4040
actor_rollout_ref.rollout.gpu_memory_utilization=0.5 \
4141
actor_rollout_ref.rollout.n=8 \
4242
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=32 \
@@ -46,7 +46,7 @@ python3 -m verl.trainer.main_ppo \
4646
trainer.critic_warmup=0 \
4747
trainer.logger=['console'] \
4848
trainer.project_name='gsm8k_async_rl' \
49-
trainer.experiment_name=qwen2.5-3b_function_rm-gsm8k-async-sgl-multi-w-tool-$FSDP_STRATEGY-rebased-0427-verify-n16 \
49+
trainer.experiment_name=qwen2.5-3b_function_rm-gsm8k-sgl-multi-w-tool-$FSDP_STRATEGY-rebased-0427-verify-n16 \
5050
trainer.n_gpus_per_node=8 \
5151
trainer.nnodes=1 \
5252
trainer.save_freq=-1 \

tests/e2e/run_ppo_trainer_megatron.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if [ $SKIP_SAVE_HF_MODEL -eq 1 ]; then
7878
CHECKPOINT_CONTENTS=['model','optimizer','extra']
7979
fi
8080

81-
ENGINES=("vllm" "sglang_async")
81+
ENGINES=("vllm" "sglang")
8282

8383
exp_name="$(basename "${MODEL_ID,,}")-megatron-gsm8k-minimal"
8484

tests/workers/rollout/test_async_sglang_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright 2023-2024 SGLang Team
12
# Copyright 2025 Bytedance Ltd. and/or its affiliates
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +21,6 @@
2021
@patch.dict(
2122
"sys.modules",
2223
{
23-
"verl.workers.rollout.sglang_rollout.async_sglang_rollout": MagicMock(AsyncSGLangRollout=MagicMock()),
2424
"verl.workers.rollout.sglang_rollout.sglang_rollout": MagicMock(SGLangRollout=MagicMock()),
2525
},
2626
)

0 commit comments

Comments
 (0)