Skip to content

Qwen3.8-27B NVFP4 checkpoint folder on CUDA (Body35) - #960

Merged
midagedev merged 18 commits into
mainfrom
q38nv-pr2
Oct 29, 2026
Merged

midagedev merged 18 commits into
mainfrom
q38nv-pr2

Conversation

@midagedev

Copy link
Copy Markdown
Owner

What and why

Replaces #953 (approved there), rebased onto main past 133b1d3 and e85f0c8; one conflict in serve_seats/qwen3.rs (main's stage-card hold kept, the seat's split passed by value). just check on the box: green.

ModelOpt's Qwen3.8-27B NVFP4 checkpoint folder now opens whole on the card through Body35, as downloaded. The dense
feed-forward sites and the head run NVFP4. The embedding is read as the folder's BF16 words. An NVFP4 tensor's
input_scale is a named, unread tensor. Each tensor uploads in the card format its description gives.

Release notes: Added — Qwen3.8-27B's NVFP4 checkpoint folder (ModelOpt) runs on CUDA cards as downloaded.

Code shape

  • No second copy. The card format comes from one closure (CardOf) through Weights::load_as, load_blocks_from and load_whole.
  • Model code holds only architecture facts.
  • Dead code is gone.
  • No silent failure. An unread tensor is classified by name; a format the card cannot hold is refused.
  • Comments state what is true now.
  • No relaxed gate. The G3 bands are new: ACT_MEDIAN/P90/ROW with PIN(2026-10-29):. Each band is the activation rule's derived term in quadrature with the floor.
  • cargo fmt and cargo clippy are clean; the lint count did not go up.

Duplication found or removed: none.

What I ran

  • New fixture cut: 4 layers of the folder, its mainline twin (prepare's GGUF of the folder) and the oracle sets.
  • G3: the twin through ours, against mainline's logits, inside the derived bands.
  • G4: the folder through ours equals the twin through ours, bit for bit.
  • Fixture-tier landing batch on the union with the agent-start stack: 211 of 213 green. The two reds are red on main too: gate-qdot (fixed by qdot: the IQ3_XXS and MXFP4 gates read files the box keeps; gate-deepseek4-meta retires #950) and gate-gpu-qwen4exp-e2e@q38dense (the BF16 streams; its re-pin lands separately).
  • just remote-static: ok.
  • Still to run: the whole model against mainline on the community GGUF (the release sitting).

Review answers

  • G3 now runs dense_e2e::oracle, one owner, and also holds the count of rows at or under the stability bound (OTHER_ROWS PIN(2026-10-29), 1 and 2 of 32, read from G3's own lines). FAIL-first: a pin of [2, 2] turns the p64 line red.
  • The fixture tier never ran (a) to (f) on any file. On main tools/fixture-dirs.tsv had qwen38d self, and gate-batch --tier fixture on main's tree defers gate-gpu-qwen38d as real-file (the target reaches Tier::check_file at dense_e2e.rs:139). (a) to (f) stay in the real tier, scheduled by the rotation. The fixture tier now also runs G3 and G4 on the cut.
  • unpinned is gone from dense-logits.py.
  • gate-gpu-qwen4exp-e2e@q38dense is red on main from b825b64 (first red; bd9afe0 is the last green), at the gemm free flip clause. gate_qwen4exp_e2e: a flip past an earlier flip is capped with the earlier flips undone #955 re-derives that rule.

🤖 Generated with Claude Code

midagedev and others added 18 commits October 29, 2026 17:53
Sites35 gains its own dense feed-forward list (the projections' types and NVFP4); NVFP4 stays out
of the attention and delta-rule projections. HEAD_TY takes NVFP4. The q8_1 quantize before a down
or shared down runs where the site's gemv reads q8_1 (reads_q8_1, one owner for the four sites and
the MTP pack), not where the type is a K-quant: an NVFP4 down no longer reads a stale act_h. The
coverage pins and hf-arch-check's mirror take the new list; Metal's lists keep what they admitted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the card through Body35, and the qwen3 seat serves it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and oracle sets, and the dense gate's G3/G4 clauses

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…_folder; the recipe builds with checkpoint

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fixture tier requires of a folder

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t and holds each side's weights under it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…le's row, not from the tier's architecture lookup

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…'s layer

Mainline's converter writes ModelOpt's activation scale beside each NVFP4 weight. The load
quantizes activations from their own blocks and never reads it, as the folder map lists it
unread. One beside a tensor of another type is still refused by name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… folder's table as stored

The folder open keeps a BF16 matrix as stored; the embedding gather now takes it through q38's
embed_rows_bf16, which the body already loads, so no kernel is added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nsor is the folder map's bytes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ion gives

file_format turns a BF16 tensor into Bf16AsF32, while the model's description
(ModelTensors::card_format, which the plan and the whole-fit verdict size) can
keep it as BF16 words. Weights::load and PartsLoad::load_whole now take the
description's format and fall back to the type's own where it gives none.
Body35 passes its description's formats; the other bodies pass none, so
their bytes are unchanged. Host-only load path; no kernel or launch moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… derived term

The oracle's floor on the 4-layer NVFP4 twin (mainline CPU against CUDA,
0.001-0.003) holds no term for our activation rule (q8 per 128 on NVFP4
gemvs, f32 on Q8_0) against mainline's q8 per 32. A host simulation on
mainline's own activations derives that term: 0.0049 median from the head,
FFN and output sites, up to 0.0109 with the q/k/v inputs at gain one.
Each band is that PIN in quadrature with the floor's term. Measured 0.0053
and 0.0049 medians sit inside the derivation. FAIL-first: blk.0.ffn_down's
scale set to 1.0 reads median 0.44, FAIL; clean PASS. G4 is 0 lanes on both
sets, and the same dropped-scale mutant on the twin path turns it red.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
clippy's type_complexity flagged the tuple parameter of load_blocks_from.
One alias in weights.rs owns the type; model.rs and parts.rs use it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…o holds the twin's rows under the stability bound

dense_e2e::oracle takes the rows and a Bands; nv::g3 builds its bands from the floor and calls it, so the copied loop
and nv::STABLE_K go. G3 now checks the count of rows at or under their bound against OTHER_ROWS (PIN(2026-10-29),
1 and 2 of 32, read from G3's own lines). The doc states that the fixture tier never ran (a) to (f): fixture-dirs had
`qwen38d self`, so they were deferred to the real tier.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@midagedev
midagedev merged commit 7c437b0 into main Oct 29, 2026
5 checks passed
@github-actions github-actions Bot added 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 placement Placement planning: crates/placement tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 29, 2026
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 placement Placement planning: crates/placement 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