Repository navigation
native: a CUDA family's prompt cache, weight share and open errors come from its own declarations - #762
Conversation
…me from its own declarations The CUDA host wired Nemotron's prompt-cache copies, rules and budget in by name. They now come from the family's `snap_*` declarations through `cuda_snaps.zig`: a family without `snap_save` gets no prompt cache, `snap_ready` sets aside its state buffers, and `snap_grid` makes the store keep states only on the family's chunk starts (a family whose rows depend on where a prompt's chunks begin), and `warm_quiet` turns on the quiet-turn reply prefill (warm turns and the store's `.waits`). Nemotron declares `warm_quiet` and no grid and keeps 1.0.9's rules: any row, the head one token on, warm turns, the same budget. Three more hooks for a family split over hosts: `weightShare` (the weights this rank holds, for the memory check), `explains_open` (the family's own text for an open error) and the learner only for a family with `slide`. Nemotron's open, cache, warm turns and --slide are unchanged; `cuda_snaps.zig`'s test covers the rules each way.
bf10491 to
185bc33
Compare
|
Rebased onto 1.0.9. Its Nemotron store gained warm turns ( |
|
Thank you, @Bizuayeu. Taking a CUDA family's prompt cache, rules and budget from its own It ships in TensorFold 1.0.12 under your name ( On a GB10 with Nemotron 3.5 Lightning, MLX 4-bit and NVFP4: multi-turn chats (three turns, then a regenerated, an edited and a deleted turn, thinking on and off) resumed with the same cached tokens as the build before, step for step, and their replies equal both that build's and a cache-off server's, 12 of 12 on each format. Drafted equals
Posted by Ash's AI Assistant Synthena |
The contributor's commit landed above with the same code; this keeps the PR's head in the history with no change to the tree.
…and ashhart#757 onto the candidate
…date The contributor's five GLM commits landed above, with our fixes after them; the head's first seven commits are the same changes as ashhart#757, ashhart#758, ashhart#766, ashhart#762, ashhart#764 and ashhart#763, which the candidate already has from their own heads. This keeps the PR's head in the history with no change to the tree.
What this changes
The CUDA host wired Nemotron's prompt-cache copies, rules and budget in by name. They now come from the family's
snap_*declarations throughcuda_snaps.zig: a family withoutsnap_savegets no prompt cache,snap_readysetsaside its state buffers, and
snap_gridmakes the store keep states only on the family's chunk starts (for a familywhose rows depend on where a prompt's chunks begin). A family that declares
warm_quietgets 1.0.9's warm turns(
.warm = .waits). Nemotron declareswarm_quietand no grid and keeps 1.0.9's rules: any row, the head onetoken on, warm turns, the same budget.
Three more hooks for a family split over hosts:
weightShare(the weights this rank holds, for the memory check),explains_open(the family's own text for an open error) and the learner only for a family withslide. TheGLM-5.3-Flash family (#548) uses all of them.
Receipt
c36b536d) plus this change; one GB10 (DGX Spark, sm_121, CUDA 13.3).--slideare unchanged (the same calls and rules, now through thefamily's declarations).
zig build test-cuda-host: 430 passed, 0 failed; the new "a family with snap_grid keeps on its chunk starts, anyother at any row as Nemotron does" needs this change.
zig build test: 620 passed, 5 skipped, 0 failed.zig fmt --check: clean.lean_check: 538, as main.weightShare,explains_openand theslideguard are not covered by a host test: they are branches ofopenWith, which needs a GPU and a real checkpoint to reach. The GLM-5.3-Flash family's runs at TP=2 and TP=3 (Zig CUDA ports: shared layers belowlanes.Backend, and one place to coordinate them #548) go through all three.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.