Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
92abffe
Use vLLM's own server instead of TRL's
qgallouedec Aug 15, 2026
afca77c
Trim the vLLM integration guide
qgallouedec Aug 15, 2026
ec6b582
Cut what the vLLM guide already says elsewhere
qgallouedec Aug 15, 2026
5fa0cbe
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 17, 2026
49ba8d3
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 18, 2026
2f8d9ba
style
qgallouedec Aug 18, 2026
7255644
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 18, 2026
63abc83
Reset the vLLM prefix cache after the weight update is finalized
qgallouedec Aug 18, 2026
1bad7dd
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 19, 2026
0f4f1ca
Enter the weight-update lifecycle on the main process only
qgallouedec Aug 19, 2026
4ab38e2
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 19, 2026
53f96f9
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 19, 2026
c906eb6
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 20, 2026
ba9c8c4
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 20, 2026
942bff4
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 24, 2026
2f9253b
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 24, 2026
703e478
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 24, 2026
bd0a8ea
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 25, 2026
f5e2c0a
Keep imageless rows working in Online DPO server mode
qgallouedec Aug 25, 2026
072f8c8
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 25, 2026
e48e5a6
Merge branch 'main' into vllm-serve-native-migration
qgallouedec Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/clis.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Currently supported commands are:
### Other Commands

- `trl env`: get the system information
- `trl vllm-serve`: serve a model with vLLM
- `trl vllm-serve`: serve a model with vLLM (deprecated, use `vllm serve` directly, see [vLLM integration](vllm_integration))

## Fine-Tuning with the TRL CLI

Expand Down
5 changes: 4 additions & 1 deletion docs/source/distillation_trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ In this mode, vLLM runs in a separate process (and using separate GPUs) and comm
1. **Start the vLLM server**:

```bash
trl vllm-serve --model <model_name>
VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1
```

2. **Enable server mode in your training script**:
Expand Down
10 changes: 8 additions & 2 deletions docs/source/grpo_trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ In this mode, vLLM runs in a separate process (and using separate GPUs) and comm
1. **Start the vLLM server**:

```bash
trl vllm-serve --model <model_name>
VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1
```

2. **Enable server mode in your training script**:
Expand Down Expand Up @@ -369,7 +372,10 @@ srun --nodes=4 --ntasks=4 --nodelist="${NODELIST[@]:0:4}" accelerate launch \
--server_ip $VLLM_NODE &

# Run vLLM server on the 5th node (Group 2)
srun --nodes=1 --ntasks=1 --nodelist="${NODELIST[4]}" trl vllm-serve --model Qwen/Qwen2.5-72B --tensor_parallel_size 8 &
srun --nodes=1 --ntasks=1 --nodelist="${NODELIST[4]}" env VLLM_SERVER_DEV_MODE=1 vllm serve Qwen/Qwen2.5-72B --tensor-parallel-size 8 \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1 &

wait
```
Expand Down
5 changes: 4 additions & 1 deletion docs/source/openenv.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ This runs vLLM in the same process as training, requiring only a single GPU.

```bash
# Terminal 1: Start vLLM inference server
CUDA_VISIBLE_DEVICES=0 trl vllm-serve --model Qwen/Qwen3-1.7B --host 0.0.0.0 --port 8000
CUDA_VISIBLE_DEVICES=0 VLLM_SERVER_DEV_MODE=1 vllm serve Qwen/Qwen3-1.7B --host 0.0.0.0 --port 8000 \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1

# Terminal 2: Run GRPO training with OpenEnv
CUDA_VISIBLE_DEVICES=1 python examples/scripts/openenv/wordle.py --vllm-mode server --vllm-server-url http://localhost:8000
Expand Down
10 changes: 8 additions & 2 deletions docs/source/rloo_trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ In this mode, vLLM runs in a separate process (and using separate GPUs) and comm
1. **Start the vLLM server**:

```bash
trl vllm-serve --model <model_name>
VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1
```

2. **Enable server mode in your training script**:
Expand Down Expand Up @@ -253,7 +256,10 @@ srun --nodes=4 --ntasks=4 --nodelist="${NODELIST[@]:0:4}" accelerate launch \
--server_ip $VLLM_NODE &

# Run vLLM server on the 5th node (Group 2)
srun --nodes=1 --ntasks=1 --nodelist="${NODELIST[4]}" trl vllm-serve --model Qwen/Qwen2.5-72B --tensor_parallel_size 8 &
srun --nodes=1 --ntasks=1 --nodelist="${NODELIST[4]}" env VLLM_SERVER_DEV_MODE=1 vllm serve Qwen/Qwen2.5-72B --tensor-parallel-size 8 \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1 &

wait
```
Expand Down
25 changes: 20 additions & 5 deletions docs/source/speeding_up_training.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ pip install trl[vllm]
First, start a vLLM server by running:

```bash
trl vllm-serve --model <model_name>
VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1
```

Then, run the training script and pass `use_vllm=True` in the training arguments.
Expand All @@ -36,7 +39,10 @@ training_args = OnlineDPOConfig(..., use_vllm=True, vllm_mode="server")
First, start a vLLM server by running:

```bash
trl vllm-serve --model <model_name>
VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1
```

Then, run the training script and pass `use_vllm=True` in the training arguments.
Expand All @@ -55,7 +61,10 @@ You can customize the server configuration by passing additional arguments. For
> Set GPUs **0-3** for vLLM generation:
>
> ```sh
> CUDA_VISIBLE_DEVICES=0,1,2,3 trl vllm-serve --model <model_name>
> CUDA_VISIBLE_DEVICES=0,1,2,3 VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
> --weight-transfer-config '{"backend": "nccl"}' \
> --logprobs-mode processed_logprobs \
> --max-logprobs -1
> ```
>
> And GPUs **4-7** for training:
Expand All @@ -70,7 +79,10 @@ You can customize the server configuration by passing additional arguments. For
First, start a vLLM server by running:

```bash
trl vllm-serve --model <model_name>
VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
--weight-transfer-config '{"backend": "nccl"}' \
--logprobs-mode processed_logprobs \
--max-logprobs -1
```

Then, run the training script and pass `use_vllm=True` in the training arguments.
Expand All @@ -89,7 +101,10 @@ You can customize the server configuration by passing additional arguments. For
> Set GPUs **0-3** for vLLM generation:
>
> ```sh
> CUDA_VISIBLE_DEVICES=0,1,2,3 trl vllm-serve --model <model_name>
> CUDA_VISIBLE_DEVICES=0,1,2,3 VLLM_SERVER_DEV_MODE=1 vllm serve <model_name> \
> --weight-transfer-config '{"backend": "nccl"}' \
> --logprobs-mode processed_logprobs \
> --max-logprobs -1
> ```
>
> And GPUs **4-7** for training:
Expand Down
Loading
Loading