Repository navigation
[New Model] Add MiniMax-M3.1-Flash Model and Kernels - #64111
Merged
Merged
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
zyongye
requested review from
AndreasKaratzas,
DarkLight1337,
Harry-Chen,
LucasWilkinson,
MatthewBonanni,
TheEpicDolphin,
WoosukKwon,
aarnphm,
bbrowning,
bnellnm,
chaunceyjiang,
dllehr-amd,
gau-nernst,
hongxiayang,
houseroad,
khluu,
mgoin,
njhill,
pavanimajety,
robertgshaw2-redhat,
sfeng33,
shen-shanshan,
tjtanaa,
tlrmchlsmth,
vadiklyutiy,
yewentao256,
youkaichao and
ywang96
as code owners
October 27, 2026 17:59
|
✅ CI is already running for this commit: https://buildkite.com/vllm/ci/builds/98120 |
Member
Author
|
/ci run |
|
✅ Triggered Buildkite CI #98139 for commit |
…test Revert 13a6ac3, which dropped the MiniMax-M3 video sampler's final-frame append to match the Hub processor. The sampler keeps it on purpose, so change test_video_processor_from_model_repo instead: a new appends_last_frame parameter (True only for minimax_m3_vl) appends the final frame to the Hub sample_frames indices before comparing. In all 12 test videos, vLLM's indices equal the Hub's plus the final frame, except at 1 fps where the Hub indices already end on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Yongye Zhu <zyy1102000@gmail.com>
Member
Author
|
/ci run |
|
✅ Triggered Buildkite CI #98182 for commit ℹ️ This PR is 16 commits behind upstream |
ZJY0516
approved these changes
Oct 29, 2026
zyongye
enabled auto-merge (squash)
October 29, 2026 04:38
zyongye
disabled auto-merge
October 29, 2026 05:04
6 tasks done
6 tasks done
2 of 6 tasks
5 of 6 tasks
2 of 6 tasks
6 tasks done
6 tasks done
6 tasks done
5 tasks done
2 of 6 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
The first PR of the split of #63232. It adds the MiniMax-M3.1-Flash model code (everything under
vllm/models/minimax_m3, NVIDIA and ROCm, including the DSpark draft) and all kernel changes. The model-runner, sampling and KV cache manager changes from #63232 are left out and will follow as separate PRs (plan under Details).Claims
dspark/subfolder, with fused draft kernels and aFLASHINFER_TSbackend for non-causal draft blocks.Validation
Unit tests ran on GB300 (SM103) against this branch, with MSA
25c1447(the pinned version) vendored and CUDA 13.4 for the Q8KV4 JIT:tests/kernels/attention -k minimax_m3tests/models/minimax_m3, Qwen3-DFlash MXFP8 context KV, reasoning parser, speculative config,FLASHINFER_TS, DFlash/DSpark spec-decode unit tests, aux hidden states over PP, M3 multimodal processing,tests/quantization/test_modelopt.pytests/distributed/test_custom_all_reduce.py(2 GPUs)The 3 failures (
test_modelopt_fp8_pb_wo_checkpoint_setup,test_modelopt_mixed_dspark_checkpoint,test_modelopt_nested_mixed_checkpoint) fail identically onmainin the same environment. They are not caused by this PR.End-to-end on this branch.
MiniMaxAI/MiniMax-M3.1-Flashserved with the command below (TP4 on GB300, NVFP4 KV + NVFP4 indexer, DSpark k=7). Higher is better. MAL is the mean number of tokens accepted per verify step, out of 8.thinking_mode: disabled, T=0, max_tokens 2048thinking_mode: enabled, T=1.0, top_p 0.95, max_tokens 98304Neither run had request errors. gsm8k had no truncated or unanswered rows. On aime26, 11 of 480 samples (2.3%) hit the max_tokens limit, and they are the only unanswered rows.
On #63232 (the full branch), same setup with thinking on (aime26 mean@16, MMMU-Pro strict-match over 3460 questions):
The two arms ran on different revisions of #63232. The paired comparison on one revision was within noise: aime26 +0.00 pp (95% CI ±3.0 pp), MMMU-Pro McNemar p=0.876.
Not covered:
VLLM_GPU_SYNC_CHECK=errorwas not run.Details
Shared code this PR touches. All of it is opt-in or a no-op for other models:
FusedMoEConfig.qat_activation_key(defaultNone): a model declares the activation scheme its experts were QAT'd against.make_nvfp4_moe_kernelnow raises instead of silently droppingper_token_activationfor a backend that cannot honor it.ModelOptMxFp8Config.moe_quant_algo(defaultNone): routesmoe_quant_algo: NVFP4experts to the compressed-tensors NVFP4 MoE.Attention(query_pre_quantized=False): lets the DSpark draft skip a second query quantization.DraftModelSpeculator.attn_vllm_config: the draft's metadata builders now see the draft overrides (attention backend, KV cache dtype). The copies are shallow, so engine-resolved state such ascache_config.kv_cache_layoutsurvives. Covered bytest_draft_attention_backend_override.py.FLASHINFER_TSattention backend,attention_config.indexer_decode_cp, a MiniMax-M3 TP check for NVFP4 KV, and the MSA pin bump (968061a→25c1447).vllm/models/common/ops/moe_tail_fusion, shared with the M3 finalize fusion. Their callers only change import paths.For reviewers:
VLLM_ROCM_MINIMAX_M3_MONO) predates and overlaps the upstream M3 MonoKernel ([ROCm][Perf][MiniMax-M3] MonoKernel decode for M3 MXFP4 on MI355X #62712,kernel_config.monokernel). The two need reconciling; it can also move to its own PR.attention_config.indexer_decode_cp(NVFP4 indexer, TP4) sits next to the existingminimax_m3_indexer_cp(ROCm bf16 Triton CP).Split of #63232. Later PRs:
AttentionSpec.kv_head_major_slots)Where the excluded files of #63232 go
quantization/online/*(incl.shared_expert.py,requantization.py),quantization/utils/config_utils.py,fused_moe/{utils,routed_experts}.py,quark/*,nvfp4_emulation_utils.py,base_config.py,model_loader/utils.py, the NVFP4 oracle's re-quantization hook, the dequantize-iterator change in the ModelOpt/CT NVFP4 MoE, and the ROCm NVFP4-expert guard and FSE resolver inminimax_m3/amd/model.py.kv_cache_interface.py(kv_head_major_slots),nixl/base_worker.py, the model'skv_head_major_slots=True, and its insert test.v1/attention/backends/flash_attn.py.v1/worker/gpu/{sample/gumbel,sample/batch_shard,input_batch,model_runner}.py, the rest of the DFlash/DSpark speculators,v1/sample/ops/topk_topp_*, the scheduler's DFlash/DSpark draft slots, andQwen3DSparkForCausalLM.compute_draft_logits_local.v1/core/kv_cache_utils.pyandKVCacheConfig.mixed_precision_kv_cache.v1/simple_kv_offload/*and its connector.AI assistance (Claude, Codex, Kimi) was used to write parts of these changes and this PR; the author reviewed the split and ran the tests above.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
🤖 Generated with Claude Code