Skip to content

glm5next prompt GEMM front by weight type; qwen38 K-quant embedding, Q5_K head and dense sites by name - #853

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

midagedev merged 4 commits into
mainfrom
qfront2

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Supersedes #851, rebased onto main after #841 merged, with the review must-fix: the front strided copy is site::scatter (one owner; the GLM copy removed).

GLM-5.3-Flash prompt front. A prompt batch projects each mixer site through the GEMM front of its weight type (Q8_0, K-quant, BF16); split weights go through a stage buffer and a strided copy. No new kernel (ptx 478 = 478). Derived: pp +28…40 % on a K-quant mixer file against the chunked gemv; not measured (no such file on the box). The mixer variants are remade under new tags (glmmixk, glmmix4) because the front raises the recorded budget; the sets are keyed by path, so no file a set names changed.

Qwen3.8. K-quant embedding rows, a Q5_K head (up to eight rows through the common head), and the dense sites by name through site::ByName. The head's launches per row count have one owner, head::HeadLaunches; the gates count from it. Opens the dense side of Unsloth's UD-IQ1_S, IQ1_M, Q2_K_XL and IQ3_XXS files (proven on fixture variants q38glue and q38dense, not on the real files).

Evidence (box): FAIL-first per new clause (q38glue verify node count was red at 117 vs 116 before HeadLaunches); the train 3 fixture batch on main 511262a + #841 + this + #835 + #843 + #844 + #848: DONE total=272 red=0 tier=fixture wall=3961s.

Implemented by Sonnet rounds, reviewed and finished by the lead (Claude Opus).

🤖 Generated with Claude Code

midagedev and others added 3 commits October 27, 2026 08:11
…ont of its weight type (Q8_0, K-quant, BF16), split weights through a stage and a strided copy

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…me; the common head counts its launches per row count; the GLM mixer variants under new tags

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 tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 26, 2026
github-actions[bot]
github-actions Bot previously approved these changes Oct 26, 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: CLEAN: the one must-fix of the last review is fixed, and the new commit adds no failure path.

Since the last review:

  • Must-fix 1 (scatter defined twice): fixed. gemm.rs:857 calls site::scatter, and the GLM copy and the Pitched and dtod_2d imports are gone. site.rs:1032 is the only definition. Its arguments are the same as before: gpu.stream(), the stage, (n, m), y, (p.at, stride).
  • ⚠ resident_gemv_cols_on visibility: withdrawn. It is already pub in the base, so the PR did not change it.

Checked

  • Duplicates: 1 new item in this round (pub scatter, a visibility change); no other definition of it exists. dryer: 0 pairs.
  • Complexity: no function in the new commit is flagged. The earlier growth (GemmFront::project, ByName::gemv_on) is unchanged and was judged one owner per type dispatch.
  • Silent failure: 0 new sites. The copy still returns the dtod_2d error, and ? passes it on.
  • Tests: the new commit changes no test. The earlier mutants stay red.
  • Gates: no pin moved in the new commit.
  • Performance: the new commit is a function move with the same call; it adds no launch or copy. Class: move, so ptx-scan stays identical.
  • Escape catalog: no pattern matched.
  • Rebase: the three dropped commits (BF16 act_rule, by-name mixers, selector pins) are in the base (joins_stack, reads_q8_1 and BF16_REL exist in BASE_TREE), so their absence breaks nothing.

Notes

  • The PR body still gives a derived pp gain, not measured, and a batch summary instead of the CONTRIBUTING.md evidence list (the nvidia-smi line, both commit hashes, the model file, the just gate-* commands with output). This does not change the verdict.

Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_glm5next_gemm.rs, crates/gpu-gates/src/bin/gate_qwen38_twocard.rs, crates/gpu-gates/src/bin/gate_qwen4exp_e2e.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)

… one Ok wrapper, a doc gap, R8 on ByName::gemv, a range list, an indexed loop)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset label Oct 26, 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: CLEAN: the new commit is a lint cleanup with no change of behavior, and the earlier review left nothing open.

Since the last review: no must-fix and no ⚠ item was open. The new commit touches only lint-level code.

Checked

  • Duplicates: 2 new items checked (PartRows in tensors.rs:39 and in gate_glm5next_gemm.rs:801). The alias is pub(crate) in the GLM crate, so the gate binary cannot name it. A shared export would add public surface for a one-line alias, so this is not a finding. dryer: 0 pairs.
  • Complexity: no function in the new commit is flagged. The earlier growth was judged before and is unchanged.
  • Silent failure: 0 new sites. ok_or_else(|| shape_ty(..)) at gemm.rs:812 still returns the same error. The old Ok(..?) wrapper was redundant, so the error type and the ? on resident are unchanged.
  • Tests: no test logic changed. vec![0..n] became once(0..n).collect() with the same element, and the Vec::new() branch fixes the type. The rope_gate.rs loop reads y[d] as yd at the same index, so the expected values are the same.
  • Gates: no pin moved.
  • Performance: no hot path changed. Type aliases, an iterator form in a gate reference, and a lazy error are the only edits.
  • Attributes: #[allow(clippy::too_many_arguments)] on ByName::gemv has a reason. The function has 8 parameters with self, so the allow is needed. Removing the blank line before gemv_on's attribute fixes its doc comment attachment.
  • Escape catalog: no pattern matched.

Notes

  • The PR body still gives a derived pp gain, not measured, and a batch summary instead of the CONTRIBUTING.md evidence list (the nvidia-smi line, both commit hashes, the model file, the just gate-* commands with output). This does not change the verdict.

Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_glm5next_gemm.rs, crates/gpu-gates/src/bin/gate_qwen38_twocard.rs, crates/gpu-gates/src/bin/gate_qwen4exp_e2e.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 cb8d92e 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 host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset 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 tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant