Repository navigation
feat(gguf): serve MiniMax-M2 and MiniMax-M3 GGUF checkpoints - #725
Merged
Merged
Conversation
24 of 42 tasks
jason-fxz
force-pushed
the
feat/gguf-minimax
branch
from
October 17, 2026 01:34
e0c8e40 to
1c246ec
Compare
jason-fxz
force-pushed
the
feat/gguf-minimax
branch
from
October 17, 2026 01:59
1c246ec to
b99ad20
Compare
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.
Summary
Serves llama.cpp
minimax-m2GGUF files (MiniMax-M2, M2.1, M2.5, M2.7 and their REAP prunes) on the existingminimax_m2model classes, andminimax-m3files (MiniMax-M3, text only) on the existingminimax_m3classes. The tokenizer fixes MiniMax needs (control tokens with spaces, the phantom<|endoftext|>at id 200064) came with #722.Changes
models/minimax_m2/gguf.py(new):attn_qkvmatrix of files converted with--fuse-qkvasqkv_proj.exp_probs_bwithout.bias(llama.cpp refuses them too).models/minimax_m3/gguf.py(new):models/minimax_m3/attention.py,mlp.py: the fusedqkv_projandgate_up_projpassoutput_sizes, so the GGUF linear runs one GEMM per ggml type. The HF path does not change: nvidia/MiniMax-M3-NVFP4, MiniMaxAI/MiniMax-M3 and nvidia/MiniMax-M2.5-NVFP4 get the same method, kernel and scheme on every quantized layer before and after.model.pyof both families:embed_tokenstakes the quant config, so a quantizedtoken_embdis served packed.moe/expert_banks.py: GGUF expert banks start atblk.<first_k_dense_replace>. Before, a GGUF with leading dense layers (M3 has 3) looked for experts inblk.0.register.py: the GGUF specs list the experts as (w1, w3, w2), the (gate, up, down) order in which the GGUF scheme reads their types. Most MiniMax files storeffn_down_expsin another type than gate/up (e.g. Q3_K vs Q2_K).gguf/config.py,register.py,kernel/aot_models.py: register the two archs; the existing MiniMax-M2.5 and MiniMax-M3 AOT entries claim them.Tested models
RTX PRO 6000 Blackwell (sm_120),
ft serve --model-path <file> --max-running-requests 16. AIME25 problems 1–8 × 4 samples with each model'sgeneration_configsampling (M2: temperature 1.0, top_p 0.95, top_k 40; M3: temperature 1.0, top_p 0.95). llama.cpp f2cc728 ran with the same sampling and min_p 0. Also 48 staggered requests at concurrency 16.M3's 6 misses (problems 2 and 7) all hit the 32768-token limit. llama.cpp did not run M3's AIME: on this card it keeps 26 of the 57 expert layers on the CPU, about 7 tok/s per slot.
Staggered requests: no corrupted output on any file.
Results
tokenizer.jsonof MiniMax-M2, M2.5, M2.7 and M3 on 46 strings (control tokens with spaces,<think>, tool-call markup, rendered chat templates with tools) for bartowski and unsloth files, and every added token has HF's id and special flag. HF also NFC-normalizes, which llama.cpp does not.exp_probs_b(refused), 6 whose gate and up experts differ in type, 1 with TQ1_0 linears.tests/models,tests/moeandtests/kernels/test_ggml.pypass, except failures that also fail on main: 5test_quant_configcases andtest_offload.py::test_graph_capture_reuses_warm_offload_cache_before_capture.Not covered
mmprojfiles).