Commit 4bbbff4
committed
[None][feat] Add AD custom model for MiniMax-M2 family
Replace the existing MiniMax-M2 MoE patch with a full custom model
implementation using AD canonical ops. Covers both MiniMaxAI/MiniMax-M2
and MiniMaxAI/MiniMax-M2.5 (same architecture, model_type: minimax_m2).
Key architecture features:
- MoE with 256 experts, top-8, sigmoid routing + e_score_correction_bias
- GQA (48 Q heads, 8 KV heads, head_dim=128)
- Partial RoPE (rotary_dim=64 out of head_dim=128)
- Per-layer QK normalization (RMSNorm on full Q/K before reshape)
- FP8 block-wise quantized checkpoint
Canonical ops used: torch_rmsnorm, torch_rope_with_explicit_cos_sin,
torch_attention (GQA-native, no repeat_kv), torch_moe.
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>1 parent 8e0ca19 commit 4bbbff4
5 files changed
Lines changed: 1183 additions & 79 deletions
File tree
- examples/auto_deploy/model_registry
- tensorrt_llm/_torch/auto_deploy/models
- custom
- patches
- tests/unittest/auto_deploy/singlegpu/models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
0 commit comments