Skip to content

Commit c40972b

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

3 files changed

Lines changed: 242 additions & 0 deletions

File tree

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
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+
resources:
17+
gpu_type: mi355x
18+
gpus_per_node: 8
19+
# Cold loads of the 240 GB checkpoint can take the full VLLM_ENGINE_READY_TIMEOUT_S.
20+
health_check:
21+
interval_seconds: 10
22+
max_attempts: 720
23+
environment:
24+
NCCL_SOCKET_IFNAME: '@fabric.socket-ifname'
25+
GLOO_SOCKET_IFNAME: '@fabric.socket-ifname'
26+
NCCL_IB_HCA: '@fabric.rdma-devices'
27+
NCCL_IB_GID_INDEX: '@fabric.rdma-gid-index'
28+
# Prefill and decode must hash prefix blocks alike.
29+
PYTHONHASHSEED: '42'
30+
frontend:
31+
type: vllm-router
32+
enable_multiple_frontends: false
33+
# Every turn of a conversation reaches the engines that cache its prefix.
34+
args:
35+
policy: consistent_hash
36+
prefill-policy: consistent_hash
37+
decode-policy: consistent_hash
38+
setup_script: vllm-router.sh
39+
engine:
40+
type: vllm
41+
connector: moriio
42+
roles:
43+
prefill:
44+
nodes: 1
45+
workers: 1
46+
gpus: 4
47+
args: &common_args
48+
served-model-name: amd/MiniMax-M3.1-Flash-Quark-MXFP4
49+
tensor-parallel-size: 4
50+
gpu-memory-utilization: 0.85
51+
language-model-only: true
52+
trust-remote-code: true
53+
reasoning-parser: minimax_m3
54+
tool-call-parser: minimax_m3
55+
enable-auto-tool-choice: true
56+
# MSA sparse/index cache needs 128-token blocks.
57+
block-size: 128
58+
kv-cache-dtype: nvfp4
59+
attention-config: '{"indexer_kv_dtype":"nvfp4","indexer_decode_cp":true}'
60+
moe-backend: aiter
61+
disable-hybrid-kv-cache-manager: true
62+
enable-prefix-caching: true
63+
max-model-len: 1048576
64+
disable-uvicorn-access-log: true
65+
speculative-config: '{"method":"dspark","num_speculative_tokens":7,"attention_backend":"TRITON_ATTN","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
66+
max-num-batched-tokens: 32768
67+
env: &common_env
68+
VLLM_ROCM_USE_AITER: '1'
69+
VLLM_ROCM_USE_AITER_MOE: '1'
70+
VLLM_ROCM_USE_AITER_FUSION_SHARED_EXPERTS: '0'
71+
VLLM_USE_V2_MODEL_RUNNER: '1'
72+
DEBUG_HIP_DYNAMIC_QUEUES: '0'
73+
VLLM_ROCM_MINIMAX_M3_MONO_DRAFTER: '1'
74+
VLLM_ROCM_PARALLEL_INDEX_TOPK: '1'
75+
VLLM_USE_RUST_FRONTEND: '1'
76+
VLLM_ROCM_USE_SKINNY_GEMM: '0'
77+
HIP_FORCE_DEV_KERNARG: '1'
78+
NCCL_DMABUF_ENABLE: '0'
79+
HSA_ENABLE_IPC_MODE_LEGACY: '1'
80+
PYTHONNOUSERSITE: '1'
81+
PYTHONUNBUFFERED: '1'
82+
AITER_LOG_LEVEL: WARNING
83+
VLLM_ENGINE_READY_TIMEOUT_S: '7200'
84+
VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS: '1200'
85+
# Outlast the router's pooled-connection idle gaps.
86+
VLLM_HTTP_TIMEOUT_KEEP_ALIVE: '3600'
87+
# Bound RDMA queue resources and the wait for a free send slot.
88+
MORI_IO_SQ_BACKOFF_TIMEOUT_US: '1000000'
89+
MORI_IO_QP_MAX_SEND_WR: '16384'
90+
MORI_IO_QP_MAX_CQE: '32768'
91+
MORI_IO_QP_MAX_SGE: '2'
92+
MORI_IO_TC_DISABLE: '0'
93+
ROCPROFILER_REGISTER_ENABLED: '0'
94+
decode:
95+
nodes: 1
96+
workers: 2
97+
gpus: 4
98+
args:
99+
<<: *common_args
100+
max-num-batched-tokens: 8192
101+
# WRITE: decode allocates first and prefill pushes; four QPs per transfer, since
102+
# one overflows its 16384-WR send queue on a ~230K-token prompt.
103+
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}}'
104+
env: *common_env
105+
sbatch_directives:
106+
cpus-per-task: "128"
107+
mem: "0"
108+
srun_options:
109+
mem: "0"
110+
container-writable: ""
111+
container-remap-root: ""
112+
benchmark:
113+
placement:
114+
node: head
115+
env:
116+
AIPERF_REQUIRED_SERVER_METRIC_PREFIX: 'vllm:'
117+
118+
# Prefill admits 2x CONC and holds the host KV tier: 1349 GB at c40-c64 and 1499 GB at
119+
# c72-c80, the prefill's dram-utilization share (0.9, 1.0) of its node. Each decode
120+
# engine caps its batch; its graphs cover that batch x (1 + 7 draft tokens).
121+
override_c40:
122+
roles:
123+
prefill:
124+
args:
125+
max-num-seqs: 80
126+
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}}]}}'
127+
decode:
128+
args:
129+
max-num-seqs: 10
130+
compilation-config: '{"cudagraph_capture_sizes":[8,16,24,32,40,48,56,64,72,80],"max_cudagraph_capture_size":80}'
131+
132+
override_c48:
133+
roles:
134+
prefill:
135+
args:
136+
max-num-seqs: 96
137+
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}}]}}'
138+
decode:
139+
args:
140+
max-num-seqs: 12
141+
compilation-config: '{"cudagraph_capture_sizes":[8,16,24,32,40,48,56,64,72,80,88,96],"max_cudagraph_capture_size":96}'
142+
143+
override_c64:
144+
roles:
145+
prefill:
146+
args:
147+
max-num-seqs: 128
148+
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}}]}}'
149+
decode:
150+
args:
151+
max-num-seqs: 16
152+
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}'
153+
154+
override_c72:
155+
roles:
156+
prefill:
157+
args:
158+
max-num-seqs: 144
159+
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}}]}}'
160+
decode:
161+
args:
162+
max-num-seqs: 18
163+
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}'
164+
165+
override_c80:
166+
roles:
167+
prefill:
168+
args:
169+
max-num-seqs: 160
170+
# Without the cap, prompts queue behind long prefills and TTFT p90 reaches 5.3 s.
171+
long-prefill-token-threshold: 4096
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: 20
176+
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
@@ -12775,3 +12775,11 @@
1277512775
- "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."
1277612776
- "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."
1277712777
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4871
12778+
12779+
- config-keys:
12780+
- minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg
12781+
scenario-type: [agentic-coding]
12782+
description:
12783+
- "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."
12784+
- "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)."
12785+
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4973

0 commit comments

Comments
 (0)