Repository navigation
gates, qwen38, fixture: the NVFP4 gate's clauses run on a four-layer cut of the NVFP4 and FP4-Local folders in the fixture tier - #1116
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: the oracle can resume across different cut generations and publish mixed reference data; cut-folder resolution also has two owners.
Must fix
1. Include the cut generation in the resume key
tools/ref/qwen4exp-nvfp4-oracle.py:496 accepts cuts, but the resume identity at line 521 omits their fixture line. Pause with --until 3, regenerate the same folder with layers [0,1,6,7] instead of [0,1,2,3], and resume with the new fixture line. The committed source config produces identical edited configs for these cuts. The guard at line 528 accepts the saved activations, and lines 563–592 feed them through the new last layer. Lines 662–664 label the mixed reference set with the new cut's identity, so the generation check accepts it.
Fix this before publishing more fixture sets; their identity must identify the weights that produced every saved activation. Replace the resume identity assignment with:
identity = (
build, model, a.fixture_line, cfg_json, sha256(hf.__file__), str(torch.__version__),
tuple((arm.name, tuple(arm.ids), arm.dense, arm.every_position) for arm in arms),
)Add a regression that changes the cut generation before resuming. Re-pin HARNESS after changing the writer.
2. Share the existing cut-folder resolver
crates/gpu-gates/src/bin/gate_qwen4exp_nvfp4.rs:236 repeats crates/gpu-gates/src/bin/gate_qwen35_dense.rs:224: resolve a profile's first shard, obtain its parent, and print its fixture identity. This is shared fixture policy (R14).
Consolidating it now leaves one policy to maintain. Move the existing helper into tier.rs and remove the dense gate's duplicate block. Keep its doc comment and use this definition:
pub fn cut(profile: &str) -> Result<PathBuf, GateError> {
let first = refset::fixture::first_shard(profile)?;
let folder = Path::new(&first)
.parent()
.ok_or_else(|| format!("{profile}: the cut's first shard {first} has no folder"))?;
println!(" {}", refset::fixture::line(Path::new(&first))?.trim_end());
Ok(folder.to_path_buf())
}Delete the private helper and change its two callers to tier::cut. Replace the dense gate's first-shard/parent block and separate fixture-line print with let folder = tier::cut(NV_PROFILE)?;.
Checked
Duplicates: both cited resolver implementations read; sharing the existing helper removes the second block. Diagnostics reports no dryer pairs and excludes gpu-gates.
Complexity: diagnostics reports run 32 → 55 and split 20 → 25; their diff adds tier decisions and clause registration.
Silent failure: followed saved activations through resume validation, restoration, subsequent layers and manifest publication.
Tests: an isolated evaluation confirms the existing resume key accepts changed fixture identities and the proposed key distinguishes them. Applying the config-edit algorithm to committed source configs confirms both cited layer substitutions preserve config equality. Rust/GPU tests were not run.
Gates: the dated HARNESS re-pin matches the writer's MD5; numeric bands are unchanged.
Escape catalog: no C1–C4 pattern matched the changed scripts.
Card check: gpu-evidence. This pull request changes crates/gpu-gates/src/bin/gate_qwen4exp_nvfp4.rs and carries a gate run on the author's card, which counts as verified.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Filed outside this PR: #1117
…cut of the NVFP4 and FP4-Local folders in the fixture tier
5b29ad4 to
6da2c8a
Compare
There was a problem hiding this comment.
Since the last review:
- Resume generation guard: fixed at tools/ref/qwen4exp-nvfp4-oracle.py:522. The saved identity includes the fixture line.
- Cut-folder duplication: fixed at crates/gpu-gates/src/tier.rs:749. Both gates use this owner.
Verdict: CLEAN: Both earlier must-fix items are resolved, and no new defect survives review of the interdiff.
Checked
Duplicates: 10 new test items and the moved resolver checked; no duplicate owner. Dryer reported no pairs and excludes gpu-gates; its resolver and callers were checked by Grep.
Complexity: crapper flags run 32 → 55 and split 20 → 25 for tier decisions and clause orchestration already reviewed. This interdiff changes resolver calls without adding branches to those functions.
Silent failure: 2 sites followed: checkpoint identity lookup and cut-folder resolution. Invalid identities stop before set writers open; fixture errors propagate to the gate's exit status.
Tests: the new regression asserts same-generation acceptance and changed-generation refusal. An isolated evaluation of the production guard confirms both, plus refusal of missing checkpoints and missing or legacy identities. Removing a.fixture_line at line 522 makes changed-generation resume succeed.
Gates: the dated HARNESS re-pin matches the writer's MD5. Numeric bands are unchanged.
Escape catalog: no C1–C4 pattern matches the interdiff.
Notes
The validator did not rerun Rust/GPU gates or the full Python self-test. The PR body includes gate commands and output on GB10 and RTX 5090. It omits a FAIL-first transcript for the new regression; the isolated guard mutation reproduces the defect.
Card check: gpu-evidence. This pull request changes crates/gpu-gates/src/bin/gate_qwen35_dense.rs, crates/gpu-gates/src/bin/gate_qwen4exp_nvfp4.rs, crates/gpu-gates/src/tier.rs and carries a gate run on the author's card, which counts as verified.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
Qwen3.8 NVFP4 게이트가 용량이 작은 카드에서도 돌도록, NVFP4와 FP4-Local 체크포인트의 앞쪽 층만 잘라 만든 조각으로 fixture tier를 추가한 작업입니다.
What and why
gate-gpu-qwen4exp-nvfp4runs only on a card that holds every routed expert, so a smaller card defers it. This PR adds a fixture tier:BLOOMERY_TIER=fixture just gate-gpu-qwen4exp-nvfp4-cutruns the same clauses on a four-layer cut (layers 0 to 3, one full attention interval, PLE site kept) ofnvidia/Qwen3.8-Flash-Next-NVFP4in its stored bits, against reference sets dumped from that cut. It then runs the load, route-tap and route-trace clauses on the same layers ofnvidia/Qwen3.8-Flash-Next-FP4-Local. Every plan uses the card budget the cut records, and the split clause (s) is set an eighth of (l)'s card bytes short.Writing the FP4-Local cut needed a fix in the shared cut writer. A layer read from several source shards can start an I64 tensor off its element size, which the writer refused as
CutError::Misaligned.placeincrates/model-hf/src/cut.rsnow writes such a group widest element first, each width in source order. Cuts that were placed before keep their layout, and an alignment no order reaches is still refused.The oracle
tools/ref/qwen4exp-nvfp4-oracle.pytakes--fixture-lineand checks the cut's recorded source and revision. Its--resumestate is keyed on the cut's# fixtureline, so a regenerated cut in the same folder is refused instead of continuing another cut's activations;tools/ref/qwen4exp-nvfp4-oracle-test.pycovers this and runs intools/check-recipes.sh. Its harness hash incrates/refset/src/arch/qwen4exp/nvfp4.rsis re-pinned with the writer-pin test in the same commit.Release notes: internal: the NVFP4 gate's clauses now run on any card through a four-layer cut, and the shared cut writer places a layer whose source order misaligns.
Code shape
fixturetool andtier::fixture_set, and both gates resolve a cut's folder through onetier::cut; the set names sit beside the real ones incrates/refset/src/arch/qwen4exp/nvfp4.rs.plan_leversrefuses a fixture tier without the recorded card budget, andplacestill refuses an alignment no order lands.PIN(2026-11-02):.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": noneWhat I ran
Upstream base
3e31152774d8fe13ec2b97699913a3e0488e1509, PR head6da2c8aaa4b1fcf57fc87b17432f05d5d5b19de4.Gate on the fixture tier, GB10:
The same gate on an RTX 5090:
The cuts, written and verified from the two checkpoints (
nvidia/Qwen3.8-Flash-Next-NVFP4atfc694b54fb0174e0913e6adf86691ef85a4ead47,nvidia/Qwen3.8-Flash-Next-FP4-Localatb9ce18a6887e18c089fdea8509a33e63429a3300):Real tier on the GB10 (
BLOOMERY_CARD_ALL_EXPERTS=1). Model:nvidia/Qwen3.8-Flash-Next-NVFP4atfc694b54fb0174e0913e6adf86691ef85a4ead47, SHA-256:The six clauses left to the fixture tier are the
... on the cutdeclarations of the oracle clauses.cargo clippy --workspace --all-targetswith the gate features, on the head:lint rc 0 (^warning: 0, the ratchet 0 in tools/lint-ratchet.txt).Hardware (if the change is for a machine)
The GB10 ran the fixture tier and the real tier; the RTX 5090 ran the fixture tier.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.