Skip to content

nemotron_h_moe gates: place the planner's layer count; docs: Lightning's Q5_0 ups - #843

Merged
midagedev merged 2 commits into
mainfrom
card32fix
Oct 26, 2026
Merged

midagedev merged 2 commits into
mainfrom
card32fix

Conversation

@midagedev

Copy link
Copy Markdown
Owner

gate-gpu-nemotron-h-moe-card32 was red on main with stage map: the cards run 53 layers, the model has 52. The gate passed hp.n_layer (block_count, 53, which counts the NextN block) to placed_on; the planner counts 52 (inputs.model.layers). Both nemotron gates now take inputs.model.layers, as the mimo2, ds41 and glm5next gates do. For Bolt (88 blocks, no NextN) nothing changes.

The gate stays red behind this for another reason: the real Lightning UD-Q4_K_XL has Q5_0 up stacks in 22 of 23 routed layers, and the card has no Q5_0 32-value entry, so the plan puts only layer 1's 128 experts on the card. The gate's premise holds once that entry exists (next quant round). docs/models.md now says this.

Evidence (box, real tier): base red with the stage-map line (553 s); fixed tree passes that line and reaches the arms; card32_split_near_host cosine 0.999995. The real gate never had a green row, and fixture landings defer it, so nothing caught the change.

Found and fixed by a Sonnet round, reviewed by the lead.

🤖 Generated with Claude Code

midagedev and others added 2 commits October 27, 2026 03:18
…lock_count, which counts the NextN block

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…outed layers, so the card holds only layer 1's experts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card labels 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: both gates now size the machine and walk the layers with the planner's count (inputs.model.layers), which fixes the stage-map mismatch without changing any gate threshold.

Checked

  • Duplicates: 2 new items (layers locals) checked. They match the existing pattern in gate_glm5next_twocard.rs:531 and gate_solar2_twocard.rs:313. dryer did not run (no changed file under crates/ per diagnostics, although two are; no pair to read).
  • Complexity: crapper flagged nothing.
  • Silent failure: 2 sites followed. plan.n_l[l] and hp.experts[l] are indexed for l < 52. hp.experts is sized by block_count (53), so the range is in bounds. plan.n_l has the planner's 52 entries. The old range reached l = 52, which the planner has no entry for, so the new range is the safe one. The NextN block has no routed stacks in the planner, so it leaves the split and whole premises unchanged.
  • Types: placed_on takes usize (workstation.rs:293), and inputs.model.layers is used as usize by the sibling gates.
  • Tests: no test added or changed in logic. Both edits are in hw_-style gate binaries. The existing premise check (Premise::Split / Whole) still turns red if the plan puts all or no experts on the card.
  • Gates: no pin, band or tolerance moved.
  • Escape catalog: no pattern matched (no shell code).
  • Docs: the docs/models.md addition ("22 of the 23 routed layers carry Q5_0 up stacks ... only layer 1's 128 experts go to the card") names the file and the cause. The PR body states the same.

Notes

  • The PR body does not carry a GPU gate run per CONTRIBUTING.md (no nvidia-smi line or commit hashes). The change does not alter kernels or timing, so this does not affect the verdict.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app 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