Repository navigation
Conversation
…file's K-quant, BF16 and F32 attention, ssm, indexer and NextN weights open Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s, and glm's coverage row allows its absorbed-pair pin Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: MUST_FIX: the plan accepts K-quant indexer sites that the selector refuses at the first step, and two comments now state what is false.
Must fix
1. A K-quant indexer.attn_q_b or indexer.proj passes the plan and fails at the first token
coverage.rs:1582 accepts every dense_projected type (Q3_K to Q6_K, NVFP4) for all Role::Attention matrices except the absorbed pair. The selector does not use ByName: mla.rs:101 gemv_row_major takes q8_0, f32 or bf16 only, and select calls it for n.proj and n.sel.q_b (mla.rs:163).
Path: a GLM file with Q4_K indexer.attn_q_b → plan accepts, the body uploads → the first latent layer returns glm5next selector … q8_0 planes, f32 rows or bf16 words. No fixture variant retypes the indexer's q_b or proj to a K-quant, and the new coverage test has no indexer.* name, so nothing catches it.
The same predicate shape holds for indexer_compressor_ape.weight (2-D, Role::Attention): roles.rs:109 keeps a BF16 one as words, and f32v(w, &n.ape) at mla.rs:87 reads f32. I did not prove such a file exists; check it with the same fix.
Cost: the refusal is cheap at plan and expensive after a multi-GB upload.
Fix: give the selector its own pin, as the absorbed pair has one. Exclude it from the by-name row and add a TypePin with names: Some(is_selector_site) and reads as the other pins list q8_0 and bf16 (f32 as they treat it). Add indexer.attn_q_b.weight Q4_K (an item) and BF16 (none) to the_glm5next_mixer_pins_read_the_dense_entries_by_name. Bump the model-tax.tsv count for the extra pin row.
/// The latent mixer's indexer query and head weights: `mla::select` reads them on the
/// branch stream, row-major (`gemv_row_major`), not through `site::ByName`.
fn is_selector_site(name: &str) -> bool {
name.ends_with(".indexer.attn_q_b.weight") || name.ends_with(".indexer.proj.weight")
}and the by-name RowPin: names: Some(|n| !is_absorbed_pair(n) && !is_selector_site(n)).
2. A doc comment sits on the wrong test
act_rule.rs:1061 The four-line doc of site_rel_reads_the_forms_the_launches_name ("Ours is the form the launches read …") is now joined to the new BF16 doc and attaches to a_bf16_site_counts_ik_s_bfloat16_activation. The old test lost its doc, and the new one carries a false one.
Fix: move the BF16 doc and test above that four-line doc, so the old doc is directly above #[test] fn site_rel_reads_the_forms_the_launches_name.
3. Module docs still say the mixer sites are q8_0
kda.rs:12 "[Step] is the q8_0 projections" and mla.rs:19 "a q8_0 gemv of the q_a norm" no longer hold: Step projects by name in any dense type, and the indexer query reads q8_0, f32 or bf16.
Fix: kda.rs:12 → "is the projections at one token, each by the site type of its weight (project)"; mla.rs:19 → "a q8_0, f32 or bf16 gemv".
Non-blocking
⚠ Future PIN date: model-tax.tsv:141 says PIN(2026-10-27); every other PIN in this PR says 2026-10-26. Write the date of the change.
⚠ ByName::gemv is a new function of complexity 30: site.rs:851. The F32 arm repeats the same launch(...) call three times, and both arms decide "window, stage and scatter, or whole" separately. Decide the destination once and run the launch once per arm.
⚠ Test value: a_bf16_site_counts_ik_s_bfloat16_activation compares BF16_REL with itself. Mutant: BF16_REL = 1.0 / 128.0; no assertion turns red. Assert 1.0 / 256.0 literally, or leave the value to the derivation in its doc.
Checked
- Duplicates: 16 new items checked. The
hc_inQ8_0/f32 branch is copied between program.rs:378 and prefill.rs; I did not ask for a merge (the owner would add parameters). dryer: 0 pairs. - Complexity:
ByName::gemv30 (new, ⚠ above);PromptProgram::mla50→63,Nextn::open26→29 (added branches); others +1 to +2. - Silent failure: 9 sites followed. All end in a named error, except finding 1's late timing.
- Tests: mutation checked on the coverage test (a dropped Q5_0 exclusion turns red) and on
site_relBF16 (value mutant survives, ⚠). - Gates: BF16
site_relrows, the type pins and themodel-tax.tsvcount moved with dated PINs and reasons. - Escape catalog: none matched (no shell changed).
Notes
The PR body gives no nvidia-smi line, no commit hashes for the gate runs, and no command output; "ptx identical" and "FAIL-first per new clause" are claims without evidence here.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/act_rule.rs, crates/gpu-gates/src/bin/gate_glm5next_e2e.rs, crates/gpu-glm5next/src/body.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)
…heir own pins, so a type its gemv does not read is refused at plan; a BF16 position table loads widened Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: CLEAN: the new commits close the selector plan gap and both false comments; what is left is non-blocking.
Since the last review:
- Must fix 1 (K-quant
indexer.attn_q_b/indexer.projpass the plan, fail at the first token): fixed. coverage.rs:1163 adds a selector pin that reads Q8_0 and BF16 (F32 is not a matrix to the pins). Theapetable has its own pin andbf16_words(roles.rs:110) widens it. This matchesgemv_row_major(mla.rs:111) andf32v. - Must fix 2 (doc on the wrong test): fixed.
- Must fix 3 (q8_0 module docs): fixed.
- ⚠ future PIN date: still open (below). Earlier ⚠ items on code these commits do not change are not repeated.
Non-blocking
⚠ PIN date is tomorrow: model-tax.tsv:141 still says PIN(2026-10-27); the other PINs of this change say 2026-10-26. Write the date of the change.
⚠ The !is_selector_site(n) and ape exclusion in the by-name row pin has no test. Mutant: delete both exclusions. For Q8_0, BF16 and Q4_K the item list is the same, so the new test stays green. Only a type no pin reads (for example Q5_0 on indexer.proj.weight) shows it: the mutant lists the "mixer matrices" item as well. Add one Q5_0 assertion that expects the selector item alone.
Checked
- Duplicates: 4 new items checked (
is_selector_site, two pins, the ape suffix); the ape suffix is written three times, and two short copies cost less than a new owner. dryer: 0 pairs. - Complexity:
PromptProgram::mla50→63 andNextn::open26→29 are added branches, not touched by the new commits; the rest +1 to +2. - Silent failure: 3 sites followed (selector pins, ape widening,
f32v); each ends in a named plan item or error. - Tests: mutation on the new coverage cases: a dropped Q4_K refusal turns red; the row-pin exclusion survives (⚠).
- Gates: the
model-tax.tsvcount and reason moved with a dated PIN (date wrong, ⚠); no band moved. - Escape catalog: none matched (no shell changed).
Notes
The PR body gives no nvidia-smi line, no commit hashes for the gate runs and no command output; "ptx identical" and "FAIL-first" are claims without evidence here.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/act_rule.rs, crates/gpu-gates/src/bin/gate_glm5next_e2e.rs, crates/gpu-glm5next/src/body.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)
GLM-5.3-Flash files with K-quant, BF16 or F32 weights in the mixers (attention, ssm, indexer, NextN) were refused at plan: each mixer site read Q8_0 only. Census: Unsloth's low-bit GLM files (about 1.2M downloads a month) are blocked this way.
site::ByName(crates/gpu/src/site.rs): q8_1 columns for K-quant/NVFP4 sites, the K-quant gemv, token-major results. Its type set isplacement::accepts::dense_projected.coverage.rspins read the kernel tables, not hand lists. The absorbed key/value pair stays Q8_0 until a common head-split entry reads K-quants;tools/model-tax.tsvallows that one row with a dated reason.Evidence (box): ptx identical to base (478 entries); FAIL-first per new clause; the GLM variant e2e batch DONE total=3 red=0; the union fixture batch on main c343a62 + #838 + #836 + this: DONE total=271 red=0 tier=fixture wall=4597s.
A follow-up PR replaces glmattnk/glmattn4 with glmmixk/glmmix4 (the prompt GEMM front raises their recorded budget).
Implemented by Sonnet rounds, reviewed and finished by the lead (Claude Opus).
🤖 Generated with Claude Code