Skip to content

Commit 17b0753

Browse files
committed
feat(kimik3.1): add GB300 FP4 AgentX disaggregated llmd-vllm recipes
1 parent 0a1b302 commit 17b0753

6 files changed

Lines changed: 1401 additions & 0 deletions

File tree

Lines changed: 339 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,339 @@
1+
schema: 2
2+
3+
base:
4+
name: kimik3.1-fp4-gb300-llmd-vllm-agentx-disagg-dep16
5+
identity:
6+
model: {}
7+
container: {}
8+
frameworks:
9+
vllm: "0.23.1rc1.dev7347+gc92eaa62c"
10+
11+
dynamo:
12+
install: false
13+
14+
environment:
15+
HF_HUB_CACHE: /hf_hub_cache
16+
17+
slurm:
18+
time_limit: "04:00:00"
19+
20+
health_check:
21+
max_attempts: 720
22+
interval_seconds: 10
23+
24+
resources:
25+
gpu_type: "gb300"
26+
gpus_per_node: 4
27+
28+
services:
29+
- name: mooncake-master
30+
type: mooncake-master
31+
args:
32+
- "--default_kv_lease_ttl=60000"
33+
- "--eviction_high_watermark_ratio=0.95"
34+
- "--eviction_ratio=0.10"
35+
options:
36+
store_config:
37+
metadata_server: "P2PHANDSHAKE"
38+
global_segment_size: "160GB"
39+
local_buffer_size: "4GB"
40+
protocol: "rdma"
41+
device_name: "@fabric.rdma-devices"
42+
mode: "embedded"
43+
enable_offload: false
44+
- name: llm-d-sidecar
45+
type: llm-d-sidecar
46+
placement:
47+
node: decode
48+
per: worker
49+
args:
50+
- "--zap-log-level=1"
51+
- "--max-idle-conns-per-host=1024"
52+
env:
53+
OTEL_SDK_DISABLED: "true"
54+
GOGC: "400"
55+
GOMEMLIMIT: "6GiB"
56+
57+
frontend:
58+
type: llm-d
59+
enable_multiple_frontends: false
60+
container_image: "ghcr.io/llm-d/llm-d-router-agentx:09-12-2026@sha256:cea6c6757df8c64d21bc770d0d95ddbead8ee924766a2dd7da1416ac27057499"
61+
env:
62+
GOGC: "400"
63+
GOMEMLIMIT: "20GiB"
64+
args:
65+
v: 1
66+
allow-experimental-plugins: true
67+
grpc-max-recv-msg-size: "32MiB"
68+
grpc-max-send-msg-size: "32MiB"
69+
tracing: false
70+
metrics-endpoint-auth: false
71+
epp_config:
72+
plugins:
73+
- type: metrics-data-source
74+
parameters:
75+
scheme: http
76+
path: /metrics
77+
insecureSkipVerify: true
78+
- type: core-metrics-extractor
79+
parameters:
80+
engineConfigs:
81+
- name: vllm
82+
queuedRequestsSpec: "vllm:num_requests_waiting"
83+
runningRequestsSpec: "vllm:num_requests_running"
84+
kvUsageSpec: "vllm:kv_cache_usage_perc"
85+
loraSpec: ""
86+
cacheInfoSpec: ""
87+
- type: always-disagg-pd-decider
88+
- type: disagg-profile-handler
89+
parameters:
90+
deciders:
91+
prefill: always-disagg-pd-decider
92+
- type: prefill-filter
93+
- type: decode-filter
94+
- type: inflight-load-producer
95+
parameters:
96+
addEstimatedOutputTokens: false
97+
syncCrossReplicaState: false
98+
- type: session-affinity-scorer
99+
parameters:
100+
profileName: prefill
101+
strategy: session_id
102+
sessionIdConfig:
103+
sources:
104+
- header: x-session-id
105+
evictionTtlSeconds: 1
106+
evictionSweepSeconds: 1
107+
- type: active-request-scorer
108+
parameters:
109+
idleThreshold: 0
110+
inFlightLoadProducerName: inflight-load-producer
111+
- type: queue-scorer
112+
- type: kv-cache-utilization-scorer
113+
- type: max-score-picker
114+
- type: utilization-detector
115+
parameters:
116+
queueDepthThreshold: 100000
117+
kvCacheUtilThreshold: 1.0
118+
headroom: 1.0
119+
metricsStalenessThreshold: "3600s"
120+
dataLayer:
121+
injectDefaults: false
122+
sources:
123+
- pluginRef: metrics-data-source
124+
extractors:
125+
- pluginRef: core-metrics-extractor
126+
schedulingProfiles:
127+
- name: prefill
128+
plugins:
129+
- pluginRef: prefill-filter
130+
- pluginRef: utilization-detector
131+
- pluginRef: active-request-scorer
132+
weight: 16
133+
- pluginRef: queue-scorer
134+
weight: 8
135+
- pluginRef: session-affinity-scorer
136+
weight: 4
137+
- pluginRef: max-score-picker
138+
- name: decode
139+
plugins:
140+
- pluginRef: decode-filter
141+
- pluginRef: utilization-detector
142+
- pluginRef: active-request-scorer
143+
weight: 5
144+
- pluginRef: queue-scorer
145+
weight: 3
146+
- pluginRef: kv-cache-utilization-scorer
147+
weight: 3
148+
- pluginRef: max-score-picker
149+
150+
engine:
151+
type: vllm
152+
connector:
153+
dp_launch_mode: per_node
154+
# Lets vLLM bind each spawned worker to its GPU's NUMA node.
155+
set_visible_devices: true
156+
157+
roles:
158+
prefill:
159+
nodes: 4
160+
workers: 1
161+
gpus: 16
162+
env:
163+
<<: &kimi_env
164+
PYTHONHASHSEED: "42"
165+
VLLM_HTTP_TIMEOUT_KEEP_ALIVE: "120"
166+
VLLM_USE_DIRECT_DCP_A2A: "1"
167+
VLLM_USE_DIRECT_DCP_Q_GATHER: "1"
168+
VLLM_USE_DIRECT_DCP_KV_GATHER: "1"
169+
VLLM_ALLREDUCE_USE_FLASHINFER: "1"
170+
VLLM_KIMI_K3_SHARD_SP_SHARED_EXPERT: "0"
171+
VLLM_RPC_TIMEOUT: "600000"
172+
TILELANG_CLEANUP_TEMP_FILES: "1"
173+
VLLM_USE_NCCL_SYMM_MEM: "0"
174+
NCCL_CUMEM_ENABLE: "1"
175+
NCCL_MNNVL_ENABLE: "1"
176+
NCCL_NVLS_ENABLE: "1"
177+
VLLM_SERVER_DEV_MODE: "1"
178+
VLLM_USE_V2_MODEL_RUNNER: "1"
179+
VLLM_USE_RUST_FRONTEND: "1"
180+
VLLM_MOONCAKE_LOAD_RECV_THREADS: "4"
181+
# Lookups lease only the store keys a hit loads.
182+
VLLM_MOONCAKE_STORE_SELECTIVE_LEASE: "1"
183+
MC_SLICE_SIZE: "1048576"
184+
MC_MAX_MR_SIZE: "4294967296"
185+
NCCL_P2P_LEVEL: "NVL"
186+
MC_ENABLE_DEST_DEVICE_AFFINITY: "1"
187+
WITH_NVIDIA_PEERMEM: "0"
188+
NCCL_NET_PLUGIN: "none"
189+
UCX_MEMTYPE_REG_WHOLE: "n"
190+
UCX_TCP_AF_PRIO: "inet"
191+
VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS: "1800"
192+
# NIXL transfers the KDA conv state in the DS layout.
193+
VLLM_SSM_CONV_STATE_LAYOUT: "DS"
194+
TOKENSPEED_MLA_FP16_PARTIALS: "0"
195+
VLLM_ENGINE_READY_TIMEOUT_S: "3600"
196+
VLLM_ENABLE_GEMM_RS: "1"
197+
VLLM_WORKER_MULTIPROC_METHOD: "spawn"
198+
args:
199+
kv-transfer-config: &kv_transfer '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"connectors":[{"kv_connector":"NixlConnector","kv_role":"kv_both","kv_load_failure_policy":"fail","kv_buffer_device":"cuda","kv_connector_extra_config":{"enforce_handshake_compat":false,"enable_cross_layers_blocks":false}},{"kv_connector":"MooncakeStoreConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"load_async":true,"lookup_async":true,"enable_cross_layers_blocks":false,"enable_offload":false}}]}}'
200+
served-model-name: "moonshotai/Kimi-K3.1-Pro"
201+
prefix-match-unit: 128
202+
load-format: "fastsafetensors"
203+
kv-cache-dtype: "fp8"
204+
attention-config: '{"indexer_kv_dtype":"mxfp4"}'
205+
mamba-ssm-cache-dtype: "float32"
206+
mamba-cache-dtype: "float32"
207+
gpu-memory-utilization: 0.95
208+
tensor-parallel-size: 1
209+
data-parallel-size: 16
210+
data-parallel-rpc-port: 13355
211+
data-parallel-external-lb: true
212+
# The image does not pick a power-of-two attention block at TP1 by itself; pin the size, the same on prefill and decode.
213+
block-size: 16384
214+
enable-expert-parallel: true
215+
moe-backend: deep_gemm_mega_moe
216+
no-enable-flashinfer-autotune: true
217+
enable-cumem-allocator: true
218+
trust-remote-code: true
219+
max-num-seqs: 32
220+
max-num-batched-tokens: 2048
221+
# Caps each prompt's chunk so one long prompt does not fill a DP rank's step.
222+
long-prefill-token-threshold: 512
223+
long-prefill-token-threshold-adaptive: true
224+
max-cudagraph-capture-size: 2048
225+
compilation-config: '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[4,8,12,16,20,24,32,40,48,64,80,96,128,160,256,384,512,640,768,896,1024,1152,1280,1408,1536,1664,1792,1920,2048]}'
226+
stream-interval: 10
227+
language-model-only: true
228+
enable-prefix-caching: true
229+
speculative-config: &spec '{"model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
230+
decode:
231+
nodes: 4
232+
workers: 1
233+
gpus: 16
234+
env:
235+
<<: *kimi_env
236+
VLLM_ENABLE_GEMM_RS: "0"
237+
VLLM_WORKER_MULTIPROC_METHOD: "spawn"
238+
args:
239+
kv-transfer-config: *kv_transfer
240+
served-model-name: "moonshotai/Kimi-K3.1-Pro"
241+
prefix-match-unit: 128
242+
load-format: "fastsafetensors"
243+
kv-cache-dtype: "fp8"
244+
attention-config: '{"indexer_kv_dtype":"mxfp4"}'
245+
mamba-ssm-cache-dtype: "float32"
246+
mamba-cache-dtype: "float32"
247+
gpu-memory-utilization: 0.95
248+
tensor-parallel-size: 1
249+
data-parallel-size: 16
250+
data-parallel-rpc-port: 13345
251+
data-parallel-external-lb: true
252+
# The image does not pick a power-of-two attention block at TP1 by itself; pin the size, the same on prefill and decode.
253+
block-size: 16384
254+
enable-expert-parallel: true
255+
moe-backend: deep_gemm_mega_moe
256+
no-enable-flashinfer-autotune: true
257+
enable-cumem-allocator: true
258+
trust-remote-code: true
259+
stream-interval: 10
260+
language-model-only: true
261+
enable-prefix-caching: true
262+
additional-config: '{"decode_backend":"latency_specialized"}'
263+
use-replayssm: true
264+
max-num-seqs: 32
265+
max-num-batched-tokens: 160
266+
max-cudagraph-capture-size: 160
267+
compilation-config: '{"cudagraph_capture_sizes":[5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160]}'
268+
speculative-config: *spec
269+
270+
sbatch_directives:
271+
mem: "0"
272+
cpus-per-task: "144"
273+
comment: >-
274+
'{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will
275+
take extra loading time."}}'
276+
277+
srun_options:
278+
mem: "0"
279+
container-remap-root: ""
280+
281+
telemetry:
282+
collector_join_timeout_seconds: 12
283+
284+
benchmark:
285+
placement:
286+
node: head
287+
env:
288+
AIPERF_REQUIRED_SERVER_METRIC_PREFIX: "vllm:"
289+
AIPERF_HTTP_X_SESSION_ID_FROM_CORRELATION_ID: "true"
290+
291+
override_1p1d:
292+
roles:
293+
prefill:
294+
nodes: 4
295+
workers: 1
296+
297+
override_1p1d_eval:
298+
roles:
299+
prefill:
300+
nodes: 4
301+
workers: 1
302+
args:
303+
reasoning-parser: kimi_k3
304+
tool-call-parser: kimi_k3
305+
enable-auto-tool-choice: true
306+
decode:
307+
args:
308+
reasoning-parser: kimi_k3
309+
tool-call-parser: kimi_k3
310+
enable-auto-tool-choice: true
311+
312+
# c=352: explicit KV cache size per rank (the size vLLM reports it can fully use, minus 3 GiB).
313+
override_1p1d_kvb:
314+
roles:
315+
prefill:
316+
nodes: 4
317+
workers: 1
318+
args:
319+
kv-cache-memory-bytes: 61926160384
320+
decode:
321+
args:
322+
kv-cache-memory-bytes: 64475268096
323+
324+
override_1p1d_kvb_eval:
325+
roles:
326+
prefill:
327+
nodes: 4
328+
workers: 1
329+
args:
330+
kv-cache-memory-bytes: 61926160384
331+
reasoning-parser: kimi_k3
332+
tool-call-parser: kimi_k3
333+
enable-auto-tool-choice: true
334+
decode:
335+
args:
336+
kv-cache-memory-bytes: 64475268096
337+
reasoning-parser: kimi_k3
338+
tool-call-parser: kimi_k3
339+
enable-auto-tool-choice: true

0 commit comments

Comments
 (0)