Skip to content

Commit 2142ec4

Browse files
whx-sjtucursoragent
andcommitted
feat(minimaxm31flash): add MI355X vLLM PD-disaggregated MoRI-IO AgentX
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0c3f1e2 commit 2142ec4

3 files changed

Lines changed: 255 additions & 0 deletions

File tree

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# MiniMax-M3.1-Flash AgentX on MI355X with vLLM PD disaggregation: TP4 prefill and
2+
# decode engines exchange KV over MoRI-IO RDMA WRITE behind vllm-router with
3+
# consistent-hash routing. Follows the mi355x_agentx_pd preset of
4+
# https://recipes.vllm.ai/MiniMaxAI/MiniMax-M3.1-Flash (vllm-project/recipes in
5+
# vllm-project/vllm#66268). Checkpoint, DSpark and caches as in the single-node MI355X
6+
# lane; prefill runs without DBO.
7+
schema: 2
8+
9+
base:
10+
name: minimaxm31flash-fp4-mi355x-vllm-disagg-agentic
11+
identity:
12+
model: {}
13+
container: {}
14+
slurm:
15+
time_limit: "08:00:00"
16+
container_mounts:
17+
/dev/infiniband: /dev/infiniband
18+
extra_mount:
19+
# The image has no Ionic verbs provider; libibverbs loads the host's only through its driver entry.
20+
- /usr/lib/x86_64-linux-gnu/libibverbs/libionic-rdmav34.so:/usr/lib/x86_64-linux-gnu/libibverbs/libionic-rdmav34.so:ro
21+
- /etc/libibverbs.d/ionic.driver:/etc/libibverbs.d/ionic.driver:ro
22+
resources:
23+
gpu_type: mi355x
24+
gpus_per_node: 8
25+
# Cold loads of the 240 GB checkpoint can take the full VLLM_ENGINE_READY_TIMEOUT_S.
26+
health_check:
27+
interval_seconds: 10
28+
max_attempts: 720
29+
environment:
30+
NCCL_SOCKET_IFNAME: '@fabric.socket-ifname'
31+
GLOO_SOCKET_IFNAME: '@fabric.socket-ifname'
32+
NCCL_IB_HCA: '@fabric.rdma-devices'
33+
NCCL_IB_GID_INDEX: '@fabric.rdma-gid-index'
34+
# Prefill and decode must hash prefix blocks alike.
35+
PYTHONHASHSEED: '42'
36+
frontend:
37+
type: vllm-router
38+
enable_multiple_frontends: false
39+
# Every turn of a conversation reaches the engines that cache its prefix.
40+
args:
41+
policy: consistent_hash
42+
prefill-policy: consistent_hash
43+
decode-policy: consistent_hash
44+
setup_script: vllm-router.sh
45+
observability:
46+
enabled: false
47+
tachometer:
48+
enabled: false
49+
engine:
50+
type: vllm
51+
connector: moriio
52+
# Each engine sees only its own four GPUs, as in the validated runs, instead of all
53+
# eight plus --device-ids.
54+
set_visible_devices: true
55+
roles:
56+
prefill:
57+
nodes: 1
58+
workers: 1
59+
gpus: 4
60+
args: &common_args
61+
served-model-name: amd/MiniMax-M3.1-Flash-Quark-MXFP4
62+
tensor-parallel-size: 4
63+
gpu-memory-utilization: 0.85
64+
language-model-only: true
65+
trust-remote-code: true
66+
reasoning-parser: minimax_m3
67+
tool-call-parser: minimax_m3
68+
enable-auto-tool-choice: true
69+
# MSA sparse/index cache needs 128-token blocks.
70+
block-size: 128
71+
kv-cache-dtype: nvfp4
72+
attention-config: '{"indexer_kv_dtype":"nvfp4","indexer_decode_cp":true}'
73+
moe-backend: aiter
74+
disable-hybrid-kv-cache-manager: true
75+
enable-prefix-caching: true
76+
max-model-len: 1048576
77+
disable-uvicorn-access-log: true
78+
speculative-config: '{"method":"dspark","num_speculative_tokens":7,"attention_backend":"TRITON_ATTN","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
79+
max-num-batched-tokens: 32768
80+
env: &common_env
81+
VLLM_ROCM_USE_AITER: '1'
82+
VLLM_ROCM_USE_AITER_MOE: '1'
83+
VLLM_ROCM_USE_AITER_FUSION_SHARED_EXPERTS: '0'
84+
VLLM_USE_V2_MODEL_RUNNER: '1'
85+
DEBUG_HIP_DYNAMIC_QUEUES: '0'
86+
VLLM_ROCM_MINIMAX_M3_MONO_DRAFTER: '1'
87+
VLLM_ROCM_PARALLEL_INDEX_TOPK: '1'
88+
VLLM_USE_RUST_FRONTEND: '1'
89+
VLLM_ROCM_USE_SKINNY_GEMM: '0'
90+
HIP_FORCE_DEV_KERNARG: '1'
91+
NCCL_DMABUF_ENABLE: '0'
92+
HSA_ENABLE_IPC_MODE_LEGACY: '1'
93+
PYTHONNOUSERSITE: '1'
94+
PYTHONUNBUFFERED: '1'
95+
AITER_LOG_LEVEL: WARNING
96+
VLLM_ENGINE_READY_TIMEOUT_S: '7200'
97+
VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS: '1200'
98+
# Outlast the router's pooled-connection idle gaps.
99+
VLLM_HTTP_TIMEOUT_KEEP_ALIVE: '3600'
100+
# Bound RDMA queue resources and the wait for a free send slot.
101+
MORI_IO_SQ_BACKOFF_TIMEOUT_US: '1000000'
102+
MORI_IO_QP_MAX_SEND_WR: '16384'
103+
MORI_IO_QP_MAX_CQE: '32768'
104+
MORI_IO_QP_MAX_SGE: '2'
105+
MORI_IO_TC_DISABLE: '0'
106+
ROCPROFILER_REGISTER_ENABLED: '0'
107+
decode:
108+
nodes: 1
109+
workers: 2
110+
gpus: 4
111+
args:
112+
<<: *common_args
113+
max-num-batched-tokens: 8192
114+
# WRITE: decode allocates first and prefill pushes; four QPs per transfer, since
115+
# one overflows its 16384-WR send queue on a ~230K-token prompt.
116+
kv-transfer-config: '{"kv_connector":"MoRIIOConnector","kv_role":"kv_consumer","kv_connector_extra_config":{"backend":"rdma","num_workers":4,"qp_per_transfer":4,"read_mode":false}}'
117+
env: *common_env
118+
sbatch_directives:
119+
cpus-per-task: "128"
120+
mem: "0"
121+
srun_options:
122+
mem: "0"
123+
container-writable: ""
124+
container-remap-root: ""
125+
benchmark:
126+
placement:
127+
node: head
128+
env:
129+
AIPERF_REQUIRED_SERVER_METRIC_PREFIX: 'vllm:'
130+
131+
# Prefill admits 2x CONC and holds the host KV tier: 1349 GB at c40-c64 and 1499 GB at
132+
# c72-c80, the prefill's dram-utilization share (0.9, 1.0) of its node. Each decode
133+
# engine caps its batch; its graphs cover that batch x (1 + 7 draft tokens).
134+
override_c40:
135+
roles:
136+
prefill:
137+
args:
138+
max-num-seqs: 80
139+
kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_connector_extra_config":{"connectors":[{"kv_connector":"MoRIIOConnector","kv_role":"kv_producer","kv_connector_extra_config":{"backend":"rdma","num_workers":4,"qp_per_transfer":4,"read_mode":false}},{"kv_connector":"SimpleCPUOffloadConnector","kv_role":"kv_both","kv_connector_extra_config":{"cpu_bytes_to_use":1349000000000,"lazy_offload":false}}]}}'
140+
decode:
141+
args:
142+
max-num-seqs: 10
143+
compilation-config: '{"cudagraph_capture_sizes":[8,16,24,32,40,48,56,64,72,80],"max_cudagraph_capture_size":80}'
144+
145+
override_c48:
146+
roles:
147+
prefill:
148+
args:
149+
max-num-seqs: 96
150+
kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_connector_extra_config":{"connectors":[{"kv_connector":"MoRIIOConnector","kv_role":"kv_producer","kv_connector_extra_config":{"backend":"rdma","num_workers":4,"qp_per_transfer":4,"read_mode":false}},{"kv_connector":"SimpleCPUOffloadConnector","kv_role":"kv_both","kv_connector_extra_config":{"cpu_bytes_to_use":1349000000000,"lazy_offload":false}}]}}'
151+
decode:
152+
args:
153+
max-num-seqs: 12
154+
compilation-config: '{"cudagraph_capture_sizes":[8,16,24,32,40,48,56,64,72,80,88,96],"max_cudagraph_capture_size":96}'
155+
156+
override_c64:
157+
roles:
158+
prefill:
159+
args:
160+
max-num-seqs: 128
161+
kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_connector_extra_config":{"connectors":[{"kv_connector":"MoRIIOConnector","kv_role":"kv_producer","kv_connector_extra_config":{"backend":"rdma","num_workers":4,"qp_per_transfer":4,"read_mode":false}},{"kv_connector":"SimpleCPUOffloadConnector","kv_role":"kv_both","kv_connector_extra_config":{"cpu_bytes_to_use":1349000000000,"lazy_offload":false}}]}}'
162+
decode:
163+
args:
164+
max-num-seqs: 16
165+
compilation-config: '{"cudagraph_capture_sizes":[8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128],"max_cudagraph_capture_size":128}'
166+
167+
override_c72:
168+
roles:
169+
prefill:
170+
args:
171+
max-num-seqs: 144
172+
kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_connector_extra_config":{"connectors":[{"kv_connector":"MoRIIOConnector","kv_role":"kv_producer","kv_connector_extra_config":{"backend":"rdma","num_workers":4,"qp_per_transfer":4,"read_mode":false}},{"kv_connector":"SimpleCPUOffloadConnector","kv_role":"kv_both","kv_connector_extra_config":{"cpu_bytes_to_use":1499000000000,"lazy_offload":false}}]}}'
173+
decode:
174+
args:
175+
max-num-seqs: 18
176+
compilation-config: '{"cudagraph_capture_sizes":[8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144],"max_cudagraph_capture_size":144}'
177+
178+
override_c80:
179+
roles:
180+
prefill:
181+
args:
182+
max-num-seqs: 160
183+
# Without the cap, prompts queue behind long prefills and TTFT p90 reaches 5.3 s.
184+
long-prefill-token-threshold: 4096
185+
kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_connector_extra_config":{"connectors":[{"kv_connector":"MoRIIOConnector","kv_role":"kv_producer","kv_connector_extra_config":{"backend":"rdma","num_workers":4,"qp_per_transfer":4,"read_mode":false}},{"kv_connector":"SimpleCPUOffloadConnector","kv_role":"kv_both","kv_connector_extra_config":{"cpu_bytes_to_use":1499000000000,"lazy_offload":false}}]}}'
186+
decode:
187+
args:
188+
max-num-seqs: 20
189+
compilation-config: '{"cudagraph_capture_sizes":[8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144,152,160],"max_cudagraph_capture_size":160}'

‎inferencex-e2e/configs/amd-master.yaml‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,64 @@ minimaxm31flash-fp4-mi355x-vllm-agentic-dspark:
973973
- { tp: 4, kv-offloading: none, spec-decoding: mtp, conc-list: [1, 2, 4, 8, 16, 32], srt-recipe: agentic.yaml }
974974
- { tp: 4, kv-offloading: dram, kv-offload-backend: { name: vllm-simple }, spec-decoding: mtp, conc-list: [64], srt-recipe: agentic.yaml:override_tp4_dspark3_c64_offload }
975975

976+
# MiniMax-M3.1-Flash AgentX on MI355X with vLLM PD disaggregation over MoRI-IO RDMA WRITE
977+
# behind vllm-router: the mi355x_agentx_pd preset of https://recipes.vllm.ai/MiniMaxAI/MiniMax-M3.1-Flash
978+
# on the single-node lane's checkpoint, DSpark and caches. Host KV offload runs on the
979+
# prefill engine only.
980+
minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg:
981+
image: vllm/vllm-openai-rocm:nightly-96710245ece8fe57a0df3ea18cdc79cbb8ce93cf@sha256:6eeac5c66fa566c8f44f79528df9db5eaadff6cc4afb76ad583fedfd5b64e51b
982+
model: amd/MiniMax-M3.1-Flash-Quark-MXFP4
983+
model-prefix: minimaxm31flash
984+
runner: cluster:mi355x-amds
985+
precision: fp4
986+
framework: vllm
987+
router: { name: vllm-router, version: "0.1.16" }
988+
kv-p2p-transfer: moriio
989+
multinode: true
990+
disagg: true
991+
srt-recipe-dir: minimaxm31flash/vllm/mi355x-fp4/agentx
992+
scenarios:
993+
agentic-coding:
994+
- dram-utilization: 0.9
995+
search-space:
996+
- spec-decoding: mtp
997+
kv-offloading: dram
998+
kv-offload-backend: { name: vllm-simple }
999+
conc-list: [40]
1000+
srt-recipe: disagg-variants.yaml:override_c40
1001+
prefill: { num-worker: 1, tp: 4, ep: 1, dp-attn: false }
1002+
decode: { num-worker: 2, tp: 4, ep: 1, dp-attn: false }
1003+
- spec-decoding: mtp
1004+
kv-offloading: dram
1005+
kv-offload-backend: { name: vllm-simple }
1006+
conc-list: [48]
1007+
srt-recipe: disagg-variants.yaml:override_c48
1008+
prefill: { num-worker: 1, tp: 4, ep: 1, dp-attn: false }
1009+
decode: { num-worker: 2, tp: 4, ep: 1, dp-attn: false }
1010+
- spec-decoding: mtp
1011+
kv-offloading: dram
1012+
kv-offload-backend: { name: vllm-simple }
1013+
conc-list: [64]
1014+
srt-recipe: disagg-variants.yaml:override_c64
1015+
prefill: { num-worker: 1, tp: 4, ep: 1, dp-attn: false }
1016+
decode: { num-worker: 2, tp: 4, ep: 1, dp-attn: false }
1017+
- dram-utilization: 1.0
1018+
search-space:
1019+
- spec-decoding: mtp
1020+
kv-offloading: dram
1021+
kv-offload-backend: { name: vllm-simple }
1022+
conc-list: [72]
1023+
srt-recipe: disagg-variants.yaml:override_c72
1024+
prefill: { num-worker: 1, tp: 4, ep: 1, dp-attn: false }
1025+
decode: { num-worker: 2, tp: 4, ep: 1, dp-attn: false }
1026+
- spec-decoding: mtp
1027+
kv-offloading: dram
1028+
kv-offload-backend: { name: vllm-simple }
1029+
conc-list: [80]
1030+
srt-recipe: disagg-variants.yaml:override_c80
1031+
prefill: { num-worker: 1, tp: 4, ep: 1, dp-attn: false }
1032+
decode: { num-worker: 2, tp: 4, ep: 1, dp-attn: false }
1033+
9761034
kimik3.1-fp4-mi355x-vllm-agentic-dspark:
9771035
image: vllm/vllm-openai-rocm:kimi-k31-d73dd529@sha256:5b54f223a150a9baad41a5d511e159e7cbf43e308c6cd44ad3f6a2463c245b3c
9781036
model: moonshotai/Kimi-K3.1-Pro

‎inferencex-e2e/perf-changelog.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12785,3 +12785,11 @@
1278512785
- "Concurrency 12 and 24: CUDA graphs also for prefill and mixed steps up to 4096 tokens (#4878 recipe without the TEP shared-expert variable); DSpark drafts 3 tokens; prefill-schedule-interval 8."
1278612786
- "Concurrency 48 and 64: EP8 MegaMoE with FULL_DECODE_ONLY graphs, max-num-batched-tokens 16384, prefill-schedule-interval 8 and gpu-memory-utilization 0.97."
1278712787
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4871
12788+
12789+
- config-keys:
12790+
- minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg
12791+
scenario-type: [agentic-coding]
12792+
description:
12793+
- "Add MiniMax-M3.1-Flash PD-disaggregated AgentX on MI355X with vLLM: TP4 prefill and decode engines moving KV over MoRI-IO RDMA WRITE behind vllm-router 0.1.16 with consistent-hash routing, at concurrency 40, 48, 64, 72 and 80. Seven-token DSpark, NVFP4 KV and indexer caches, and a host KV tier on the prefill engine (1349 GB at c40-c64, 1499 GB at c72-c80). At c80 the prefill schedules at most 4096 tokens of a prompt per step."
12794+
- "Use vllm/vllm-openai-rocm:nightly-96710245ece8fe57a0df3ea18cdc79cbb8ce93cf, which includes vllm-project/vllm#65822 (MoRI-IO WRITE skips the blocks the decoder's prefix cache already holds)."
12795+
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4973

0 commit comments

Comments
 (0)