diff --git a/.github/configs/amd-master.yaml b/.github/configs/amd-master.yaml index 2528798b1..f18b3f94e 100644 --- a/.github/configs/amd-master.yaml +++ b/.github/configs/amd-master.yaml @@ -2871,3 +2871,33 @@ minimaxm3-fp8-mi300x-vllm: search-space: - { tp: 8, conc-start: 4, conc-end: 64 } - { tp: 8, ep: 8, conc-start: 128, conc-end: 256 } + +# EAGLE3 speculative-decoding (spec-decoding: mtp) variant of +# minimaxm3-fp8-mi300x-vllm, pairing MiniMaxAI/MiniMax-M3-MXFP8 with the +# Inferact/MiniMax-M3-EAGLE3 draft head (3 speculative tokens). Same TP8-only +# search space as the non-MTP MI300X entry (gfx942 192 GB is memory-tight, like +# H100), with the TP8 latency rows started at conc 1 to capture single-request +# latency — matching the H100/MI355X MTP recipes. The shipped ROCm image lacks +# SupportsEagle3 on the AMD MiniMax-M3 model, so the recipe applies that fix +# in-place at runtime (functionstackx/vllm#1, upstream vllm-project/vllm#45546; +# validated green on MI355X) before serving. +minimaxm3-fp8-mi300x-vllm-mtp: + image: vllm/vllm-openai-rocm:minimax-m3 + model: MiniMaxAI/MiniMax-M3-MXFP8 + model-prefix: minimaxm3 + runner: mi300x + precision: fp8 + framework: vllm + multinode: false + scenarios: + fixed-seq-len: + - isl: 1024 + osl: 1024 + search-space: + - { tp: 8, conc-start: 1, conc-end: 128, spec-decoding: mtp } + - { tp: 8, ep: 8, conc-start: 256, conc-end: 256, spec-decoding: mtp } + - isl: 8192 + osl: 1024 + search-space: + - { tp: 8, conc-start: 1, conc-end: 64, spec-decoding: mtp } + - { tp: 8, ep: 8, conc-start: 128, conc-end: 256, spec-decoding: mtp } diff --git a/.github/configs/nvidia-master.yaml b/.github/configs/nvidia-master.yaml index 2b2848714..46772c123 100644 --- a/.github/configs/nvidia-master.yaml +++ b/.github/configs/nvidia-master.yaml @@ -11773,6 +11773,101 @@ minimaxm2.5-fp8-gb300-dynamo-vllm: ep: 4 dp-attn: true +# MiniMax-M3 GB300 full sweep — safetensors-load-strategy removed from all +# GB300 recipes (host-memory OOM with prefetch on CW Grace Blackwell nodes). +# srun_options mem=0 required (DefMemPerCPU=4096 cgroup limit). +minimaxm3-fp8-gb300-dynamo-vllm: + image: vllm/vllm-openai:minimax-m3 + model: MiniMaxAI/MiniMax-M3-MXFP8 + model-prefix: minimaxm3 + runner: gb300-cw + precision: fp8 + framework: dynamo-vllm + multinode: true + disagg: true + scenarios: + fixed-seq-len: + - isl: 1024 + osl: 1024 + search-space: + # Disagg-only. Every recipe enables NixlConnector KV transfer over + # multi-node NVLink (UCX_CUDA_IPC_ENABLE_MNNVL=y + --enable-cumem-allocator), + # which moved the cross-node prefill->decode KV handoff off the RDMA/TCP + # fallback (~268 MB/s) onto the NVL fabric (~1.4-1.7 GB/s): +17/+23/+49% + # out tok/s/gpu @ conc 64/128/256 (1P1D). GB300-only win — B300's 8-GPU + # IB islands cannot move KV over multi-node NVLink. GB300-cw is 4 GPU/node, + # so prefill and decode each take whole 4-GPU nodes (no 8-GPU collocation). + # 1P+1D TP4+EP4 split, 2 nodes (8 GPU). Best per-GPU efficiency: + # peaks at ~1646 out/s/gpu @ conc 256 (1k1k). Covers latency-to-mid. + - conc-list: [8, 16, 32, 64, 128, 256, 512] + prefill: + num-worker: 1 + tp: 4 + ep: 4 + dp-attn: false + additional-settings: + - "CONFIG_FILE=recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml" + decode: + num-worker: 1 + tp: 4 + ep: 4 + dp-attn: false + + # Rack-saturating max throughput: 5 prefill + 12 decode, TP4 ep1 (17 nodes). + # Balanced prefill:decode ratio (single prefill starved the decode pool) + # + TP-only decode (Qwen3.5-A17B pattern; M3 wide-EP all-to-all was slower). + - conc-list: [2048, 4096, 8192] + prefill: + num-worker: 5 + tp: 4 + ep: 1 + dp-attn: false + additional-settings: + - "CONFIG_FILE=recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-5p12d-tp4ep1-17n.yaml" + decode: + num-worker: 12 + tp: 4 + ep: 1 + dp-attn: false + + - isl: 8192 + osl: 1024 + search-space: + # 8k1k long context: prefill is heavier and KV is larger, so concurrency + # is lower than 1k1k. Same disagg shapes + multi-node-NVLink KV transfer. + # 1P+1D TP4+EP4 split, 2 nodes (8 GPU). Best per-GPU efficiency: + # peaks at ~1209 out/s/gpu @ conc 256 (8k1k). Covers latency-to-mid. + - conc-list: [8, 16, 32, 64, 128, 256] + prefill: + num-worker: 1 + tp: 4 + ep: 4 + dp-attn: false + additional-settings: + - "CONFIG_FILE=recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml" + decode: + num-worker: 1 + tp: 4 + ep: 4 + dp-attn: false + + # Prefill-heavy rack-saturating: 10P + 7D, TP4 ep1 (17 nodes). + # At 8k context, prefill is 8x heavier — 5P:12D showed 616-req prefill + # backlog. DSR1/DSV4 GB300 patterns use 6-10 prefill workers for 8k1k. + - conc-list: [1024, 2048, 4096] + prefill: + num-worker: 10 + tp: 4 + ep: 1 + dp-attn: false + additional-settings: + - "CONFIG_FILE=recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-10p7d-tp4ep1-17n.yaml" + decode: + num-worker: 7 + tp: 4 + ep: 1 + dp-attn: false + # MiniMax-M3 day-zero (https://recipes.vllm.ai/MiniMaxAI/MiniMax-M3). # 427B total / 26B active MoE with MSA sparse attention; MXFP8 checkpoint # (MiniMaxAI/MiniMax-M3-MXFP8, ~444 GB) quantized by NVIDIA — native MX tensor diff --git a/.github/workflows/benchmark-multinode-tmpl.yml b/.github/workflows/benchmark-multinode-tmpl.yml index 81727ef39..85b399e6c 100644 --- a/.github/workflows/benchmark-multinode-tmpl.yml +++ b/.github/workflows/benchmark-multinode-tmpl.yml @@ -123,6 +123,11 @@ on: env: RANDOM_RANGE_RATIO: 0.8 + # Day-zero models resolved via hf: ids download from the Hub inside the + # slurm job (srtctl pre-download + dynamo hub fetch). Anonymous requests + # get 429-rate-limited when several workers pull a 444 GB snapshot at + # once; sbatch/srun inherit this env so the token reaches the workers. + HF_TOKEN: ${{ secrets.INFERENCEX_OFFICIAL_RO_HF_TOKEN }} EXP_NAME: ${{ inputs.exp-name }} IMAGE: ${{ inputs.image }} MODEL_PREFIX: ${{ inputs.model-prefix }} diff --git a/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml new file mode 100644 index 000000000..8e13b522f --- /dev/null +++ b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml @@ -0,0 +1,126 @@ +name: "minimax-m3-vllm-disagg-gb300-1p1d-tp4ep4-2n-1k1k" + +# MiniMax-M3 disaggregated 1P+1D recipe for GB300, 2 nodes. +# 1 node prefill (4 GPUs, TP4+EP4) → NixlConnector → 1 node decode (4 GPUs, TP4+EP4). +# --block-size 128 is mandatory (MSA sparse/index cache alignment). +# safetensors-load-strategy omitted — prefetch OOMs on CW GB300 host memory. + +model: + path: "hf:MiniMaxAI/MiniMax-M3-MXFP8" + container: "vllm/vllm-openai:minimax-m3" + precision: "fp8" + +dynamo: + install: true + wheel: "1.2.0.dev20260526" + +# CW gb300 has no per-GPU Slurm defaults: without sbatch-level mem=0 the +# job allocation is ntasks x DefMemPerCPU = 4 GB/node and worker cgroups +# OOM-kill during engine init; srun_options.mem=0 alone only grants a +# step what the job already holds. cpus-per-task=72 (one NUMA socket) +# keeps the gpu-less infra step (etcd/nats) off the 1-CPU default. +# Full rationale: vllm/deepseek-v4/agentic/disagg-gb300-1p6d-dep4-tp4-agentic.yaml. +sbatch_directives: + mem: "0" + cpus-per-task: "72" +srun_options: + mem: "0" + +slurm: + time_limit: "8:00:00" + +health_check: + max_attempts: 720 + interval_seconds: 10 + +extra_mount: + - "__M3_HF_HOME__:__M3_HF_HOME__" + +resources: + gpu_type: "gb300" + gpus_per_node: 4 + prefill_nodes: 1 + decode_nodes: 1 + prefill_workers: 1 + decode_workers: 1 + gpus_per_prefill: 4 + gpus_per_decode: 4 + +frontend: + type: dynamo + enable_multiple_frontends: false + +backend: + type: vllm + connector: null + + prefill_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + # Cache-only at runtime: the launcher pre-stages the full snapshot and + # verifies it offline before submit, so workers must NOT re-fetch. Without + # this, dynamo fetch_model takes a per-blob .lock on the shared NFS cache; + # co-fetching workers (e.g. both nodes of a TP8-2n job) collide and the + # loser dies with "Lock acquisition failed" (no retry like Python hf_hub). + HF_HUB_OFFLINE: "1" + # Multi-node-NVLink KV transfer: keep cross-node prefill->decode KV on the + # NVL fabric (5-6x vs RDMA/TCP fallback, +17-49% tok/s/gpu). Needs VMM- + # registered KV (enable-cumem-allocator below). + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + decode_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + # Cache-only at runtime: the launcher pre-stages the full snapshot and + # verifies it offline before submit, so workers must NOT re-fetch. Without + # this, dynamo fetch_model takes a per-blob .lock on the shared NFS cache; + # co-fetching workers (e.g. both nodes of a TP8-2n job) collide and the + # loser dies with "Lock acquisition failed" (no retry like Python hf_hub). + HF_HUB_OFFLINE: "1" + # Multi-node-NVLink KV transfer: keep cross-node prefill->decode KV on the + # NVL fabric (5-6x vs RDMA/TCP fallback, +17-49% tok/s/gpu). Needs VMM- + # registered KV (enable-cumem-allocator below). + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + vllm_config: + prefill: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-expert-parallel: true + enable-cumem-allocator: true + enforce-eager: true + max-model-len: 2304 + max-num-seqs: 16 + max-num-batched-tokens: 16384 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + + decode: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-expert-parallel: true + enable-cumem-allocator: true + max-model-len: 2304 + max-num-seqs: 256 + max-num-batched-tokens: 256 + max-cudagraph-capture-size: 512 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + +benchmark: + type: "sa-bench" + isl: 1024 + osl: 1024 + concurrencies: "64x128x256x512" diff --git a/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-5p12d-tp4ep1-17n.yaml b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-5p12d-tp4ep1-17n.yaml new file mode 100644 index 000000000..eb39f71f9 --- /dev/null +++ b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/1k1k/disagg-gb300-5p12d-tp4ep1-17n.yaml @@ -0,0 +1,102 @@ +name: "minimax-m3-vllm-disagg-gb300-5p12d-tp4ep1-1k1k" + +# MiniMax-M3 GB300 max-throughput disagg, rack-saturating (17 nodes / 68 GPU). +# Lessons baked in (validated on gb300-cw): (1) TP-only decode (ep1, NO expert +# parallelism) per Qwen3.5-397B-A17B recipes — M3's MoE all-to-all overhead +# made wide-EP/DP-attention slower; (2) PREFILL is the bottleneck, not decode +# or KV transfer — a single prefill starved 64 decode GPUs (3967 reqs queued), +# so this balances 5 prefill : 12 decode TP4 workers (prefill backlog -> 0, +# +57% tok/s/gpu vs the 1-prefill ratio at conc 2048). NixlConnector KV +# transfer stays on multi-node NVLink (MNNVL + cumem). --block-size 128 +# mandatory (MSA cache); text-only -> language-model-only. + +model: + path: "hf:MiniMaxAI/MiniMax-M3-MXFP8" + container: "vllm/vllm-openai:minimax-m3" + precision: "fp8" +dynamo: + install: true + wheel: "1.2.0.dev20260526" +sbatch_directives: + mem: "0" + cpus-per-task: "72" +srun_options: + mem: "0" +slurm: + time_limit: "8:00:00" +health_check: + max_attempts: 720 + interval_seconds: 10 +extra_mount: + - "__M3_HF_HOME__:__M3_HF_HOME__" + +resources: + gpu_type: "gb300" + gpus_per_node: 4 + prefill_nodes: 5 + decode_nodes: 12 + prefill_workers: 5 + decode_workers: 12 + gpus_per_prefill: 4 + gpus_per_decode: 4 + +frontend: + type: dynamo + enable_multiple_frontends: false + +backend: + type: vllm + connector: null + + prefill_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + HF_HUB_OFFLINE: "1" + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + decode_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + HF_HUB_OFFLINE: "1" + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + vllm_config: + prefill: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-cumem-allocator: true + enforce-eager: true + max-num-seqs: 16 + max-num-batched-tokens: 16384 + max-model-len: 2304 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + + decode: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-cumem-allocator: true + max-num-seqs: 256 + max-num-batched-tokens: 256 + max-cudagraph-capture-size: 512 + max-model-len: 2304 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + +benchmark: + type: "sa-bench" + isl: 1024 + osl: 1024 + concurrencies: "2048x4096x8192" diff --git a/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-10p7d-tp4ep1-17n.yaml b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-10p7d-tp4ep1-17n.yaml new file mode 100644 index 000000000..f005aa6dc --- /dev/null +++ b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-10p7d-tp4ep1-17n.yaml @@ -0,0 +1,99 @@ +name: "minimax-m3-vllm-disagg-gb300-10p7d-tp4ep1-8k1k" + +# MiniMax-M3 GB300 prefill-heavy max-throughput disagg, 17 nodes / 68 GPU. +# At 8k context, prefill is 8x heavier per request: the 5P:12D ratio (tuned +# for light 1k1k prefill) is prefill-bound — 616 reqs queued behind 5 workers. +# This config rebalances to 10P:7D per DSR1/DSV4 GB300 patterns (DSR1 8k1k +# uses 6P:1D; DSV4 uses 10P:8D at 18 nodes). TP4 ep1 decode (no wide EP — +# M3's MoE all-to-all overhead makes it slower). MNNVL KV + cumem. + +model: + path: "hf:MiniMaxAI/MiniMax-M3-MXFP8" + container: "vllm/vllm-openai:minimax-m3" + precision: "fp8" +dynamo: + install: true + wheel: "1.2.0.dev20260526" +sbatch_directives: + mem: "0" + cpus-per-task: "72" +srun_options: + mem: "0" +slurm: + time_limit: "8:00:00" +health_check: + max_attempts: 720 + interval_seconds: 10 +extra_mount: + - "__M3_HF_HOME__:__M3_HF_HOME__" + +resources: + gpu_type: "gb300" + gpus_per_node: 4 + prefill_nodes: 10 + decode_nodes: 7 + prefill_workers: 10 + decode_workers: 7 + gpus_per_prefill: 4 + gpus_per_decode: 4 + +frontend: + type: dynamo + enable_multiple_frontends: false + +backend: + type: vllm + connector: null + + prefill_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + HF_HUB_OFFLINE: "1" + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + decode_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + HF_HUB_OFFLINE: "1" + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + vllm_config: + prefill: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-cumem-allocator: true + enforce-eager: true + max-num-seqs: 16 + max-num-batched-tokens: 16384 + max-model-len: 9472 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + + decode: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-cumem-allocator: true + max-num-seqs: 256 + max-num-batched-tokens: 256 + max-cudagraph-capture-size: 512 + max-model-len: 9472 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + +benchmark: + type: "sa-bench" + isl: 8192 + osl: 1024 + concurrencies: "1024x2048x4096" diff --git a/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml new file mode 100644 index 000000000..1e0d67e3c --- /dev/null +++ b/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8/8k1k/disagg-gb300-1p1d-tp4ep4-2n.yaml @@ -0,0 +1,126 @@ +name: "minimax-m3-vllm-disagg-gb300-1p1d-tp4ep4-2n-8k1k" + +# MiniMax-M3 disaggregated 1P+1D recipe for GB300, 2 nodes. +# 1 node prefill (4 GPUs, TP4+EP4) → NixlConnector → 1 node decode (4 GPUs, TP4+EP4). +# --block-size 128 is mandatory (MSA sparse/index cache alignment). +# safetensors-load-strategy omitted — prefetch OOMs on CW GB300 host memory. + +model: + path: "hf:MiniMaxAI/MiniMax-M3-MXFP8" + container: "vllm/vllm-openai:minimax-m3" + precision: "fp8" + +dynamo: + install: true + wheel: "1.2.0.dev20260526" + +# CW gb300 has no per-GPU Slurm defaults: without sbatch-level mem=0 the +# job allocation is ntasks x DefMemPerCPU = 4 GB/node and worker cgroups +# OOM-kill during engine init; srun_options.mem=0 alone only grants a +# step what the job already holds. cpus-per-task=72 (one NUMA socket) +# keeps the gpu-less infra step (etcd/nats) off the 1-CPU default. +# Full rationale: vllm/deepseek-v4/agentic/disagg-gb300-1p6d-dep4-tp4-agentic.yaml. +sbatch_directives: + mem: "0" + cpus-per-task: "72" +srun_options: + mem: "0" + +slurm: + time_limit: "8:00:00" + +health_check: + max_attempts: 720 + interval_seconds: 10 + +extra_mount: + - "__M3_HF_HOME__:__M3_HF_HOME__" + +resources: + gpu_type: "gb300" + gpus_per_node: 4 + prefill_nodes: 1 + decode_nodes: 1 + prefill_workers: 1 + decode_workers: 1 + gpus_per_prefill: 4 + gpus_per_decode: 4 + +frontend: + type: dynamo + enable_multiple_frontends: false + +backend: + type: vllm + connector: null + + prefill_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + # Cache-only at runtime: the launcher pre-stages the full snapshot and + # verifies it offline before submit, so workers must NOT re-fetch. Without + # this, dynamo fetch_model takes a per-blob .lock on the shared NFS cache; + # co-fetching workers (e.g. both nodes of a TP8-2n job) collide and the + # loser dies with "Lock acquisition failed" (no retry like Python hf_hub). + HF_HUB_OFFLINE: "1" + # Multi-node-NVLink KV transfer: keep cross-node prefill->decode KV on the + # NVL fabric (5-6x vs RDMA/TCP fallback, +17-49% tok/s/gpu). Needs VMM- + # registered KV (enable-cumem-allocator below). + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + decode_environment: + VLLM_ENGINE_READY_TIMEOUT_S: "3600" + VLLM_FLASHINFER_ALLREDUCE_BACKEND: "mnnvl" + HF_HOME: "__M3_HF_HOME__" + # Cache-only at runtime: the launcher pre-stages the full snapshot and + # verifies it offline before submit, so workers must NOT re-fetch. Without + # this, dynamo fetch_model takes a per-blob .lock on the shared NFS cache; + # co-fetching workers (e.g. both nodes of a TP8-2n job) collide and the + # loser dies with "Lock acquisition failed" (no retry like Python hf_hub). + HF_HUB_OFFLINE: "1" + # Multi-node-NVLink KV transfer: keep cross-node prefill->decode KV on the + # NVL fabric (5-6x vs RDMA/TCP fallback, +17-49% tok/s/gpu). Needs VMM- + # registered KV (enable-cumem-allocator below). + UCX_CUDA_IPC_ENABLE_MNNVL: "y" + + vllm_config: + prefill: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-expert-parallel: true + enable-cumem-allocator: true + enforce-eager: true + max-model-len: 9472 + max-num-seqs: 16 + max-num-batched-tokens: 16384 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + + decode: + kv-transfer-config: '{"kv_connector": "NixlConnector", "kv_role": "kv_both"}' + tensor-parallel-size: 4 + pipeline-parallel-size: 1 + enable-expert-parallel: true + enable-cumem-allocator: true + max-model-len: 9472 + max-num-seqs: 256 + max-num-batched-tokens: 256 + max-cudagraph-capture-size: 512 + block-size: 128 + language-model-only: true + gpu-memory-utilization: 0.9 + trust-remote-code: true + no-enable-prefix-caching: true + stream-interval: 32 + +benchmark: + type: "sa-bench" + isl: 8192 + osl: 1024 + concurrencies: "16x32x64x128x256" diff --git a/benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi300x.sh b/benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi300x.sh index e3522e00a..f2cdaf284 100755 --- a/benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi300x.sh +++ b/benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi300x.sh @@ -32,6 +32,7 @@ fi SERVER_LOG=/workspace/server.log export VLLM_ENGINE_READY_TIMEOUT_S=3600 +export VLLM_USE_BREAKABLE_CUDAGRAPH=0 if [ "${EVAL_ONLY}" = "true" ]; then setup_eval_context @@ -58,7 +59,6 @@ vllm serve "$MODEL" --port "$PORT" \ --language-model-only \ --max-model-len "$MAX_MODEL_LEN" \ --attention-backend TRITON_ATTN \ - --enforce-eager \ --tool-call-parser minimax_m3 \ --reasoning-parser minimax_m3 \ --enable-auto-tool-choice > "$SERVER_LOG" 2>&1 & diff --git a/benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi300x_mtp.sh b/benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi300x_mtp.sh new file mode 100644 index 000000000..40fbab536 --- /dev/null +++ b/benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi300x_mtp.sh @@ -0,0 +1,214 @@ +#!/usr/bin/env bash + +# MiniMax-M3 MXFP8 MI300X (gfx942) single-node vLLM recipe with EAGLE3 +# speculative decoding — the spec-decoding=mtp variant of +# minimaxm3_fp8_mi300x.sh. Adds the Inferact/MiniMax-M3-EAGLE3 draft head via +# --speculative-config with 3 speculative tokens. Everything else mirrors the +# non-MTP MI300X recipe: mandatory --block-size 128, --language-model-only for +# the text-only benchmark, --attention-backend TRITON_ATTN, and +# --no-enable-prefix-caching. Runs with CUDA graphs (no --enforce-eager); +# VLLM_USE_BREAKABLE_CUDAGRAPH=0 avoids the M3-decode breakable-cudagraph path. +# The default BF16 KV cache is retained (unlike +# the MI355X recipe's FP8 KV cache): gfx942 has no calibrated q/prob scales for +# ROCm FP8 attention and vLLM's fallback scale of 1.0 corrupts accuracy. +# +# Unlike the CUDA recipes, the drafter needs no attention_backend override: +# the FlashInfer "page size 128 requires GQA/MQA" limitation that forced +# FLASH_ATTN for the EAGLE3 MHA head on Blackwell is FlashInfer/CUDA-specific. +# Here the whole server runs on TRITON_ATTN (set globally below), which serves +# the MHA draft fine. +# +# [AI generated draft test] The shipped vllm/vllm-openai-rocm:minimax-m3 image +# does NOT implement SupportsEagle3 on the AMD MiniMax-M3 model, so EAGLE3 +# engine init fails with "Model does not support EAGLE3 interface but +# aux_hidden_state_outputs was requested". This recipe applies that fix +# (functionstackx/vllm#1 — ported from nvidia/model.py, upstreamed as +# vllm-project/vllm#45546) in-place to the installed vllm before serving, so we +# can validate EAGLE3 on real MI300X hardware ahead of an image rebuild. The +# same patch is validated green on MI355X. It is idempotent and fails the job +# loudly if the installed amd/model.py has drifted from the expected base. + +source "$(dirname "$0")/../../benchmark_lib.sh" + +check_env_vars \ + MODEL \ + TP \ + EP_SIZE \ + DP_ATTENTION \ + CONC \ + ISL \ + OSL \ + MAX_MODEL_LEN \ + RANDOM_RANGE_RATIO \ + RESULT_FILENAME + +DRAFT_MODEL="Inferact/MiniMax-M3-EAGLE3" + +if [[ -n "$SLURM_JOB_ID" ]]; then + echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME" +fi + +# MODEL is a bare HF id on the mi300x single-node runner (a fast cache hit when +# pre-staged). The EAGLE3 draft is not staged; fetch it into the same cache. +if [[ "$MODEL" != /* ]]; then + hf download "$MODEL" + hf download "$DRAFT_MODEL" +fi + +if [ -n "$ROCR_VISIBLE_DEVICES" ]; then + export HIP_VISIBLE_DEVICES="$ROCR_VISIBLE_DEVICES" +fi + +SERVER_LOG=/workspace/server.log +export VLLM_ENGINE_READY_TIMEOUT_S=3600 +export VLLM_USE_BREAKABLE_CUDAGRAPH=0 + +if [ "${EVAL_ONLY}" = "true" ]; then + setup_eval_context +fi + +PARALLEL_ARGS=(--tensor-parallel-size "$TP") +if [ "${DP_ATTENTION}" = "true" ]; then + PARALLEL_ARGS=( + --tensor-parallel-size 1 + --data-parallel-size "$TP" + --enable-expert-parallel + ) +elif [ "$EP_SIZE" -gt 1 ]; then + PARALLEL_ARGS+=(--enable-expert-parallel) +fi + +# use 3 speculative tokens for all configs for now +NUM_SPEC_TOKENS=3 + +# [AI generated draft test] Patch the installed AMD MiniMax-M3 model to add the +# SupportsEagle3 interface (functionstackx/vllm#1, upstream vllm-project/vllm#45546). +# Mirrors nvidia/model.py: adds EagleModelMixin to the inner model + +# aux-hidden-state emission, and SupportsEagle3 to the two outer classes. +# Idempotent; hard-fails if the installed file has drifted from the expected +# base (so we never silently run unpatched and mislabel the result). +python3 - <<'PYEOF' || { echo "EAGLE3 in-place patch failed" >&2; exit 1; } +import ast, importlib.util, pathlib, sys + +spec = importlib.util.find_spec("vllm") +root = pathlib.Path(spec.submodule_search_locations[0]) +target = root / "models" / "minimax_m3" / "amd" / "model.py" +src = target.read_text() + +if "EagleModelMixin" in src and "class MiniMaxM3Model(nn.Module, EagleModelMixin):" in src: + print(f"[eagle3-patch] already applied: {target}") + sys.exit(0) + +edits = [ + ( + "from vllm.model_executor.models.interfaces import (\n" + " MultiModalEmbeddings,\n" + " SupportsMultiModal,\n" + ")", + "from vllm.model_executor.models.interfaces import (\n" + " EagleModelMixin,\n" + " MultiModalEmbeddings,\n" + " SupportsEagle3,\n" + " SupportsMultiModal,\n" + ")", + ), + ( + "class MiniMaxM3Model(nn.Module):", + "class MiniMaxM3Model(nn.Module, EagleModelMixin):", + ), + ( + " inputs_embeds: torch.Tensor | None = None,\n" + " ) -> torch.Tensor:\n" + " if inputs_embeds is not None:", + " inputs_embeds: torch.Tensor | None = None,\n" + " ) -> torch.Tensor | tuple[torch.Tensor, list[torch.Tensor]]:\n" + " if inputs_embeds is not None:", + ), + ( + " residual = None\n\n" + " for layer in self.layers[self.start_layer : self.end_layer]:\n" + " hidden_states, residual = layer(positions, hidden_states, residual)\n\n" + " hidden_states, _ = self.norm(hidden_states, residual)\n" + " return hidden_states", + " residual = None\n\n" + " # EAGLE3 is not yet compatible with pipeline parallel\n" + " aux_hidden_states = self._maybe_add_hidden_state([], 0, hidden_states, residual)\n" + " for idx, layer in enumerate(self.layers[self.start_layer : self.end_layer]):\n" + " hidden_states, residual = layer(positions, hidden_states, residual)\n" + " self._maybe_add_hidden_state(\n" + " aux_hidden_states, idx + 1, hidden_states, residual\n" + " )\n\n" + " hidden_states, _ = self.norm(hidden_states, residual)\n\n" + " if len(aux_hidden_states) > 0:\n" + " return hidden_states, aux_hidden_states\n" + " return hidden_states", + ), + ( + "class MiniMaxM3SparseForCausalLM(nn.Module):", + "class MiniMaxM3SparseForCausalLM(nn.Module, SupportsEagle3):", + ), + ( + "class MiniMaxM3SparseForConditionalGeneration(nn.Module, SupportsMultiModal):", + "class MiniMaxM3SparseForConditionalGeneration(\n" + " nn.Module, SupportsMultiModal, SupportsEagle3\n" + "):", + ), +] + +for old, new in edits: + count = src.count(old) + if count != 1: + sys.exit( + f"[eagle3-patch] anchor matched {count} times (expected 1); " + f"installed {target} has drifted from the expected base — aborting" + ) + src = src.replace(old, new) + +ast.parse(src) +target.write_text(src) +print(f"[eagle3-patch] applied EAGLE3 support to {target}") +PYEOF + +start_gpu_monitor + +set -x +vllm serve "$MODEL" --port "$PORT" \ + "${PARALLEL_ARGS[@]}" \ + --block-size 128 \ + --no-enable-prefix-caching \ + --language-model-only \ + --max-model-len "$MAX_MODEL_LEN" \ + --attention-backend TRITON_ATTN \ + --speculative-config "{\"method\": \"eagle3\", \"model\": \"$DRAFT_MODEL\", \"num_speculative_tokens\": $NUM_SPEC_TOKENS}" \ + --tool-call-parser minimax_m3 \ + --reasoning-parser minimax_m3 \ + --enable-auto-tool-choice > "$SERVER_LOG" 2>&1 & + +SERVER_PID=$! +wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" + +pip install -q datasets pandas + +# Spec-decode acceptance rate degrades on raw random tokens; route prompts +# through the chat template as the other MTP recipes do. +run_benchmark_serving \ + --model "$MODEL" \ + --port "$PORT" \ + --backend vllm \ + --input-len "$ISL" \ + --output-len "$OSL" \ + --random-range-ratio "$RANDOM_RANGE_RATIO" \ + --num-prompts "$((CONC * 10))" \ + --max-concurrency "$CONC" \ + --result-filename "$RESULT_FILENAME" \ + --result-dir /workspace/ \ + --trust-remote-code \ + --use-chat-template + +if [ "${RUN_EVAL}" = "true" ]; then + run_eval --framework lm-eval --port "$PORT" + append_lm_eval_summary +fi + +stop_gpu_monitor +set +x diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 6b16a41c5..0b9067114 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -3649,6 +3649,19 @@ - "Serves from the launch_b300-nv.sh MODEL/MODEL_PATH split (model not in the SRE-staged /scratch/models list -> writable /data/models)" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1724 +- config-keys: + - minimaxm3-fp8-gb300-dynamo-vllm + description: + - "Initial submission: MiniMax-M3 MXFP8 day-zero vLLM sweep for GB300 via Dynamo" + - "Model: MiniMaxAI/MiniMax-M3-MXFP8 (427B total / 26B active MoE, MSA sparse attention, ~444 GB MXFP8 checkpoint)" + - "Image: vllm/vllm-openai:minimax-m3 (multi-arch arm64+amd64 from m3_release branch, vllm-project/vllm#45381)" + - "Dynamo orchestration with NixlConnector for disaggregated prefill/decode" + - "7 topologies: TP4 (1n), TP8 (2n), TP4+EP4 (1n), 1P+1D disagg TP4+EP4 (2n), 1P+1D disagg collocated (1n), DEP4 (1n), DEP8 (2n)" + - "Concurrency sweep: TP 4-64, TEP 128-512, disagg 64-512, DEP4 256-1024, DEP8 512-2048" + - "GB300 recipes require srun_options mem=0 (CW DefMemPerCPU=4096 causes host-RAM OOM) and omit safetensors-load-strategy prefetch (~600 GB host-memory limit)" + - "--block-size 128 mandatory everywhere (MSA sparse/index cache alignment); --language-model-only for text-only benchmarks" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1735 + - config-keys: - minimaxm3-fp8-b200-vllm description: @@ -3745,3 +3758,26 @@ - "H100-aligned layouts and concurrency ranges: TP8 and TP8+EP8 across 1k1k and 8k1k" - "Fix launch_mi300x-amds.sh node exclusion to use the current short Slurm node name" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1746 + +- config-keys: + - minimaxm3-fp8-mi300x-vllm-mtp + description: + - "Initial submission: MiniMax-M3 MXFP8 MI300X (gfx942) vLLM benchmark with EAGLE3 speculative decoding (target: MiniMaxAI/MiniMax-M3-MXFP8, draft: Inferact/MiniMax-M3-EAGLE3, 3 speculative tokens) — spec-decoding=mtp variant of the MI300X day-zero recipe" + - "Image: vllm/vllm-openai-rocm:minimax-m3 (same day-zero ROCm build as the non-MTP entry)" + - "Serve shape follows minimaxm3-fp8-mi300x-vllm: --block-size 128, --no-enable-prefix-caching, --language-model-only, --attention-backend TRITON_ATTN, --enforce-eager, minimax_m3 parsers, and the default BF16 KV cache (gfx942 lacks calibrated ROCm FP8 attention scales); prompts routed through the chat template for realistic acceptance" + - "TP8-only search space (gfx942 192 GB is memory-tight, like H100): TP8 latency rows started at conc 1, TP8+EP8 (TEP) at high concurrency, across 1k1k and 8k1k" + - "[AI generated draft test] The shipped ROCm image's AMD MiniMax-M3 model lacks SupportsEagle3, so the recipe patches it in-place at runtime (functionstackx/vllm#1, upstream vllm-project/vllm#45546; validated green on MI355X) before serving — validates EAGLE3 on MI300X ahead of an image rebuild" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1749 + +- config-keys: + - minimaxm3-fp8-mi300x-vllm + description: + - "Enable CUDA graphs for MiniMax-M3 MXFP8 on MI300X and set VLLM_USE_BREAKABLE_CUDAGRAPH=0 per AMD guidance" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1750 + +- config-keys: + - minimaxm3-fp8-mi300x-vllm-mtp + description: + - "Run the MiniMax-M3 MXFP8 MI300X EAGLE3 MTP recipe with CUDA graphs instead of --enforce-eager" + - "Drop --enforce-eager and set VLLM_USE_BREAKABLE_CUDAGRAPH=0 (matching the non-MTP MI300X recipe, #1750), which avoids the M3-decode breakable-cudagraph path that previously forced eager execution" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/1756 diff --git a/runners/launch_gb300-cw.sh b/runners/launch_gb300-cw.sh index 6a5c50e38..50dae4465 100644 --- a/runners/launch_gb300-cw.sh +++ b/runners/launch_gb300-cw.sh @@ -59,8 +59,24 @@ elif [[ $MODEL_PREFIX == "glm5" && $PRECISION == "fp8" ]]; then echo "Unsupported framework on gb300-cw for glm5/fp8: $FRAMEWORK. Currently supported: dynamo-sglang" exit 1 fi +elif [[ $MODEL_PREFIX == "minimaxm3" && $PRECISION == "fp8" ]]; then + # Day-zero: MiniMax-M3-MXFP8 is not staged on this cluster. The recipes + # carry an hf: model id directly, so srtctl pre-downloads the snapshot + # into the shared HF_HOME sed-injected below; MODEL_PATH only feeds the + # (unreferenced) model_paths aliases in srtslurm.yaml. + export MODEL_PATH="hf:MiniMaxAI/MiniMax-M3-MXFP8" + + if [[ $FRAMEWORK == "dynamo-vllm" ]]; then + SRT_SLURM_RECIPES_REPO="https://github.com/NVIDIA/srt-slurm.git" + SRT_SLURM_RECIPES_REF="main" + SRT_RECIPE_SRC="$GITHUB_WORKSPACE/benchmarks/multi_node/srt-slurm-recipes/vllm/minimax-m3-gb300-fp8" + SRT_RECIPE_DST="recipes/vllm/minimax-m3-gb300-fp8" + else + echo "Unsupported framework on gb300-cw for minimaxm3/fp8: $FRAMEWORK. Currently supported: dynamo-vllm" + exit 1 + fi else - echo "Unsupported model prefix/precision combination on gb300-cw: $MODEL_PREFIX/$PRECISION. Currently supported: dsv4/fp4, glm5/fp8" + echo "Unsupported model prefix/precision combination on gb300-cw: $MODEL_PREFIX/$PRECISION. Currently supported: dsv4/fp4, glm5/fp8, minimaxm3/fp8" exit 1 fi @@ -276,6 +292,39 @@ else mv "$TMP_CONFIG_FILE" "$CONFIG_FILE" fi +# MiniMax-M3 day-zero: the recipes use an hf: model id and need a shared-FS +# HF_HOME visible (and writable) on compute nodes for srtctl's one-time +# pre-download of the 444 GB snapshot. /mnt/vast is the shared NFS that +# already hosts models and squash files on this cluster. +if [[ $MODEL_PREFIX == "minimaxm3" ]]; then + M3_HF_HOME="/mnt/vast/hf-home" + mkdir -p "$M3_HF_HOME" + sed -i "s|__M3_HF_HOME__|${M3_HF_HOME}|g" "$CONFIG_FILE" + # Dynamo's rust fetch_model dies instantly on ANY held .lock file + # ("Lock acquisition failed") — it doesn't retry like Python's + # huggingface_hub. Concurrent GHA jobs race on the 444 GB download + # and create fresh locks that survive the old "mmin +10" cleanup. + # Fix: nuke ALL locks (safe — HF uses atomic rename from .incomplete), + # then force-download with the Python client (which DOES wait for + # locks) so srtctl's pre-download is a no-op and dynamo sees a fully + # cached snapshot with zero lock files. + find "$M3_HF_HOME" -name '*.lock' -delete 2>/dev/null || true + export HF_HOME="$M3_HF_HOME" + DL_CMD="huggingface-cli download" + command -v huggingface-cli >/dev/null 2>&1 || DL_CMD="hf download" + for _attempt in 1 2 3; do + if HF_HUB_OFFLINE=1 $DL_CMD MiniMaxAI/MiniMax-M3-MXFP8 --quiet 2>/dev/null; then + echo "MiniMax-M3-MXFP8 fully cached (verified offline)" + break + fi + echo "MiniMax-M3 cache incomplete, downloading (attempt $_attempt)..." + find "$M3_HF_HOME" -name '*.lock' -delete 2>/dev/null || true + $DL_CMD MiniMaxAI/MiniMax-M3-MXFP8 --quiet 2>&1 | tail -5 || true + sleep 5 + done + find "$M3_HF_HOME" -name '*.lock' -delete 2>/dev/null || true +fi + SRTCTL_OUTPUT=$(srtctl apply -f "$CONFIG_FILE" --tags "gb300,${MODEL_PREFIX},${PRECISION},${ISL}x${OSL},infmax-$(date +%Y%m%d)" 2>&1) echo "$SRTCTL_OUTPUT" diff --git a/runners/launch_mi300x-amds.sh b/runners/launch_mi300x-amds.sh index ce04ceadd..b0c1e22c8 100644 --- a/runners/launch_mi300x-amds.sh +++ b/runners/launch_mi300x-amds.sh @@ -7,6 +7,10 @@ PARTITION="compute" SQUASH_FILE="/home/gharunner/gharunners/squash/$(echo "$IMAGE" | sed 's/[\/:@#]/_/g').sqsh" LOCK_FILE="${SQUASH_FILE}.lock" +# Route spec-decoding=mtp configs to the _mtp benchmark script (parity with +# the h200 launchers, which have carried SPEC_SUFFIX since #392). +SPEC_SUFFIX=$([[ "$SPEC_DECODING" == "mtp" ]] && printf '_mtp' || printf '') + set -x # Exclude known-bad nodes; let Slurm pick from anything else: @@ -37,6 +41,6 @@ srun --jobid=$JOB_ID \ --container-remap-root \ --container-workdir=/workspace/ \ --no-container-entrypoint --export=ALL \ -bash benchmarks/single_node/${SCENARIO_SUBDIR}${EXP_NAME%%_*}_${PRECISION}_mi300x.sh +bash benchmarks/single_node/${SCENARIO_SUBDIR}${EXP_NAME%%_*}_${PRECISION}_mi300x${SPEC_SUFFIX}.sh scancel $JOB_ID diff --git a/utils/aiperf b/utils/aiperf index 062a5de92..ff2b646c0 160000 --- a/utils/aiperf +++ b/utils/aiperf @@ -1 +1 @@ -Subproject commit 062a5de92c8ac8a0a6dd5d2a7fb9a539a147f3d9 +Subproject commit ff2b646c0425aff9307a0e73161b23d77003a357