Repository navigation
[Fix] Route asymmetric-KV models to fa4 on SM100 and pin MiMoV2 FP8 MoE to flashinfer_trtllm - #32818
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
/rerun-test test_model_overrides.py test_model_config_shapes.py test/registered/models_e2e/test_mimo_v2.py test/registered/models_e2e/test_mimo_v2_flash.py |
|
Results for 🚀 🚀 |
…oE to flashinfer_trtllm (sgl-project#32818)
…oE to flashinfer_trtllm (sgl-project#32818)
MiMo-V2.5 cannot be deployed on SM100/SM103 with default flags (#31243). The SM100 auto-dispatch picks
trtllm_mha, whose paged-KV kernel requires equal K/V row widths, but MiMoV2 has asymmetric KV (head_dim192,v_head_dim128), so decode CUDA-graph capture aborts withCheck failed: key_cache.size(i) == value_cache.size(i) (37074 vs. 24716). The reporter had to fall back to triton with CUDA graphs disabled.Three changes:
ModelConfig.has_asymmetric_kv— new property (head_dim != v_head_dim or swa_head_dim != swa_v_head_dim). A property rather than an__init__field because the MLA special-casing further down still rewritesv_head_dim._get_default_attn_backend— on SM100, asymmetric-KV MHA models now resolve tofa4, which carriesv_head_dimthrough, instead oftrtllm_mha. This is a capability check, not a model special case; MLA models are asymmetric by construction but resolve through the separate MLA branch and are unaffected._mimo_v2_overrides— on SM100 with an FP8 checkpoint andmoe_runner_backendstillauto, pinflashinfer_trtllm. Left onautothe MoE falls through to the triton fused-MoE runner (autoonly selects DeepGEMM when the a2a backend is DeepEP / Mooncake / NIXL). Gated on fp8 because the FP4 checkpoints run throughflashinfer_mxfp4instead.Also updates the cookbook, whose base-variant Blackwell recipe emitted neither flag while the Pro recipe emitted both.
Measured on MiMo-V2.5 (310B) TP=4, bs=1 decode,
--speculative-algorithm EAGLE --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 --enable-multi-layer-eagle:autoresult)+11.8% output throughput (~+9.6% after discounting the 2.1% higher accept length).
Verification: a launch command carrying no backend flags at all now resolves to
attention_backend='fa4',moe_runner_backend='flashinfer_trtllm',page_size=128and serves correctly, with generated tokens identical to passing both flags explicitly.test_model_overrides.py67 passed.CI States
Latest PR Test (Base): ❌ Run #30495495475
Latest PR Test (Extra): ❌ Run #30495495333