Repository navigation
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: accepted K-quant prompts fail, memory totals omit an allocation, and malformed vocabulary data is hidden.
Must fix
1. Allocate the activation forms the loaded projections require
crates/gpu-minimaxm3/src/prefill.rs:175 Both pools omit q128. The loader accepts Q3_K–Q6_K in PROJ and INDEX (body.rs:272–287). A prompt reaching one of these projections calls project_wide, then WideActsMut::quantize, which returns the missing-q128 error (site.rs:817). Decode allocates its forms from the loaded sites. This is kind A: an accepted model cannot prefill. Add a mixed-quant case that fails when q128 allocation is removed.
Resolve the forms at their allocator so every accepted projection type can prefill. Replace Batch::new with:
pub fn new(
gpu: &Gpu,
(d, shape): (&Dims, &MsaShape),
rows: usize,
stores: &[Store],
) -> Result<Batch, GpuError> {
let stream = gpu.stream();
let q_width = d.heads * HEAD;
let wants = |width| {
let tys: Vec<_> = stores.iter().flat_map(Store::sites)
.filter(|s| s.k() == width).map(|s| s.ty()).collect();
WideActs::wants_of(&tys)
};
Ok(Batch {
rows: BatchRows::new(stream, (d, shape), rows)?,
msa: MsaScratch::new(stream, shape, rows, d.ctx)?,
wide: WideActs::new(stream, wants(d.embd), rows, d.embd)?,
arm: WideActs::new(stream, wants(q_width), rows, q_width)?,
route: GemmRoute::new(stream, rows, 1)?,
gemm: GemmKernels::load(gpu.context())?,
})
}Update the call in body.rs:549:
let batch = crate::prefill::Batch::new(
gpu, (&dims, &msa), crate::prefill::T_MAX, &stores,
)?;2. Count the new hidden-row buffer
crates/gpu-deepseek41/src/shared_routed.rs:381 new allocates h at line 360, but bytes omits it. Both models underreport resident memory by 4 * cap * max(ff, dense_ff) bytes [derived, f32 elements]. Routed::batch_bytes forwards this sum to Solar's prompt reserve check (body.rs:848,968) and MiniMax's scratch check (body.rs:575,659). This is kind B: a proven omission with a mechanical fix.
Correct the shared sum at its owner so both checks count the existing allocation. Insert after Some(&self.x1s),:
Some(&self.h),3. Refuse non-string vocabulary entries
crates/gpu-gates/src/bin/gate_minimaxm3_e2e.rs:269 A numeric tokenizer.ggml.tokens array becomes empty pieces. smoke passes them to piece_text and prints blank output; its success checks cover logits and the fault word, not vocabulary types. model/src/arch/mod.rs:792–805 reads only the explicit size or array length. This is kind B: malformed input becomes a plausible value consumed by the diagnostic.
Validate here before the diagnostic hides malformed model data. Replace:
fn pieces_of(split: &gguf::Split) -> Result<Vec<String>, GateError> {
match split.value("tokenizer.ggml.tokens") {
Some(gguf::Value::Array(items)) => items.iter().enumerate()
.map(|(i, v)| match v {
gguf::Value::String(s) => Ok(s.clone()),
_ => Err(format!(
"tokenizer.ggml.tokens[{i}] is not a string"
).into()),
}).collect(),
_ => Err("the file holds no tokenizer.ggml.tokens array".into()),
}
}Non-blocking
⚠ Exercise ranked selection through the prefill body: crates/gpu-gates/src/bin/gate_minimaxm3_prefill.rs:81 prompts stop at 17 rows. Scoring returns early while visible blocks fit within top_k (attn.rs:162), so removing the body's score call escapes these cases; the MSA gate calls the kernels directly. Add a bounded body case above 128 * top_k live keys and assert the selection or attention result.
Checked
Duplicates: the activation fix reuses the existing WideActs::wants_of owner.
Complexity: diagnostics list 15 new high-complexity functions; no complexity-only finding retained.
Silent failure: followed the vocabulary fallback to the printed smoke output.
Tests: the prefill cases do not exercise K-quant projections or ranked selection through the body. Mutation reasoning was static.
Gates: no gate-relaxation finding retained.
Escape catalog: none of the retained findings depends on C1–C4. No ledger lessons are in force.
Notes
No CUDA gates ran during this review. The PR's summaries lack the nvidia-smi line, paired hashes, model path and gate command output required for GPU evidence.
Validated against the supplied full diff (mode=full).
Card check: needs-gpu. This pull request changes crates/app/src/arch/solar2/mod.rs, crates/gpu-deepseek41/Cargo.toml, 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)
| Some(&self.probs), | ||
| Some(&self.weights), | ||
| Some(&self.sh), | ||
| Some(&self.x1s), |
There was a problem hiding this comment.
Count the hidden-row buffer allocated at line 360 in the total used by the reserve checks.
| Some(&self.x1s), | |
| Some(&self.x1s), | |
| Some(&self.h), |
95b5145 to
5ba2c4b
Compare
…list walk beside the token list (gqa_flash_seg_mma_p16_blocks) The _p12_sel entry keeps its md5; the new entry walks ascending 128-position block ids per (row, key head) in place, so a prompt row stages no gathered copy. A block past the cache raises PoolSelect, a zero count key_count. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cores, the per-key-head block pick and the flash over the picks, with its gate runtime::msa is the host twin (the block max of four unscaled dots, the local blocks forced, low id first on a tie, every block kept below 17). gate_minimaxm3_msa holds ids to it at counts across the block edges up to 32768, the attention bit-identical to dense where every block is kept and inside the f64 band elsewhere; five mutants red. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… MiniMax-M3's family globs Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01REHZMoiqEUnFCPxtpyc1Pg
…uts (rope_gate::seeded_inputs), keys only Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01REHZMoiqEUnFCPxtpyc1Pg
…e step, its e2e gate; Solar's routed block, open and e2e harness lifted into common owners
MiniMax-M3 (R4a): the card body (GQA K/V beside the f16 index-key cache MSA reads, the F32 indexer projections), the
decode step (per-head q/k norm, partial NeoX rope 64 of 128, MSA past the three dense layers), the dense and routed FFN
on SwiGLU-OAI, host and card experts through the common shell, the shared expert, and the open. Decode only: a prompt
batch and slots > 1 are refused by name. gate_minimaxm3_e2e runs the common lcpp e2e clauses on ref_minimaxm3_a..e.
Lifts, so the next hybrid family attaches cheaply:
- gpu-solar2/ffn.rs -> gpu-deepseek41/shared_routed.rs (a generic Routed block with a dense lead arm); Solar's ffn.rs is
an alias.
- block FFN and the q8 pair kernel take the activation as an argument (V4.1's clamp is a wrapper);
ds41_shexp_gate_up{,_q8_0_mcol} change PTX with values held by their owning gates.
- one_card_run / agreed / hosted_hybrid (gpu model.rs), Site::of_file, site::vector, hosted_stacks (Solar and MiMo call
them); place_hybrid's KvLayout carries the index keys; arena_leg reads its rule from the host form.
- gate-side: shared/lcpp_e2e.rs out of gate_solar2_e2e (570 -> 86 lines), solar2_seat 286 -> 178.
Two kernel entries for the four-slot routed counts (ds41_ffn_handoff_4, ds41_ffn_card_acc_4), pinned in ptx-shapes and
the unsafe ratchet. The e2e gate's layer_outputs and top_logprobs clauses are red on the borrowed Solar band: the
divergence opens at near-tie top-4 flips (the next round adds the teacher-forced arm and the family's own band).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01REHZMoiqEUnFCPxtpyc1Pg
…2e harness, and MiniMax-M3's own band (R4b) - lcpp_e2e: forced_layers_near_<slug>. Each layer runs alone at each position on the oracle's own input. The flip-free sites' feed-forward output is held to a ratio band over the one-sided Q8_K/Q8_0 activation gap. The router must agree with the oracle wherever the oracle's 4th-5th margin is above the f32 sum-order band. The free chain is bounded only over the prefix the run's routing holds (sqrt(prefix) * eps_forced), and top_logprobs is deferred by name for MiniMax-M3. - gpu-minimaxm3: Body::forced_row (forced.rs); the attention sub-layer is shared with the step through AttendParts. - gpu, gpu-deepseek41: the route ids and selection bias read back; the host step port keeps each layer's ids of the last step. - refset consumers and the gate-paths derive row for minimaxm3. gate-gpu-minimaxm3-e2e green on the A6000 (414 s): forced flips on the oracle's own input 0; flip-free ratio worst 2.68 (band 10); prefix 3, ceiling 0.0043. Solar-Open2 e2e/prefill fixture and gpu-gates lib green, box check rc 0, mac-lint 11. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…th families call; MiniMax-M3's prompt batch (R5a) - gpu-deepseek41 prompt_walk: the walker's owner. It splits a group into units, stages their rows on the host, walks the layers with the routed block over the unit's slots, then runs the head and checks the fault word. A family supplies only its attention (BatchAttention). - gpu-solar2 prefill: Solar's half only, the KDA and NoPE-GQA mixers over a unit's rows (879 -> 645 lines). This is a move: the fixture gate prints the base's lines exactly. - gpu-minimaxm3 prefill: MiniMax's half. Every row's index key is appended before any row scores, each row selects blocks over its own live count, then the selected flash runs. T_MAX 16 comes from the 64 MiB scratch term: the decode flash keeps 2.6 MB of partials per row. - gates: shared/prefill_clauses.rs holds the four clauses. gate_solar2_prefill keeps its seat open and its doc. gate_minimaxm3_prefill (new) bounds the layers before the routing prefix and defers the logits comparison by name. canon-check de1fc7806 --worktree: 1349 of 1349 identical. A6000: gate-gpu-minimaxm3-prefill and -e2e PASSED, gate-gpu-solar2-prefill real and fixture PASSED, solar2-e2e fixture and gpu-gates lib green. Box check rc 0, mac-lint 11. FAIL-first: a K/V swap and a unit row that sees later rows' index keys each turn the prefill clauses red. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…solo and in the v41-load group as the e2e Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e e2e's host bytes Co-Authored-By: Claude Opus 5.5 <[email protected]>
…at Solar-Open2 now shares (R5b) - app arch: HybridCfg and the blanket Open/Prompt/Keep for one-sequence hybrid bodies; Solar's module 131 -> 78 lines, MiniMax-M3's new (74). - serve_seats/hybrid.rs: Family, Hybrid<F>, its Log, Seat and Tiered impls, lifted from solar2.rs (383 -> 172); serve_seats/minimaxm3.rs and `bloomery-serve --model minimaxm3` at plan a. - shared/serve_gate.rs: the four serve clauses; gate_solar2_serve keeps its seat and doc (247 -> 92), gate_minimaxm3_serve (new) adds place_bp_is_refused. - model: MiniMax-M3's reasoning tags <mm:think> </mm:think> and turn end [e~[ from its chat template. gate-gpu-solar2-serve fixture: clause lines identical to the base's. gate-gpu-minimaxm3-serve: the refusal clauses PASS; load_and_listen waits on the minimax-m2 pre-tokenizer (next commit). Co-Authored-By: Claude Opus 5.5 <[email protected]>
… with llama-tokenize; MiniMax-M3's serve gate whole Pre::MiniMaxM2 runs GPT4O's one expression as the reference's std::regex fallback runs it on the collapsed text (a non-ASCII letter is both a capital and a lowercase letter; the symbol run's tail takes slashes). The whitespace tail, the contraction and the one-piece split are lifted out of the qwen35 and deepseek matchers into one copy each. The tokenizer-minimaxm3 set (llama.cpp-solar2's llama-tokenize) and the gate's cases and corpus tests hold our ids to it in both parse modes. FAIL-first: digits in fours, the tail without '/', no give-back to a non-ASCII letter, and the name dropped from NAMES each turn a test red. serve_gate's MAX_TOKENS goes 64 -> 512 (PIN 2026-10-21): MiniMax-M3's greedy answer ends its turn at 143 tokens, so the turn-end clause read a cut answer; red at 64, green at 512 on the same binary. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…results refused, non-string vocab refused, one bias and vector owner, unused API and Family::Flags removed, prefill activation forms from the loaded sites Co-Authored-By: Claude Opus 5.5 <[email protected]>
…xm3, as every serve recipe does Co-Authored-By: Claude Opus 5.5 <[email protected]>
…stage rows The index head kernel appends a value row beside each index key to a ctx x d f16 plane nothing reads, one plane every selecting layer shares. The MiniMax-M3 body makes it in its step scratch, but the plan never counted it: at the serving default context (131072 after the halving) the load refused itself by name, scratch 125.9 MB against the plan's 100.7 MB. KvLayout's stage position bytes now add the widest selector's key row once beside the rope tables. FAIL-first: under the old rule the_m3_cache_is_the_released_files_bytes reads 2560 for 5120 and the new the_selectors_share_one_sink_row is red. The serve smoke at the defaults loads in 28.4 s with the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… card) on a tier side GLM shares - gpu host::leg_tier: TierSide, LegFamily, node_family, hang_tiers lifted from GLM-5.3-Flash's tier.rs; GLM and Solar both call them (GLM tier code -420, common +297). - gpu-deepseek41 shared_routed: an opt-in tier layer (front_tiered, the tier back and the batch join), so Solar's routed block serves tier experts; MiMo2 and MiniMax-M3 still refuse a tier. - model: Solar's describe and place readers, the tier reserve (PIN(2026-10-21) on the meta bp clause: a plan now, not PlaceError::Tier). - gates: gate_solar2_twocard (new, recipe gate-gpu-solar2-twocard): the two-card run against the same plan on the stage card alone, bits equal for decode, call and group; 5 mutants each red on its own clause. GLM's twocard gate shares its helpers through shared/tier_twocard.rs. canon-check 4478ffdd0 --worktree: 1349 of 1349 entries identical. gate-gpu-solar2-twocard real 78 s and fixture 22 s PASSED; glm5next-twocard and solar2-e2e fixture PASSED; box check rc 0, lint 11. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Solar-Open2 gets plan bp: the stage runs on one card and an expert tier sits on the second card. GLM-5.3-Flash's tier code moves into common owners, and both families call them.
This PR stacks on #599. Review only the last commit, 85c2801. The PR becomes one commit once #599 lands.
What changes
gpuhost::leg_tier:TierSide,LegFamily,node_familyandhang_tiers, lifted from GLM'stier.rs. GLM tier code is −420 lines, the common owners +297.gpu-deepseek41shared_routed: an opt-in tier layer, made offront_tiered, the tier back and the batch join.model: Solar'sdescribeand its place and host readers, plus the tier reserve.PIN(2026-10-21)on the meta bp clause: it is now a plan, notPlaceError::Tier.gate_solar2_twocard(new, recipegate-gpu-solar2-twocard): the two-card run against the same plan with every tier segment on the stage card. Decode, call and group bits must be equal.shared/tier_twocard.rs.Evidence (this head; A6000, and both cards for the two-card gate)
gate-gpu-solar2-twocardPASSED on the real file (92 s,BLOOMERY_CARD=both) and on the fixture (11 s).gate-gpu-minimaxm3-e2e(418 s) and-prefill(72 s) PASS on the real file, becauseshared_routedchanged.just checkrc 0,just mac-lint11.Known limits
gate_solar2_servehas no standing--place bparm. A manual--place bpserve run loaded on both cards and answered a chat request.ffn.rsstill holds its own copy of the tier join (~200 lines). Moving GLM ontoshared_routed's tier layer is a follow-up.This work was written with AI help: the implementation round ran as a Claude subagent, and the review, the merge onto #599 and the gate runs were done by Claude.
🤖 Generated with Claude Code