Skip to content

Commit 9d75f82

Browse files
authored
Merge branch 'main' into recipes/dsv4-agg-disagg
2 parents 7d8354f + 698590e commit 9d75f82

27 files changed

Lines changed: 1898 additions & 90 deletions

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ configs/etcdctl
5151
configs/*.whl
5252
configs/*.deb
5353
configs/*.tar.gz
54+
wheelhouse/
5455

5556
.ruff_cache/
5657
*.egg-info/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
set -euo pipefail
6+
7+
apt-get -y update && apt-get install -y --no-install-recommends --allow-change-held-packages numactl
8+
9+
pip install msgpack
10+
11+
if [ -f /configs/patches/vllm_numa_bind_hash_fix.py ]; then
12+
python3 /configs/patches/vllm_numa_bind_hash_fix.py
13+
fi
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
"""
5+
Patch vLLM's ParallelConfig.compute_hash to exclude NUMA-bind fields
6+
(numa_bind / numa_bind_nodes / numa_bind_cpus) from the DP consistency hash.
7+
8+
Symptom (seen on GB300, 1 worker, DP=4, numa-bind=True):
9+
RuntimeError: Configuration mismatch detected for engine 3.
10+
All DP workers must have identical configurations for parameters that
11+
affect collective communication ...
12+
13+
Root cause: when numa-bind is enabled, each DP rank auto-detects and stores
14+
its own per-rank NUMA node in ParallelConfig.numa_bind_nodes. These per-rank
15+
values enter compute_hash(), so ranks on different NUMA nodes produce
16+
different hashes and fail the DP startup check. NUMA binding affects only
17+
host-side memory locality, not collective-communication semantics, so it is
18+
safe to exclude from the DP hash.
19+
20+
Reference: vllm/config/parallel.py, ParallelConfig.compute_hash(),
21+
ignored_factors set.
22+
"""
23+
24+
import sys
25+
from pathlib import Path
26+
27+
TARGET = Path("/usr/local/lib/python3.12/dist-packages/vllm/config/parallel.py")
28+
29+
# Idempotency: if any of our additions is already present, skip.
30+
MARKER = '"numa_bind",'
31+
32+
# Anchor: the last entry of the existing ignored_factors set in the
33+
# upstream compute_hash method. We insert the three numa fields just
34+
# before the closing brace.
35+
OLD = ' "_api_process_rank",\n }'
36+
37+
NEW = (
38+
' "_api_process_rank",\n'
39+
" # srt-slurm-sa hotfix: numa-bind fields are per-rank runtime\n"
40+
" # topology, not collective-communication semantics.\n"
41+
' "numa_bind",\n'
42+
' "numa_bind_nodes",\n'
43+
' "numa_bind_cpus",\n'
44+
" }"
45+
)
46+
47+
48+
def main():
49+
if not TARGET.exists():
50+
print(f"[vllm-numa-bind-hash-fix] Target not found: {TARGET}", file=sys.stderr)
51+
sys.exit(1)
52+
53+
content = TARGET.read_text()
54+
55+
if MARKER in content:
56+
print("[vllm-numa-bind-hash-fix] Already patched, skipping.", file=sys.stderr)
57+
return
58+
59+
count = content.count(OLD)
60+
if count == 0:
61+
print(
62+
"[vllm-numa-bind-hash-fix] Could not find ignored_factors anchor. "
63+
"vLLM version may have drifted; inspect ParallelConfig.compute_hash().",
64+
file=sys.stderr,
65+
)
66+
sys.exit(1)
67+
if count > 1:
68+
print(
69+
f"[vllm-numa-bind-hash-fix] Anchor is ambiguous ({count} occurrences); "
70+
"refusing to patch.",
71+
file=sys.stderr,
72+
)
73+
sys.exit(1)
74+
75+
content = content.replace(OLD, NEW)
76+
TARGET.write_text(content)
77+
print(
78+
"[vllm-numa-bind-hash-fix] Added numa_bind/numa_bind_nodes/numa_bind_cpus "
79+
"to ParallelConfig.compute_hash ignored_factors.",
80+
file=sys.stderr,
81+
)
82+
83+
84+
if __name__ == "__main__":
85+
main()

‎configs/vllm-container-deps.sh‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎docs/config-reference.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,12 @@ The `srtslurm.yaml` file can contain the following fields:
116116
| `model_paths` | dict | Model path aliases |
117117
| `containers` | dict | Container image aliases |
118118
| `default_mounts` | dict | Cluster-wide container mounts |
119+
| `default_bash_preamble` | string | Shell snippet prepended to every container srun |
119120

120121
**output_dir**: When set, job logs are written to `output_dir/{job_id}/logs` instead of `srtctl_root/outputs/{job_id}/logs`. Useful for CI/CD and ephemeral environments.
121122

123+
**default_bash_preamble**: A shell snippet (e.g. `"ulimit -n 1048576 -s unlimited -u 1048576"`) prepended to every container srun launched by srtctl — workers, frontends, telemetry, benchmark, postprocess. Runs before per-call `bash_preamble` and the main command, so cluster-wide ulimits apply to everything downstream. Silently dropped for distroless containers (e.g. `prom/node-exporter`) that bypass the bash wrapper; a WARNING log is emitted in that case.
124+
122125
### Running without `srtslurm.yaml`
123126

124127
`srtslurm.yaml` is optional. A recipe can be fully self-sustaining as long as it supplies everything the cluster yaml would otherwise provide:
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: "svf-vllm-disagg-gb200-1p1d-dep8-dep8"
2+
setup_script: "vllm-container-deps.sh"
3+
model:
4+
path: "deepseekv4-fp4"
5+
container: "vllm/vllm-openai:v0.20.0-ubuntu2404@sha256:46da022ce07aae43e4ffae844aeab467a223437e071abadf566555699fbf16c3"
6+
precision: "fp4"
7+
8+
dynamo:
9+
install: true
10+
wheel: "1.2.0.dev20260426"
11+
12+
health_check:
13+
max_attempts: 360
14+
interval_seconds: 10
15+
16+
resources:
17+
gpu_type: "gb200"
18+
gpus_per_node: 4
19+
prefill_nodes: 2
20+
decode_nodes: 2
21+
prefill_workers: 1
22+
decode_workers: 1
23+
gpus_per_prefill: 8
24+
gpus_per_decode: 8
25+
frontend:
26+
type: dynamo
27+
enable_multiple_frontends: false
28+
backend:
29+
type: vllm
30+
connector: null
31+
prefill_environment:
32+
TILELANG_CLEANUP_TEMP_FILES: "1"
33+
VLLM_USE_NCCL_SYMM_MEM: "1"
34+
NCCL_CUMEM_ENABLE: "1"
35+
NCCL_MNNVL_ENABLE: "1"
36+
NCCL_NVLS_ENABLE: "1"
37+
VLLM_SERVER_DEV_MODE: "1"
38+
VLLM_SPARSE_INDEXER_MAX_LOGITS_MB: "1024"
39+
VLLM_MAX_TOKENS_PER_EXPERT_FP4_MOE: "2048"
40+
# VLLM_RANDOMIZE_DP_DUMMY_INPUTS: "1"
41+
# VLLM_MOE_ROUTING_SIMULATION_STRATEGY: "uniform_random"
42+
UCX_MEMTYPE_CACHE: "n"
43+
UCX_MEMTYPE_REG_WHOLE: "n"
44+
UCX_TLS: "cuda_copy,cuda_ipc,tcp"
45+
UCX_CUDA_IPC_ENABLE_MNNVL: "y"
46+
NCCL_P2P_LEVEL: NVL
47+
decode_environment:
48+
TILELANG_CLEANUP_TEMP_FILES: "1"
49+
VLLM_USE_NCCL_SYMM_MEM: "1"
50+
NCCL_CUMEM_ENABLE: "1"
51+
NCCL_MNNVL_ENABLE: "1"
52+
NCCL_NVLS_ENABLE: "1"
53+
VLLM_SERVER_DEV_MODE: "1"
54+
# VLLM_RANDOMIZE_DP_DUMMY_INPUTS: "1"
55+
# VLLM_MOE_ROUTING_SIMULATION_STRATEGY: "uniform_random"
56+
UCX_MEMTYPE_CACHE: "n"
57+
UCX_MEMTYPE_REG_WHOLE: "n"
58+
UCX_TLS: "cuda_copy,cuda_ipc,tcp"
59+
UCX_CUDA_IPC_ENABLE_MNNVL: "y"
60+
NCCL_P2P_LEVEL: NVL
61+
vllm_config:
62+
prefill:
63+
kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}'
64+
served-model-name: "deepseek-ai/DeepSeek-V4-Pro"
65+
kv-cache-dtype: "fp8"
66+
tensor-parallel-size: 1
67+
pipeline-parallel-size: 1
68+
data-parallel-size: 8
69+
data-parallel-rpc-port: 13345
70+
enable-expert-parallel: true
71+
enforce-eager: true
72+
max-model-len: 9280
73+
max-num-seqs: 16
74+
max-num-batched-tokens: 32768
75+
trust-remote-code: true
76+
no-enable-prefix-caching: true
77+
no-enable-flashinfer-autotune: true
78+
no-async-scheduling: true
79+
block-size: 256
80+
gpu-memory-utilization: 0.8
81+
no-disable-hybrid-kv-cache-manager: true
82+
enable-sleep-mode: true
83+
numa-bind: true
84+
offload-group-size: 3
85+
offload-num-in-group: 1
86+
offload-prefetch-step: 2
87+
# offload-params: "w13_weight w2_weight w13_weight_scale w2_weight_scale wq_b wo_a wo_b shared_experts"
88+
tokenizer-mode: deepseek_v4
89+
decode:
90+
kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}'
91+
served-model-name: "deepseek-ai/DeepSeek-V4-Pro"
92+
kv-cache-dtype: "fp8"
93+
tensor-parallel-size: 1
94+
pipeline-parallel-size: 1
95+
data-parallel-size: 8
96+
data-parallel-rpc-port: 13345
97+
enable-expert-parallel: true
98+
max-model-len: 9280
99+
max-num-seqs: 128
100+
max-cudagraph-capture-size: 128
101+
max-num-batched-tokens: 128
102+
trust-remote-code: true
103+
no-enable-prefix-caching: true
104+
block-size: 256
105+
compilation-config: '{"cudagraph_mode":"FULL_DECODE_ONLY","mode":0}'
106+
gpu-memory-utilization: 0.9
107+
stream-interval: 50
108+
no-disable-hybrid-kv-cache-manager: true
109+
enable-sleep-mode: true
110+
tokenizer-mode: deepseek_v4
111+
benchmark:
112+
type: "sa-bench"
113+
isl: 8192
114+
osl: 1024
115+
concurrencies: "256x512x1024"
116+
req_rate: "inf"
117+
use_chat_template: true
118+
custom_tokenizer: "sa_bench_tokenizers.vllm_deepseek_v4.VLLMDeepseekV4Tokenizer"
119+
120+
identity:
121+
model:
122+
repo: "deepseek-ai/DeepSeek-V4-Pro"
123+
revision: "0366e4e064385807ea86b088a5c6c878ff23343b"
124+
container:
125+
image: "vllm/vllm-openai:v0.20.0-ubuntu2404@sha256:46da022ce07aae43e4ffae844aeab467a223437e071abadf566555699fbf16c3"
126+
frameworks:
127+
dynamo: "1.2.0.dev20260426"
128+
vllm: "0.20.0"
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: "svf-vllm-disagg-gb200-1p4d-dep8-tp8-offload"
2+
setup_script: "vllm-container-deps.sh"
3+
model:
4+
path: "deepseekv4-fp4"
5+
container: "vllm/vllm-openai:v0.20.0-ubuntu2404@sha256:46da022ce07aae43e4ffae844aeab467a223437e071abadf566555699fbf16c3"
6+
precision: "fp4"
7+
8+
dynamo:
9+
install: true
10+
wheel: "1.2.0.dev20260426"
11+
12+
health_check:
13+
max_attempts: 360
14+
interval_seconds: 10
15+
16+
resources:
17+
gpu_type: "gb200"
18+
gpus_per_node: 4
19+
prefill_nodes: 2
20+
decode_nodes: 8
21+
prefill_workers: 1
22+
decode_workers: 4
23+
gpus_per_prefill: 8
24+
gpus_per_decode: 8
25+
frontend:
26+
type: dynamo
27+
enable_multiple_frontends: false
28+
backend:
29+
type: vllm
30+
connector: null
31+
prefill_environment:
32+
TILELANG_CLEANUP_TEMP_FILES: "1"
33+
VLLM_USE_NCCL_SYMM_MEM: "1"
34+
NCCL_CUMEM_ENABLE: "1"
35+
NCCL_MNNVL_ENABLE: "1"
36+
NCCL_NVLS_ENABLE: "1"
37+
VLLM_SERVER_DEV_MODE: "1"
38+
VLLM_SPARSE_INDEXER_MAX_LOGITS_MB: "1024"
39+
VLLM_MAX_TOKENS_PER_EXPERT_FP4_MOE: "2048"
40+
# VLLM_RANDOMIZE_DP_DUMMY_INPUTS: "1"
41+
# VLLM_MOE_ROUTING_SIMULATION_STRATEGY: "uniform_random"
42+
UCX_MEMTYPE_CACHE: "n"
43+
UCX_MEMTYPE_REG_WHOLE: "n"
44+
UCX_TLS: "cuda_copy,cuda_ipc,tcp"
45+
UCX_CUDA_IPC_ENABLE_MNNVL: "y"
46+
NCCL_P2P_LEVEL: NVL
47+
decode_environment:
48+
TILELANG_CLEANUP_TEMP_FILES: "1"
49+
VLLM_USE_NCCL_SYMM_MEM: "1"
50+
NCCL_CUMEM_ENABLE: "1"
51+
NCCL_MNNVL_ENABLE: "1"
52+
NCCL_NVLS_ENABLE: "1"
53+
VLLM_SERVER_DEV_MODE: "1"
54+
# VLLM_RANDOMIZE_DP_DUMMY_INPUTS: "1"
55+
# VLLM_MOE_ROUTING_SIMULATION_STRATEGY: "uniform_random"
56+
UCX_MEMTYPE_CACHE: "n"
57+
UCX_MEMTYPE_REG_WHOLE: "n"
58+
UCX_TLS: "cuda_copy,cuda_ipc,tcp"
59+
UCX_CUDA_IPC_ENABLE_MNNVL: "y"
60+
NCCL_P2P_LEVEL: NVL
61+
vllm_config:
62+
prefill:
63+
kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}'
64+
served-model-name: "deepseek-ai/DeepSeek-V4-Pro"
65+
kv-cache-dtype: "fp8"
66+
tensor-parallel-size: 1
67+
pipeline-parallel-size: 1
68+
data-parallel-size: 8
69+
data-parallel-rpc-port: 13345
70+
enable-expert-parallel: true
71+
enforce-eager: true
72+
max-model-len: 16384
73+
max-num-seqs: 16
74+
max-num-batched-tokens: 32768
75+
trust-remote-code: true
76+
no-enable-prefix-caching: true
77+
no-enable-flashinfer-autotune: true
78+
no-async-scheduling: true
79+
block-size: 256
80+
gpu-memory-utilization: 0.8
81+
no-disable-hybrid-kv-cache-manager: true
82+
enable-sleep-mode: true
83+
numa-bind: true
84+
offload-group-size: 3
85+
offload-num-in-group: 1
86+
offload-prefetch-step: 2
87+
# offload-params: "w13_weight w2_weight w13_weight_scale w2_weight_scale wq_b wo_a wo_b shared_experts"
88+
tokenizer-mode: deepseek_v4
89+
decode:
90+
kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}'
91+
served-model-name: "deepseek-ai/DeepSeek-V4-Pro"
92+
kv-cache-dtype: "fp8"
93+
tensor-parallel-size: 8
94+
pipeline-parallel-size: 1
95+
# data-parallel-size: 8
96+
# data-parallel-rpc-port: 13345
97+
# enable-expert-parallel: true
98+
max-model-len: 16384
99+
max-num-seqs: 256
100+
max-cudagraph-capture-size: 256
101+
max-num-batched-tokens: 256
102+
trust-remote-code: true
103+
no-enable-prefix-caching: true
104+
block-size: 256
105+
compilation-config: '{"cudagraph_mode":"FULL_DECODE_ONLY","mode":0}'
106+
gpu-memory-utilization: 0.9
107+
stream-interval: 50
108+
no-disable-hybrid-kv-cache-manager: true
109+
enable-sleep-mode: true
110+
tokenizer-mode: deepseek_v4
111+
benchmark:
112+
type: "sa-bench"
113+
isl: 8192
114+
osl: 1024
115+
concurrencies: "256x512x1024"
116+
req_rate: "inf"
117+
use_chat_template: true
118+
custom_tokenizer: "sa_bench_tokenizers.vllm_deepseek_v4.VLLMDeepseekV4Tokenizer"
119+
120+
identity:
121+
model:
122+
repo: "deepseek-ai/DeepSeek-V4-Pro"
123+
revision: "0366e4e064385807ea86b088a5c6c878ff23343b"
124+
container:
125+
image: "vllm/vllm-openai:v0.20.0-ubuntu2404@sha256:46da022ce07aae43e4ffae844aeab467a223437e071abadf566555699fbf16c3"
126+
frameworks:
127+
dynamo: "1.2.0.dev20260426"
128+
vllm: "0.20.0"

0 commit comments

Comments
 (0)