Skip to content

minimaxm3: Unsloth's MiniMax-M3.1-Flash GGUFs open (no sparse_layers key; a split K-quant pair over a Q8_0 down) - #854

Merged
midagedev merged 4 commits into
mainfrom
m31gguf
Oct 27, 2026
Merged

midagedev merged 4 commits into
mainfrom
m31gguf

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Unsloth's MiniMax-M3.1-Flash GGUFs (UD-Q2_K_XL, UD-IQ2_XXS, UD-IQ1_M, …) were refused at the header read and would have been refused at load.

1. No attention.sparse_layers key. These files carry indexer tensors on all 60 layers and no key. The reader refused: tensor blk.0.indexer.q_proj.weight: is in the file, and its layer's kind carries none. Now a file without the key attends sparsely on exactly the layers that carry their four indexer tensors; 1–3 of the 4 is a named error; a keyed file reads as before. This is the rule of the producer's open llama.cpp PR (ggml-org/llama.cpp#31192); ik and llama.cpp master refuse these files today.

2. Layer 59's shared expert: Q6_K gate/up over a Q8_0 down. The split block refused a K-quant pair over a non-K-quant down. Now the pair's SwiGLU writes f32 h and the down reads it through its own entry (5 launches, as before).

Evidence (box):

  • FAIL-first: the old reader rule reds the new contract test and the re-pinned case (PIN(2026-10-27)); the old refusal reds 4 of 5 block::tests. Restored, all green.
  • just ptx-compare origin/main bloomery-serve: identical, 494 entries.
  • Plan print on header-only stubs: no-key files plan the same as key-added copies for all three sets, every placement.
  • Owning gates: DONE total=81 red=0 tier=fixture.
  • The real UD-Q2_K_XL on RTX A6000 + RTX 3090 at the default placement (bp): loads in 48.9 s and answers a chat turn correctly. An untimed smoke, not a measured number; no reference set exists for this file.

Implemented by a Sonnet round, reviewed by the lead.

🤖 Generated with Claude Code

midagedev and others added 2 commits October 27, 2026 09:35
… the layers that carry the indexer, as the producer's llama.cpp rule reads it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…LU written to f32 h for the down's own entry

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added gpu The card engine: crates/gpu*, crates/app model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja needs-gpu Changes code a card must check, and carries no gate run on a card labels Oct 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MUST_FIX: the behavior change is sound, but one doc comment on GateUp::Split now states the opposite of what the code does.

Must fix

1. GateUp::Split doc still says "no f32 h"

crates/gpu-deepseek41/src/block.rs:67 says a split block writes the SwiGLU into the down's q8_1 blocks with no f32 h. After this PR that holds only for a K-quant down. Over a q8_0 or MXFP8 down the split arm calls enqueue_swiglu_rule into h (block.rs:502), and writes_h returns true (block.rs:117). The PR updated the module doc, writes_h, of_types and extra_launches, and missed the variant's own doc. A reader of the enum is told the wrong output. Fix the line now; it is one line.

    /// A gemv each, then the rule's SwiGLU: into the down's q8_1 blocks when the down is a K-quant (no f32 `h`),
    /// else into the f32 `h` the down's q8_0 or f32-form gemv reads.

The line above Split { gate: SiteTy, up: SiteTy }, is the one to replace.

Non-blocking

⚠ New split-over-non-K-quant-down arm has no test below the hardware: block.rs:502. The unit tests pin the plan, writes_h and the launch count. A mutant that writes the SwiGLU into the wrong buffer (for example g instead of h) turns none of them red. The PR body cites a real-file smoke and DONE total=81, but not a gate that runs a Q6_K/Q6_K/Q8_0 block against a reference. Name the gate that covers this triple, or add a case to the existing block gate.

Checked

  • Duplicates: 4 new items checked (indexed_layers, INDEXER visibility, the None arm, the new test), none duplicated. dryer: 0 pairs.
  • Complexity: enqueue_block_act 34 → 38 and Hparams::read 24 → 26. Both are a branch added to an existing function. The None arm reuses enqueue_swiglu_rule, the owner the Site arm already calls. Nothing to split. indexed_layers is a separate function.
  • Silent failure: 3 sites followed. indexed_layers cannot hide a partial indexer: tensors_agree names the first missing tensor, and the PIN case shows it. A routed layer with no indexer stays refused by name. h_blocks still errors by name for a K-quant down.
  • Performance: the changed path is the decode block. The split-over-q8_0 down path runs quantize, 2 gemvs, SwiGLU rows and the down gemv, which is 5 launches. This equals the extra_launches of 3 plus 2 and the PR's ptx-compare. No allocation or sync is added.
  • Tests: the_plan_is_the_types_dispatch turns red if the refusal returns. a_row_leaves_f32_h_unless… turns red on writes_h false for every split plan. an_unkeyed_file_attends_sparsely… turns red if the absent key falls back to l >= dense_lead.
  • Gates: one pin moved, the dense-indexer-part case. It carries PIN(2026-10-27), the reason and the FAIL-first evidence. The block.rs test PIN is dated and has a reason.
  • Escape catalog: none matched. No shell code in this diff.

Notes

  • The PR body has no nvidia-smi line, commit hashes or gate commands with output. gpu.json is false.

Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/block.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

midagedev and others added 2 commits October 27, 2026 09:58
…RTX A6000 + RTX 3090, bp)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ant down and f32 h otherwise

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@midagedev

midagedev commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner Author

Card evidence for the split-over-Q8_0 path (box, RTX A6000 + RTX 3090, tree 2ae27d2 + the doc fix 5885a74, which moves no code):

No reference set exists for this file, so layer 59's new path is not checked bit for bit; the arm uses the same enqueue_swiglu_rule the Site arm already gates.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: Since the last review, the one must-fix is fixed and the new commits add only a lease card.

Since the last review:

  • Must-fix 1 (GateUp::Split doc): fixed. block.rs:67 now says q8_1 blocks for a K-quant down and the f32 h otherwise. This matches writes_h and the split arm.
  • ⚠ No test below the hardware for the split-over-non-K-quant-down arm: still open (block.rs:502). The PR body now cites DONE total=81 red=0 and a real-file smoke, but not a named gate for the Q6_K/Q6_K/Q8_0 triple. Not blocking.

Non-blocking

⚠ Card wall sum: docs/cards/m31clip-tape.card:12 The upper terms (26+80+10+137+15) add to 268 s, not 272 s. The low end (190 s) adds up. The lease bound is still safe; fix the figure when the card is next edited.

Checked

  • Duplicates: the new commits add 1 file (a .card) and a doc-comment edit; 0 new code items. The card follows the kind: exclusive shape of example-exclusive.card and clip021-tape.card. dryer: 0 pairs.
  • Complexity: enqueue_block_act 34 → 38 and Hparams::read 24 → 26 are branch growth already reviewed. The new commits do not touch them.
  • Silent failure: no new code to follow.
  • Tests: no test changes in the new commits.
  • Gates: no pin moved by the new commits. The earlier PIN(2026-10-27) stays as reviewed.
  • Card numbers: 1990 + 1259 + 4047 = 7296 experts; 4047 / 7296 = 55.5 %; 4047 × 18.35 MB = 74.3 GB. These agree and carry [derived] conditions.
  • Escape catalog: none matched. No shell code in this diff.

Notes

  • The PR body has no nvidia-smi line, commit hashes or gate commands with output, so gpu.json is false.

Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/block.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@midagedev
midagedev merged commit d5fa429 into main Oct 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu The card engine: crates/gpu*, crates/app model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja needs-gpu Changes code a card must check, and carries no gate run on a card

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant