-
Notifications
You must be signed in to change notification settings - Fork 208
[codex] add MiniMax M3 FP4 MI355X vLLM benchmark #1935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+127
−0
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
benchmarks/single_node/fixed_seq_len/minimaxm3_fp4_mi355x_vllm.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # MiniMax-M3 MXFP4 MI355X (gfx950) single-node vLLM recipe. | ||
| # https://huggingface.co/amd/MiniMax-M3-MXFP4#reproduction | ||
| # Block size 128 is mandatory for MSA. This fixed-sequence benchmark uses the | ||
| # text-only language-model path and lets vLLM select the MoE backend. | ||
|
|
||
| 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 | ||
|
|
||
| if [[ -n "$SLURM_JOB_ID" ]]; then | ||
| echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME" | ||
| fi | ||
|
|
||
| if [[ "$MODEL" != /* ]]; then hf download "$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 | ||
|
|
||
| start_gpu_monitor | ||
|
|
||
| set -x | ||
| vllm serve "$MODEL" --port "$PORT" \ | ||
| "${PARALLEL_ARGS[@]}" \ | ||
| --trust-remote-code \ | ||
| --block-size 128 \ | ||
| --no-enable-prefix-caching \ | ||
| --language-model-only \ | ||
| --max-model-len "$MAX_MODEL_LEN" \ | ||
| --attention-backend TRITON_ATTN \ | ||
| --tool-call-parser minimax_m3 \ | ||
| --enable-auto-tool-choice \ | ||
| --reasoning-parser minimax_m3 > "$SERVER_LOG" 2>&1 & | ||
|
|
||
| SERVER_PID=$! | ||
| wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" | ||
|
|
||
| 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 | ||
|
|
||
| if [ "${RUN_EVAL}" = "true" ]; then | ||
| run_eval --framework lm-eval --port "$PORT" | ||
| append_lm_eval_summary | ||
| fi | ||
|
|
||
| stop_gpu_monitor | ||
| set +x | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 The new
minimaxm3_fp4_mi355x_vllm.shis missingexport VLLM_USE_BREAKABLE_CUDAGRAPH=0after theVLLM_ENGINE_READY_TIMEOUT_Sline, which every other MiniMax-M3 vLLM recipe in the repo sets (including the MXFP4 multi-node disagg entry atmodels_vllm.yaml:44for the SAMEamd/MiniMax-M3-MXFP4model). Without it, the M3 decode path silently falls back to eager mode via the breakable-cudagraph fallback, invalidating the "direct precision comparison" with the MXFP8 baseline (which DOES run with CUDA graphs) that the PR description names as the motivation. Fix: addexport VLLM_USE_BREAKABLE_CUDAGRAPH=0at line 34, matchingminimaxm3_fp8_mi355x.sh:33.Extended reasoning...
The bug
The new
benchmarks/single_node/fixed_seq_len/minimaxm3_fp4_mi355x_vllm.shscript (lines 32-34) setsSERVER_LOGandVLLM_ENGINE_READY_TIMEOUT_S=3600, but does NOT exportVLLM_USE_BREAKABLE_CUDAGRAPH=0. Every other MiniMax-M3 vLLM recipe in this repo sets this env var:minimaxm3_fp8_mi300x.shminimaxm3_fp8_mi300x_mtp.shminimaxm3_fp8_mi325x.shminimaxm3_fp8_mi325x_mtp.shminimaxm3_fp8_mi355x.shminimaxm3_fp8_mi355x_mtp.shbenchmarks/multi_node/amd_utils/models_vllm.yamlThe inline comment in those scripts identifies it as a MiniMax-M3 model-specific (not precision-specific) workaround: "VLLM_USE_BREAKABLE_CUDAGRAPH=0 avoids the M3-decode breakable-cudagraph path that previously forced eager execution."
Why this is not specific to MXFP8
The disagg config at
benchmarks/multi_node/amd_utils/models_vllm.yaml:44uses the exact same model (amd/MiniMax-M3-MXFP4) and explicitly setsVLLM_USE_BREAKABLE_CUDAGRAPH=0in its env string. So the requirement is tied to the MiniMax-M3 model + ROCm decode path, not to the weight quantization. PRs #1750/#1754/#1755/#1756 (recorded inperf-changelog.yaml) landed this fix "per AMD guidance" across every MiniMax-M3 single-node recipe at the time; this new MXFP4 single-node recipe breaks the established pattern without justification.Concrete trigger walkthrough
bash minimaxm3_fp4_mi355x_vllm.shwith one of the TP/EP shapes fromamd-master.yaml.VLLM_ENGINE_READY_TIMEOUT_S=3600;VLLM_USE_BREAKABLE_CUDAGRAPHis unset (default: enabled).vllm serveis invoked without--enforce-eager, so vLLM normally captures CUDA graphs for decode.Impact
This silently invalidates the benchmark's stated purpose. The numbers will look worse than they should because eager-mode decode throughput is substantially below graph-captured decode on MoE models. Anyone comparing these results to the MXFP8 baseline will draw incorrect conclusions about MXFP4's quality/perf trade-off. This is a normal-severity bug because the measurement validity is the explicit goal of this PR.
Fix
One-line addition at
benchmarks/single_node/fixed_seq_len/minimaxm3_fp4_mi355x_vllm.sh:34:This exactly mirrors the layout in
minimaxm3_fp8_mi355x.sh:31-33, which the PR description claims to mirror.