Repository navigation
cuda: serve --spill-gib and --checkpoint-slots for Nemotron, the Qwen hybrids and Flash Next (#840, split from #1359) - #1413
Conversation
|
Thanks for splitting the spill switch out of #1359 and for moving the shared wording into Three asks:
Once it is rebased we'll run Nemotron, a Qwen3.5 hybrid and Flash Next on a GB10: evict, restart and read back against fresh prompts, concurrent against solo, and no change without the flags. |
82a693e to
bd8ab9b
Compare
|
Thanks. Restacked on #1359's
Checks: |
… hybrids and Flash Next The CUDA disk tier now opens through rows.attach with the spill mode and slot count, as metal.zig does: --spill-gib writes states as RAM evicts them, --checkpoint-slots bounds the states RAM keeps beside the disk store. Families without a disk image refuse --spill-gib by name; --checkpoint-slots without a disk store is refused. The slot count, the --checkpoint-slots refusal and the flag a refusal names were metal_spill.zig's; they move to native/disk_spill.zig, which metal_spill.zig and CUDA both call (the Mac's words are unchanged). ashhart#1349 edits metal_spill.zig beside these lines and merges with this cleanly. docs/api.md describes main's writer for the three CUDA families: a copy staged at eviction on the engine thread and written on the I/O thread, the 1 GiB staging limit, the save at close and the read-ahead for queued requests. Co-authored-by: gilby <880013+gilby@users.noreply.github.com>
…--checkpoint-slots to the store A fake disk module opens the store through cuda_disk.open under a fixed identity, with no device, for --spill-gib alone and with --learn-conversations: the store's spill mode and the RAM store's slot bound must be the flags'. With main's open (Rows.open, no mode or slots) it fails: expected .evicted, found .off. native/cuda.zig's tests now reach cuda_disk.zig, and test-cuda-disk-open-host (part of test-cuda-host) runs it.
…p to the read-ahead paragraph docs/api.md's new CUDA paragraph ended "read ahead on an I/O thread, as described below", but the read-ahead paragraph it means sits above it in "Conversations on disk". It now says "above", and the paragraph's one 179-column line is folded at 120 columns like the rest. No other words change. Co-authored-by: jschmied <600316+jschmied@users.noreply.github.com>
bd8ab9b to
28ddca5
Compare
…n, the Qwen hybrids and Flash Next (#1413)
|
Merged, thank you @jschmied, and @gilby for your part. It ships in 1.1.8, with the changelog entry in 141cf65. As with #1359, we rebased your branch onto main to land it as a merge: your two commits as they were, plus our docs commit, which credits you. Our device run on a GB10, with
Every reply equals a fresh server's, at |
|
This is in TensorFold 1.1.8, released today. Thank you, @jschmied and @gilby! |
…rn-conversations alone keeps its states Since ashhart#1413 CUDA serves --spill-gib and --checkpoint-slots, and --learn-conversations admits GLM, so --learn-conversations --spill-gib (or --checkpoint-slots) opened GLM and ignored the flag: its disk store writes every rank's part between passes and stages nothing at eviction. GLM now refuses both by name. Its store's spill stays off, since an eviction would gather on rank 0 mid-pass while the other ranks wait in the gate's all-reduce. docs/api.md lists every CUDA family that keeps states on disk.
…rn-conversations alone keeps its states Since ashhart#1413 CUDA serves --spill-gib and --checkpoint-slots, and --learn-conversations admits GLM, so --learn-conversations --spill-gib (or --checkpoint-slots) opened GLM and ignored the flag: its disk store writes every rank's part between passes and stages nothing at eviction. GLM now refuses both by name. Its store's spill stays off, since an eviction would gather on rank 0 mid-pass while the other ranks wait in the gate's all-reduce. docs/api.md lists every CUDA family that keeps states on disk.
Part of #840, the "Spill of evicted states" row (#68, @gilby). Split from #1359 at review: this PR only turns on CUDA spill. Stacked on #1359 (Flash Next's disk image) and #1358; only the last commit is new here (82a693e).
native/disk_spill.zig:slots(),refusal(o, where)andflag().metal_spill.zigdelegates to it (refusal(o, " on Macs"), so the Mac wording is unchanged), and CUDA'scuda_disk.openandcuda_refusal.backendcall it. No wording is copied any more.metal_spill.zigtoo: it addswritesBehind()beside these helpers.git merge-treeof this branch with flashnext: shared sessions spill evicted states to disk (--spill-gib) #1349's head (90b2dc2) is clean. If flashnext: shared sessions spill evicted states to disk (--spill-gib) #1349 lands first,writesBehindcan move intodisk_spill.zigwith the others in a follow-up.Against #1411 (GLM-5.3-Flash): the spill refusal is a line of its own in
cuda_refusal.family, ahead of the drafter block, and its test is at the end of the file. Neither touches #1411's refusal edits; with both in, GLM serves--learn-conversationsand refuses--spill-gibuntil it declareskept_disk.disk_spill.zigis new, and #1411 does not touch it.How Nemotron spill is gated on CUDA:
--spill-giband--checkpoint-slotsinserves, so the server no longer refuses them for CUDA as a whole.cuda_refusal.backendrefuses--checkpoint-slotswithout the disk store (no--spill-gib, no--learn-conversations), with the shared wording.cuda_refusal.familyrefuses--spill-gib(spill == .evicted) for every family except Nemotron (nemotron.native, whose image isnative/cuda_disk.zig's own) and those that declarekept_disk(qwen3_5 and Flash Next). It does so on its own line, ahead of the drafter and--learn-conversationsrefusals:--spill-gib keeps evicted states on disk for Nemotron, the Qwen hybrids and Flash Next only on CUDA.native/cuda.zigmakes a prompt store only for a family withsnap_saveand a nonzero cache. Then, with--learn-conversations(which--spill-gibsets, together withspill = .evicted) and a learn root, it callscuda_disk.attach. That goes toopen()→rows.attach(..., .spill = o.spill, .slots = disk_spill.slots(o)).docs/api.mdnow names the three CUDA families that take both flags, and theOpen.spilldoc comment no longer says Macs only.So Nemotron spills exactly when the store exists and the flag reached it. A host test in
cuda_refusal.zigcovers the families that open with the flags and the ones refused by name.zig build testpasses on this branch, and lean shows 0 new problems against main.