Add MiniMax-M2, Mistral4, and GLM-DSA GGUF graphs - #686
Conversation
Performance Comparison
|
🏗️ Architecture Diff
No architecture changes detected. ✅ Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed) |
There was a problem hiding this comment.
Pull request overview
This PR adds explicit-float GGUF graph support for three previously deferred architectures (MiniMax-M2, Mistral4, GLM-DSA) by introducing new model/task wiring, GGUF tensor mapping + preprocessing, strict tensor-closure validation, and synthetic execution/evidence scaffolding. It promotes these routes in the GGUF architecture registry/census while keeping runtime support and quantized import fail-closed/deferred per the artifact budget constraints.
Changes:
- Add new explicit-float GGUF model/task implementations for MiniMax-M2 and Mistral4, plus complete GLM-DSA tensor routing and KV-B split handling.
- Enforce exact GGUF tensor closure for the promoted “remaining dense” cohort and add synthetic parity + metadata-only artifact evidence tests.
- Update GGUF architecture registry/census, loader pin inventory, and generated docs to reflect the newly importable routes and their deferred runtime/quantization boundaries.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/synthetic_parity_test.py | Excludes new GGUF-only model_types from HF-reference parity set. |
| tests/model_coverage_test.py | Documents new registered GGUF-only routes and their evidence boundaries. |
| tests/gguf_remaining_dense_artifact_test.py | Adds integration metadata-only Hub/LFS identity assertions for oversized candidates. |
| tests/build_graph_test.py | Marks mistral4_gguf as specialized (covered by dedicated GGUF tests). |
| tests/_test_configs.py | Adds tiny config for minimax_m2_gguf route. |
| src/mobius/tasks/_mistral4_gguf.py | New dedicated task with latent K-only cache ABI wiring for Mistral4 GGUF. |
| src/mobius/tasks/_glm_moe_dsa.py | Rejects static-cache for GLM-DSA and adds cache ABI/runtime-support metadata. |
| src/mobius/tasks/init.py | Exports/registers the new Mistral4 GGUF task. |
| src/mobius/models/glm_moe_dsa.py | Splits KV-B into K/V projections; adds weight preprocessing for fused KV-B input. |
| src/mobius/models/glm_moe_dsa_test.py | Strengthens preprocess-weights coverage (graph parameter coverage + KV-B split correctness). |
| src/mobius/models/gguf_mistral4.py | New explicit-float Mistral4 decoder with per-layer latent K-only cache. |
| src/mobius/models/gguf_minimax_m2.py | New explicit-float MiniMax-M2 decoder + sigmoid routing gate with correction bias. |
| src/mobius/models/init.py | Exports the new GGUF model classes. |
| src/mobius/integrations/gguf/_upstream_data/llamacpp_pin.json | Corrects Mistral4 loader census and tensor inventory to DeepSeek2 pin. |
| src/mobius/integrations/gguf/_tensor_processors.py | Adds split-MLA KV-B reshape/fuse processor; registers for GLM-DSA + Mistral4. |
| src/mobius/integrations/gguf/_tensor_processors_test.py | Adds GLM-DSA processor unit test for KV-B reshape. |
| src/mobius/integrations/gguf/_tensor_mapping.py | Adds GGUF→HF name maps for MiniMax-M2, Mistral4, and GLM-DSA. |
| src/mobius/integrations/gguf/_route_census_test.py | Updates expected category counts and asserts new evidence-only boundaries. |
| src/mobius/integrations/gguf/_remaining_dense.py | Adds strict closure validators for the three promoted routes. |
| src/mobius/integrations/gguf/_remaining_dense_test.py | Adds synthetic GGUF generation, closure tests, and executable prefill/decode parity. |
| src/mobius/integrations/gguf/_glm_moe_dsa_test.py | Updates GLM-DSA config/tensor mapping tests to official geometry + new routing. |
| src/mobius/integrations/gguf/_docs.py | Includes oversized-artifact evidence records in docs tables. |
| src/mobius/integrations/gguf/_conventional_decoder_test.py | Removes outdated Mistral4 conventional-decoder expectation. |
| src/mobius/integrations/gguf/_config_mapping.py | Adds key maps + postprocessors for MiniMax-M2/Mistral4/GLM-DSA and fail-closed rules. |
| src/mobius/integrations/gguf/_builder.py | Hooks remaining-dense tensor contract validation; adds static-cache/task restrictions. |
| src/mobius/integrations/gguf/_artifact_blocker_evidence.py | New immutable oversized-artifact evidence records + iteration API. |
| src/mobius/integrations/gguf/_arch_registry.py | Promotes MiniMax-M2/Mistral4 and completes GLM-DSA spec (tensor map + processor). |
| src/mobius/integrations/gguf/_arch_registry_test.py | Updates expected importable architecture counts and verdict coverage assertions. |
| src/mobius/components/_deepseek_mla.py | Adds optional split KV-B projection path for MLA component. |
| src/mobius/_registry.py | Registers minimax_m2_gguf and mistral4_gguf model types. |
| src/mobius/main.py | Adds CLI --static-cache rejections for GLM-DSA and Mistral4 GGUF. |
| docs/api/build_from_gguf.md | Regenerates GGUF support tables and adds the new artifact-budget blocker rows. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
958e485 to
d03ea6d
Compare
Implement exact explicit-float MiniMax-M2, Mistral4 latent-cache, and GLM-DSA import paths. Correct the pinned Mistral4 DeepSeek-V2 inventory, preserve packed/runtime fail-closed boundaries, and record immutable oversized artifact evidence. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0ee8718a-33b9-4015-9e20-3745bad54686 Signed-off-by: Justin Chu <[email protected]>
Canonicalize GLM-DSA alias dispatch while retaining raw metadata prefixes, force the dedicated task, and add alias-spelled weight/execution closure. Restore Mistral4 YaRN scaling from serialized metadata and add an independent mutation discriminator. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0ee8718a-33b9-4015-9e20-3745bad54686 Signed-off-by: Justin Chu <[email protected]>
Validate the serialized float32 yarn_log_multiplier before graph construction, accept the exact encoded [0.0, 0.1] endpoints, and reject non-finite or out-of-range values with real GGUF round-trip coverage. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0ee8718a-33b9-4015-9e20-3745bad54686 Signed-off-by: Justin Chu <[email protected]>
Pin the combined supported-architecture and remaining-route census after integrating the Grok, GroveMoE, and Hunyuan-MoE cohort from main with the MiniMax-M2, Mistral4, and GLM-DSA cohort. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0ee8718a-33b9-4015-9e20-3745bad54686 Signed-off-by: Justin Chu <[email protected]>
0e91cbb to
208f2cb
Compare
Summary
This includes and supersedes the draft GLM-only work in #682.
Post-review fixes
glm_dsaaliases for validation/task/package dispatch while retaining the raw alias prefix for metadata reads; the alias-spelled GGUF proves the exact mixed full/shared indexer schedule, dedicated default task, complete indexer initializer materialization, and executable dense-MLA logitsrope.scaling.yarn_log_multiplierthroughyarn_apply_mscale; an independent metadata oracle pins0.0707, factor4, qk dim4to0.6028141, and mutation to0.1discriminates the result[0.0, 0.1]; the wire endpoint isfloat(np.float32(0.1)), used for both validation and normalization+inf,-inf, negative values, and the immediate float32 successor above0.1; realGGUFWriter/GGUFModelround trips accept both endpoints and prove finite attention scale and rotary caches before graph executionGlmMoeDsaTask()when callers omittaskEvidence and capability boundaries
Pinned semantic source:
ggml-org/llama.cpp@8d9af256337d1a501250f9bbf4c0859a654bddd6.All three real candidates exceed the 16 GiB bounded-artifact policy, so the PR records immutable metadata-only LFS evidence and uses reduced synthetic GGUFs for executable graph/cache parity:
minimax-m2mradermacher/MiniMax-M2-i1-GGUF@2d4f9b1a86d32ce4dfc47db312c8d6fcae8d7b37/MiniMax-M2.i1-IQ1_S.ggufmistral4unsloth/Mistral-Small-4-119B-2603-GGUF@bd93c721735aa32c035c0f19e738cb3371fd56ff/Mistral-Small-4-119B-2603-UD-IQ1_M.ggufglm-dsaunsloth/GLM-5.2-GGUF@abc55e72527792c6e77069c99b4cb7de16fa9f23/ sixUD-IQ1_SshardsNo GGUF payload was downloaded. Hub probes read file metadata only. Runtime support remains
DEFERRED, and quantization-preserving import isREJECTED; callers must usekeep_quantized=False. GLM routed DSA/MLA MTP, Mistral4 NextN/legacy MLA/Q-LoRA-free/nonzero-temperature layouts, and unowned GLM RoPE scaling all fail closed. There are no production model-ID or revision gates.Coverage waivers: real-weight L2/L4/L5 and runtime generation evidence cannot fit the artifact budget. Synthetic tests instead execute full-logit prefill/cached decode, MiniMax static cache, Mistral latent-vs-expanded MLA parity, GLM indexer scheduling, alias-spelled weight closure, and weight application.
Rebase reconciliation
Rebased onto #685 at
86e70a846b572a5266170420373781d2cac23450. The combined tree preserves the Grok/GroveMoE/Hunyuan-MoE and MiniMax-M2/Mistral4/GLM-DSA cohorts in registry dispatch, tensor-contract validation, architecture fingerprint isolation, model coverage, parity exclusions, census, and generated docs. Combined pins are 105 supported architectures and107dependency-blocked /100evidence-only /47immediately implementable remaining routes.Validation
2417 passed, 273 skipped3 passed8981 passed, 64 skipped, 12 deselected, 1 subtest passedlintrunner f --output oneline --all-filesandlintrunner -a --output onelinepython scripts/generate_gguf_support_docs.py --checkgit diff --check origin/main...HEAD0errors (29pre-existing production-file errors outside changed lines)Base:
86e70a846b572a5266170420373781d2cac23450Head:
208f2cb3c7c5215ea9bcf8547a54109acf768bee