Repository navigation
Conversation
ashhart
force-pushed
the
lead/qwen3-cuda-leftovers
branch
from
November 23, 2026 11:22
278b56e to
4a6f6cc
Compare
The Qwen3 dense CUDA loader bound the embeddings, norms and every projection but never audited what was left: a stray tensor in the checkpoint was silently ignored. The host-read lm_head rows are now marked as consumed (names.readRows takes them later), and any remaining name refuses the load with UnusedQwen3Tensors, matching the other CUDA loaders' closeout. Checkpoint.unused's naming log is gated on is_test, as its siblings in checkpoint_coded/read_ahead/identity already do, so a test can exercise the refusal without the runner counting error logs. weights.zig joins the module test block and covers a complete tiny checkpoint and one with a stray tensor.
ashhart
force-pushed
the
lead/qwen3-cuda-leftovers
branch
from
November 23, 2026 17:28
4a6f6cc to
ee2442c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The Qwen3 CUDA loader checked the dtype and shape of every tensor it binds, but silently ignored any tensor it did not bind. It now ends the load with the checkpoint's leftover-tensor refusal, as GLM, DeepSeek, Nemotron and the other audited families already do; the host-read
lm_headis marked as used.checkpoint.unused()'s naming log is skipped in tests, matching the other checkpoint readers, so a refusal test does not fail on the log line.Part of a weight-loading audit of the CUDA and HIP families. Families with gaps that need per-family rules (layer-prefix loads, shared draft directories, custom trackers) are left for separate changes.
Checks
test-qwen3-cuda-host21/21, including a leftover-tensor refusal case; fmt, ast-check.Still to run
Load every Qwen3 checkpoint we list for CUDA on a GB10 and confirm none is refused and tokens are unchanged.