Skip to content

qwen38: read dense coverage from the by-name sites - #649

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fp4local-mxfp8-pin
Oct 22, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fp4local-mxfp8-pin

Conversation

@juliankang4

@juliankang4 juliankang4 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Qwen3.8 FP4-Local 체크포인트의 MXFP8 attention, indexer, shared expert 행렬을 Qwen3.8 coverage가 거절하지 않고 받도록, pin 세 개를 by-name dense site 표를 읽는 pin 두 개로 바꿉니다.

What and why

NVIDIA's Qwen3.8-Flash-Next-FP4-Local checkpoint stores its attention, indexer and shared-expert matrices as MXFP8. The dense sites already launch MXFP8 by name, but the three Qwen38Body pins in crates/model/src/arch/coverage.rs still listed the formats the body read before that. A file with these matrices was refused before planning:

attn_q.weight mxfp8: ["mxfp8 attention matrices (the body reads q8_0 and bf16)"]

The three pins are now two row pins, one for the attention matrices with the indexer projections among them and one for the shared expert. Both read the dense kernel table through one selector, accepts::dense_by_name. Part of #565.

Release notes: Fixed | A Qwen3.8 file whose attention, indexer and shared-expert matrices are MXFP8 or FP8 with 128 by 128 block scales loads instead of being refused.

Code shape

  • No second copy. The two pins share accepts::dense_by_name (crates/placement/src/accepts.rs:253) instead of three format lists. It reads kernels::dense and the activation each entry reads.
  • Model code holds only architecture facts. The pins name roles; the formats come from the kernel table.
  • Dead code is gone. The three old format lists are removed, and so is the indexer name split in coverage.rs (indexer_projection), since the indexer now takes the same formats as the other attention matrices.
  • No silent failure. A format the selector leaves out is still refused with its role and format named.
  • Comments state what is true now. The pins' what strings name the selector they read.
  • No relaxed gate. No band or tolerance moved.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up.

kernels::dense alone would also admit NVFP4 and Q5_0, which neither walk launches by name. So the selector keeps the entries that read f32 rows or Q8 blocks of 32. The formats it adds are MXFP8 and FP8_B128 for attention and the shared expert, and Q8_0, MXFP8 and FP8_B128 for the indexer. The HC, head and embedding pins and the F32 exceptions do not change. The GPU table test every_family_is_the_tables_dense_row_of_one_type checks the selector against site::BY_NAME.

Duplication found or removed (path:line): none.

What I ran

On an NVIDIA GB10, at bac288fc9, this PR's commit on main 8a471012a (main has since changed only release files and a performance card):

head bac288fc9cb4b487a43bd9ca0ceea1f836b04526
base 8a471012aa4a482dacb01ca7e6e90c23b344c04d
| NVIDIA-SMI 595.84                 Driver Version: 595.84         CUDA Version: 13.3     |
|   0  NVIDIA GB10                    On  |   0000000F:01:00.0 Off |                  N/A |
  • cargo test -p bloomery-model --lib arch::coverage::tests: test result: ok. 21 passed; 0 failed. The tests check, for both pins and both indexer names, the formats each takes and the ones it refuses.
  • bash tools/gate.sh --oxide -p bloomery-gpu --release --lib -- every_family_is_the_tables_dense_row_of_one_type: test result: ok. 1 passed; 0 failed. This is the site.rs test the change edits; the site.rs change is in its mod tests only.
  • The MXFP8 and FP8_B128 dense gate, which loads synthetic tensors through the same path and checks the gemv and the wide tile against the host rules (with BLOOMERY_BOX_LOCAL=1):
just gate-gpu-mxfp8
mxfp8 clause=gemv.bits shape=blk.3.attn_q_b rows=16384 k=1536 m=1 equal=16384/16384 PASS
mxfp8 clause=tile.bits shape=blk.3.attn_q_b rows=16384 k=1536 m=64 equal=1048576/1048576 PASS
gpu-gate.sh: gate_mxfp8 ran 15 s (exit 0)

just affected also lists other gates through site.rs. That file changes only in its mod tests, so the gates above cover the card path this change reaches.

  • On main, the coverage test with MXFP8 attention fails with the refusal above (test result: FAILED. 0 passed; 1 failed).
  • The FP4-Local checkpoint (revision b9ce18a6) prepared into a split as stored keeps its MXFP8 dense matrices and its NVFP4 experts and PLE rows. bloomery-serve --parallel 1 --ctx-size 4224, draft off, loads it (resident_bytes=78864215180, 48 layers). Four 4096-token prompts, two code windows and two English prose windows, each give 48 greedy tokens. They print the same text as the same checkpoint prepared with its dense matrices as Q8_0: PASS: prepared split = Q8 oracle on four 4096-token windows, 48 greedy tokens each.

What I ran into

This does not block the PR. Loading the folder itself with -m <folder> still stops at the PLE table, because a folder load reads F8 PLE rows only and this checkpoint stores NVFP4 rows. That reader comes in its own pull request.

Hardware (if the change is for a machine)

An NVIDIA DGX Spark, with the nvidia-smi lines above.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

@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 placement Placement planning: crates/placement tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 22, 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 coverage pins admit formats supported by both execution paths and retain named refusals for unsupported formats.

Checked

Duplicates: 2 new named items checked; no duplicate found. Dryer reported 0 pairs. The GPU table and by-name selector agree.

Complexity: No changed function crossed crapper's thresholds. The production change affects load-time coverage.

Silent failure: The selector's None result reaches Need::WeightFormat and a named load refusal.

Tests: Static mutation review of accepts.rs:255: dropping MXFP8 or admitting Q3_K makes the_qwen38_dense_pins_read_the_by_name_sites fail. Dropping BF16 or returning a wrong entry makes every_family_is_the_tables_dense_row_of_one_type fail. Rust and GPU tests were not run here.

Gates: Format pins widened with dated PIN comments and reported FAIL-first evidence. No tolerance moved; the model-tax ceiling decreased.

Escape catalog: C1–C4 have no matches. No ledger lessons apply.

Notes

The reported GB10 gate run lacks the tested base and head commit hashes. GPU evidence is incomplete.

Card check: needs-gpu. This pull request changes crates/gpu/src/site.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.

Not approved: a release freeze is on (#648), and a merge of a needs-gpu change now would change the tree under the release batch.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4
juliankang4 force-pushed the dgx-spark-q38-fp4local-mxfp8-pin branch from 5a8d1e5 to 7bb9b6b Compare October 22, 2026 10:40

@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.

Since the last review: no must-fix or non-blocking items were open. The GPU-evidence note is answered by the added tested commit hashes and gate output.

Verdict: CLEAN: The context-only rebase preserves the Qwen3.8 format checks and named refusals.

Checked

Duplicates: 0 new items in the interdiff; the 2 previously checked items are unchanged. Dryer reported 0 pairs.

Complexity: Crapper flagged no functions. The production change affects load-time coverage, with no decode or prefill work added.

Silent failure: 1 selector refusal path followed through Need::WeightFormat to PlacementError::Unimplemented; unsupported matrices produce a named refusal.

Tests: Static mutation review of accepts.rs:255: rejecting MXFP8 or admitting Q3_K makes the coverage assertions fail. Returning the wrong entry makes the assertion at site.rs:1694 fail. Tests were not run here.

Gates: The dated format-pin reasons and reported FAIL-first evidence remain unchanged. No tolerance moved.

Rebase: The router table now beside the deletion serves only NemotronHMoeBody. Program filtering prevents it from changing Qwen3.8 coverage. Q3_K and NVFP4 remain excluded from the by-name selector.

Escape catalog: C1–C4 have no matches. No ledger lessons apply.

Notes

Dryer did not scan crates/gpu; its changed test was checked by hand.

The reported GB10 gate run used head bac288fc9cb4b487a43bd9ca0ceea1f836b04526 over base 8a471012aa4a482dacb01ca7e6e90c23b344c04d, before this context-only rebase.

Card check: gpu-evidence. This pull request changes crates/gpu/src/site.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)

@github-actions github-actions Bot added gpu-evidence Verified on the author's card: the pull request carries the gate run and its output and removed needs-gpu Changes code a card must check, and carries no gate run on a card labels Oct 22, 2026
@juliankang4
juliankang4 force-pushed the dgx-spark-q38-fp4local-mxfp8-pin branch from 7bb9b6b to 2264ff9 Compare October 22, 2026 11:00

@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: carried from 7bb9b6b3, not re-reviewed.

The approval of 7bb9b6b3 stands for 2264ff9a. This pull request's 1 commit are the same patches in the same order: git patch-id --verbatim (the changed lines, the lines around them and whitespace) and the subject are equal for every commit. That review ran under the reviewer instructions, tools and slag ledger that review this head, and it approved.

The base moved, and changed none of the files this pull request changes.

A carry covers each patch's own lines and the lines around them. What the base changed elsewhere is covered by CI on this head and by the landing gates.

Card check: gpu-evidence. This pull request changes crates/gpu/src/site.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)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit 6e7f43f into midagedev:main Oct 22, 2026
6 checks passed
@midagedev

midagedev commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Merged. On our box: gate-gpu-lib, gate-model-hf, gate-gpu-qwen38-serve and gate-gpu-qwen38-nodes green on the fixture tier; gate-placement and gate-gpu-gates-lib run in the next real-tier batch. Thanks.

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 gpu-evidence Verified on the author's card: the pull request carries the gate run and its output 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.

2 participants