Skip to content

Commit 7d57148

Browse files
authored
Update vLLM to 0.11 (#350)
1 parent dbaeb73 commit 7d57148

File tree

14 files changed

+52
-37
lines changed

14 files changed

+52
-37
lines changed

.github/workflows/docker/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
trinity-node-1:
3-
image: trinity-rft-unittest:20250924
3+
image: trinity-rft-unittest:20251030
44
pull_policy: never
55
command: sh -c "pip install -e .[dev] && ray start --head --dashboard-host 0.0.0.0 --include-dashboard true --block"
66
environment:
@@ -29,7 +29,7 @@ services:
2929
capabilities: [gpu]
3030

3131
trinity-node-2:
32-
image: trinity-rft-unittest:20250924
32+
image: trinity-rft-unittest:20251030
3333
pull_policy: never
3434
command: sh -c "pip install -e .[dev] && ray start --address=trinity-node-1:6379 --block"
3535
environment:

.github/workflows/unittest.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ jobs:
9797
fi
9898
fi
9999
100+
- name: Convert report.json time to ms
101+
working-directory: trinity-${{ github.run_id }}
102+
if: env.tests_run == 'true' || failure()
103+
run: |
104+
REPORT=report.json
105+
if [ -f "$REPORT" ]; then
106+
jq '(.results.tests[] | .duration, .start, .stop) |= (. * 1000) | (.results.summary.start, .results.summary.stop) |= (. * 1000)' "$REPORT" > "$REPORT.tmp" && mv "$REPORT.tmp" "$REPORT"
107+
fi
108+
100109
- name: Clean checkpoint dir
101110
working-directory: trinity-${{ github.run_id }}/.github/workflows/docker
102111
if: always()

benchmark/config/countdown-template.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ explorer:
5454
rollout_model:
5555
engine_num: 2
5656
tensor_parallel_size: 1
57-
use_v1: true
5857
enforce_eager: true
5958
enable_prefix_caching: false
6059
enable_chunked_prefill: false

benchmark/config/gsm8k-template.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ explorer:
5959
rollout_model:
6060
engine_num: 2
6161
tensor_parallel_size: 1
62-
use_v1: true
6362
enforce_eager: false
6463
enable_prefix_caching: false
6564
enable_chunked_prefill: false

docs/sphinx_doc/source/conf.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
import subprocess
9+
810
from trinity import __version__ as version
911

1012
project = "Trinity-RFT"
@@ -58,11 +60,22 @@
5860
apidoc_excluded_paths = ["tests", "build"]
5961
apidoc_separate_modules = True
6062

63+
6164
# Multiversion configs
62-
smv_tag_whitelist = r"^v\d+\.\d+\.\d+$" # match v1.0.0 pattern
65+
def get_recent_tags(n: int) -> list:
66+
"""Retrieve the most recent n git tags."""
67+
try:
68+
tags = subprocess.check_output(
69+
["git", "tag", "--sort=-creatordate"], universal_newlines=True
70+
).splitlines()
71+
return tags[:n]
72+
except subprocess.CalledProcessError:
73+
return []
74+
75+
76+
smv_tag_whitelist = r"^(" + "|".join(get_recent_tags(4)) + r")$"
6377
smv_branch_whitelist = r"^(main)$" # included branches
6478
smv_remote_whitelist = None
65-
smv_released_pattern = r"^tags/.*$"
6679

6780
smv_prefer_remote_refs = False
6881

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ requires-python = ">=3.10,<3.13"
2323
dependencies = [
2424
"verl==0.5.0",
2525
"ray[default]>=2.48.0",
26-
"vllm>=0.9.1,<=0.10.2",
26+
"vllm>=0.9.1,<=0.11.0",
2727
"tensordict",
2828
"wandb",
2929
"omegaconf",
@@ -73,7 +73,7 @@ dev = [
7373
]
7474
megatron = [
7575
"megatron-core[mlm]==0.13.1",
76-
"transformer_engine[pytorch]==2.6.0.post1",
76+
"transformer_engine[pytorch]==2.8.0",
7777
"mbridge>=0.13.0",
7878
]
7979

scripts/docker/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# docker run -it --gpus all --shm-size="64g" --rm -v $PWD:/workspace -v <root_path_of_data_and_checkpoints>:/data trinity-rft:latest
66

77

8-
FROM nvcr.io/nvidia/cuda:12.6.3-cudnn-devel-ubuntu22.04
8+
FROM nvcr.io/nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04
99

1010
WORKDIR /workspace
1111

@@ -20,13 +20,13 @@ RUN apt update && apt install -y \
2020

2121

2222
# For Aliyun users: update pip mirror to aliyun to speed up pip install
23-
RUN pip config set global.index-url http://mirrors.cloud.aliyuncs.com/pypi/simple/ \
24-
&& pip config set install.trusted-host mirrors.cloud.aliyuncs.com
23+
# RUN pip config set global.index-url http://mirrors.cloud.aliyuncs.com/pypi/simple/ \
24+
# && pip config set install.trusted-host mirrors.cloud.aliyuncs.com
2525

2626
# copy the Trinity-RFT dir into the workspace
2727
COPY . .
2828

29-
RUN pip install --upgrade pip && pip install -e .[dev] && pip install flash-attn
29+
RUN pip install --upgrade pip && pip install -e .[dev] && pip install flash_attn==2.8.1 --no-build-isolation
3030

3131
# Set Env variables
3232

scripts/docker_for_megatron/Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
# docker run -it --gpus all --shm-size="64g" --rm -v $PWD:/workspace -v <root_path_of_data_and_checkpoints>:/data trinity-rft-megatron:latest
66

77

8-
FROM nvcr.io/nvidia/cuda:12.6.3-cudnn-devel-ubuntu22.04
8+
FROM nvcr.io/nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04
99

1010
WORKDIR /workspace
1111

12-
# copy the Trinity-RFT dir into the workspace
13-
COPY . .
14-
1512
RUN apt update && apt install -y \
1613
build-essential \
1714
curl git wget vim tmux net-tools \
@@ -22,17 +19,21 @@ RUN apt update && apt install -y \
2219
&& ln -sf /usr/bin/pip3 /usr/bin/pip
2320

2421
# For Aliyun users: update pip mirror to aliyun to speed up pip install
25-
RUN pip config set global.index-url http://mirrors.cloud.aliyuncs.com/pypi/simple/ \
26-
&& pip config set install.trusted-host mirrors.cloud.aliyuncs.com
22+
# RUN pip config set global.index-url http://mirrors.cloud.aliyuncs.com/pypi/simple/ \
23+
# && pip config set install.trusted-host mirrors.cloud.aliyuncs.com
24+
25+
# copy the Trinity-RFT dir into the workspace
26+
COPY . .
2727

2828
# Install Trinity-RFT with Megatron
2929
RUN pip install --upgrade pip \
30+
&& pip install -e .[dev] \
31+
&& pip install flash_attn==2.8.1 --no-build-isolation \
3032
&& pip install -e .[megatron] \
31-
&& pip install flash-attn==2.8.1 \
3233
&& pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation \
3334
--config-settings "--build-option=--cpp_ext" \
3435
--config-settings "--build-option=--cuda_ext" \
35-
--resume-retries 999 git+https://github.com/NVIDIA/apex.git
36+
--resume-retries 20 git+https://github.com/NVIDIA/apex.git
3637

3738
# Set Env variables
3839

tests/common/vllm_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ def setUp(self):
276276
self.config.explorer.rollout_model.engine_type = "vllm"
277277
self.config.explorer.rollout_model.engine_num = 1
278278
self.config.explorer.rollout_model.tensor_parallel_size = 1
279-
self.config.explorer.rollout_model.use_v1 = True
280279
self.config.explorer.rollout_model.chat_template = CHAT_TEMPLATE
281280
self.config.explorer.rollout_model.enable_openai_api = True
282281

@@ -368,7 +367,6 @@ def setUp(self):
368367
self.config.explorer.rollout_model.engine_type = "vllm"
369368
self.config.explorer.rollout_model.engine_num = 1
370369
self.config.explorer.rollout_model.tensor_parallel_size = 1
371-
self.config.explorer.rollout_model.use_v1 = True
372370
self.config.explorer.rollout_model.chat_template = CHAT_TEMPLATE
373371
self.config.explorer.rollout_model.enable_openai_api = True
374372

@@ -578,7 +576,6 @@ def setUp(self):
578576
self.config.explorer.rollout_model.engine_type = "vllm"
579577
self.config.explorer.rollout_model.engine_num = 1
580578
self.config.explorer.rollout_model.tensor_parallel_size = 1
581-
self.config.explorer.rollout_model.use_v1 = True
582579
self.config.explorer.rollout_model.chat_template = CHAT_TEMPLATE
583580
self.config.explorer.rollout_model.enable_openai_api = True
584581
# added for toolcalls

tests/template/config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ explorer:
4242
enforce_eager: true
4343
dtype: bfloat16
4444
seed: 42
45-
use_v1: true
4645
trainer:
4746
trainer_type: verl
4847
save_interval: 100

0 commit comments

Comments
 (0)