Add MiniMax-M3 ROCm serving guide - #664
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request adds a comprehensive usage guide for serving the MiniMax-M3 multimodal model on AMD Instinct (ROCm) GPUs using vLLM. The feedback suggests improving the Docker run command by dynamically resolving the /dev/kfd group ID and adding the VLLM_USE_BREAKABLE_CUDAGRAPH=0 environment variable to optimize performance on AMD MI3xx GPUs.
| docker run -d --name mm3-vllm \ | ||
| --network host --ipc host --shm-size 32g \ | ||
| --device /dev/kfd --device /dev/dri --group-add <kfd-gid> \ | ||
| --cap-add SYS_PTRACE --security-opt seccomp=unconfined \ | ||
| -v /path/to/MiniMax-M3-MXFP8:/models/MiniMax-M3-MXFP8:ro \ | ||
| -e VLLM_USE_V1=1 \ | ||
| --entrypoint vllm vllm/vllm-openai-rocm:v0.25.0 serve /models/MiniMax-M3-MXFP8 \ |
There was a problem hiding this comment.
To make the command easier to run out-of-the-box and ensure optimal performance, we can make two improvements:
- Replace the manual placeholder
<kfd-gid>with$(stat -c '%g' /dev/kfd)to automatically resolve the group ID. - Add
-e VLLM_USE_BREAKABLE_CUDAGRAPH=0to prevent the decode breakable-cudagraph path from forcing eager execution on AMD MI3xx GPUs, as recommended in the model's configuration.
| docker run -d --name mm3-vllm \ | |
| --network host --ipc host --shm-size 32g \ | |
| --device /dev/kfd --device /dev/dri --group-add <kfd-gid> \ | |
| --cap-add SYS_PTRACE --security-opt seccomp=unconfined \ | |
| -v /path/to/MiniMax-M3-MXFP8:/models/MiniMax-M3-MXFP8:ro \ | |
| -e VLLM_USE_V1=1 \ | |
| --entrypoint vllm vllm/vllm-openai-rocm:v0.25.0 serve /models/MiniMax-M3-MXFP8 \ | |
| docker run -d --name mm3-vllm \ | |
| --network host --ipc host --shm-size 32g \ | |
| --device /dev/kfd --device /dev/dri --group-add $(stat -c '%g' /dev/kfd) \ | |
| --cap-add SYS_PTRACE --security-opt seccomp=unconfined \ | |
| -v /path/to/MiniMax-M3-MXFP8:/models/MiniMax-M3-MXFP8:ro \ | |
| -e VLLM_USE_V1=1 \ | |
| -e VLLM_USE_BREAKABLE_CUDAGRAPH=0 \ | |
| --entrypoint vllm vllm/vllm-openai-rocm:v0.25.0 serve /models/MiniMax-M3-MXFP8 \ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d46b2fb7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,100 @@ | |||
| # MiniMax-M3 Series Usage Guide | |||
There was a problem hiding this comment.
Move this guide into the YAML recipe
This adds a new guide under the legacy top-level Markdown tree. The repo instructions say those Markdown guides are read-only reference material and recipe updates should be made in the YAML/Next.js surface instead; keeping a separate MiniMax/MiniMax-M3.md means the legacy MkDocs page can drift from the canonical models/MiniMaxAI/MiniMax-M3.yaml command builder/API content. Please fold the ROCm-specific additions into the existing YAML guide rather than publishing another Markdown recipe.
Useful? React with 👍 / 👎.
| --attention-backend TRITON_ATTN \ | ||
| --mm-encoder-attn-backend ROCM_AITER_FA \ | ||
| --mm-encoder-tp-mode data \ | ||
| --tool-call-parser minimax_m3 --reasoning-parser minimax_m3 \ |
There was a problem hiding this comment.
Enable automatic tool choice with the parser
When users copy this launch command for MiniMax-M3 tool-use requests, the server is started with --tool-call-parser minimax_m3 but automatic tool calls are still disabled because --enable-auto-tool-choice is missing. vLLM's Tool Calling docs describe --enable-auto-tool-choice as mandatory for automatic function calling alongside --tool-call-parser, and the existing MiniMax-M3 YAML includes both flags, so chat requests using tool_choice=auto will not behave as advertised unless this flag is added.
Useful? React with 👍 / 👎.
MiniMax-M3 is a multimodal MoE model (minimax_m3_vl, 427B total). This adds a MiniMax/MiniMax-M3.md serving guide for AMD Instinct (ROCm), verified on 8x MI308X (gfx942) with the MXFP8 checkpoint on vllm/vllm-openai-rocm:v0.25.0. Documents the M3-specific differences from the M2 series on ROCm: M3's sparse indexer is served with --attention-backend TRITON_ATTN (not ROCM_AITER_FA); pure TP8 works; MXFP8 dequantizes to BF16 on gfx942 (no native MXFP8 MoE kernel); long context needs --skip-mm-profiling; and the EmbeddedLLM FP8-dynamic checkpoint needs the SwiGLU fix (vLLM PR #46845). Includes verified GSM8K accuracy and a baseline throughput number, with AITER/mode:3 flagged as open tuning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Ziming (2imi9) <148090931+2imi9@users.noreply.github.com>
3d46b2f to
378e82c
Compare
Adds
MiniMax/MiniMax-M3.md, a serving guide for MiniMax-M3 (multimodal MoE,minimax_m3_vl, 427B total) on AMD Instinct (ROCm). There is currently only a MiniMax-M2 guide in this directory.Verified on 8x AMD Instinct MI308X (gfx942 / CDNA3) with the MiniMax-M3-MXFP8 checkpoint on
vllm/vllm-openai-rocm:v0.25.0.It documents the ways M3 differs from the M2 series on ROCm:
--attention-backend TRITON_ATTN(the M2 ROCm recipe usesROCM_AITER_FA, which was not verified against M3's indexer here).--skip-mm-profiling(multimodal encoder profiling can deadlock near 128k).Includes verified GSM8K accuracy (0.9136 flexible / 0.9121 strict, n=1319) and a baseline throughput number, with
VLLM_ROCM_USE_AITER=1/mode:3flagged as open tuning rather than claimed as tuned results.🤖 Generated with Claude Code