Skip to content

gemma4 drafters, hy4_flash cuda: refuse leftover checkpoint tensors - #4566

Merged
ashhart merged 6 commits into
mainfrom
lead/cuda-leftovers-gemma4-hy4
Nov 24, 2026
Merged

ashhart merged 6 commits into
mainfrom
lead/cuda-leftovers-gemma4-hy4

Conversation

@ashhart

@ashhart ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What this changes

Follows #4537 and #4552. Three more CUDA loaders end with the checkpoint's leftover-tensor refusal:

  • Gemma 4 assistant: it opens its own directory, so any unbound tensor there is refused; its tied head is marked used once.
  • Gemma 4 DFlash: the refusal covers only the drafter's own prefix, so the main model's tensors in a shared directory never count.
  • The hy4_flash family: the refusal sits at the last read site, since the checkpoint stays open after the first weight check.

Checks

  • Host tests per loader: an extra tensor is refused by name, a complete checkpoint loads, tensors owned by another loader in a shared directory do not trip it; fmt, ast-check.

Still to run

Load the real checkpoints for each on CUDA and confirm none is refused.

DV25's audit named these seams. The gemma4 assistant's own directory
binds every name it opens, so a full refusal is exact. The DFlash
draft shares the model's directory: openModelPrefixes indexes only its
fc./hidden_norm./norm./layers. roots, so model./vision_ tensors owned
by other loaders never count. hy4_flash's checkpoint stays open past
weights.check for the per-layer loads, so the refusal sits after the
layer loop — the checkpoint's last read site.
The table is read through openDirect rather than Checkpoint.get, so record its exact name after the direct open succeeds. Close the table if recording the name fails. Extend the checkpoint fixture with that table: the complete load passes the leftover audit while a stray tensor is still refused.
@ashhart
ashhart force-pushed the lead/cuda-leftovers-gemma4-hy4 branch from 3ce1b1d to 42838d7 Compare November 24, 2026 10:05
@ashhart
ashhart merged commit 9fa8863 into main Nov 24, 2026
12 checks passed
@ashhart
ashhart deleted the lead/cuda-leftovers-gemma4-hy4 branch November 24, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant