Repository navigation
lanes/recorder: --record writes each stream's committed rows and tapped features for drafter training; Nemotron CUDA gives its final norm's rows - #848
Conversation
…ed features for drafter training; Nemotron CUDA gives its final norm's rows
|
Thanks, @jschmied. The recorder's forwarding and the Nemotron row checks are useful, but this needs two changes at b0af8d5.
These are source findings; we have not rerun the CUDA receipt. |
…lder; a chunked prompt is recorded when its last chunk completes - Recorder.init creates <dir>/<pid>-<k> with mkdir (the first k no file, folder or link has), opens it without following links and keeps the handle; every stream file and summary is created exclusively inside it, so a link or an earlier recording is refused, never written through or overwritten. - Recorded.prefillStep records the prompt when prefill_step returns true (done); it did so on false. - Tests: one-chunk and three-chunk prompts through fillStream, two recorders in one folder, a link where the folder would go, and links planted as a stream's files and summary.
|
@ashhart, thank you. Both are fixed in
New tests, all on the fake target:
In each case, nothing reaches the link's target and the replies are unchanged. Each of these mutations fails a test: the old CUDA receipt rerun (Nemotron, GB10, the same six requests as before: drafted, plain, sampled, two concurrent). All six replies match the earlier receipt and the run without |
|
Thank you, @jschmied, for the exclusive-folder changes and the one- and three-chunk completion tests; both original findings are closed. One cleanup error remains at 617f8ee. Please move the terminal-limit check before the manual free and cover that branch with a small injectable collision limit. That gives the error path one owner without needing 65,536 collisions in the test. Posted by Ash's AI Assistant Synthena |
… so the errdefer is its one owner; initTries tests that branch
|
Thank you. Fixed in |
|
Thank you, @jschmied, for adding the three name collision regression in We checked e5e03ba. At This is ready for the landing batch after 1.0.12. Posted by Ash's AI Assistant Synthena |
|
Thank you. It's out of draft now, and the description's receipt is rerun at |
…he host is made After #848 met this tree's three CUDA families, openWith read `loaded.taps` for every family, and only Nemotron's Loaded has the field: the GLM instantiation would not compile. Taps now come from the family when it gives them and are empty otherwise, so --record is refused by name for GLM-5.3-Flash and Super VL. The two refusals (no rows to record, a folder that cannot be made) now return before the host, its store and its learner are made, where a null return released none of them. The recorder's parts move to cuda_record.zig so native/cuda.zig stays under 600 lines.
…VIEW names the refused GLM pair requests rightly One line each for #881, #882, #883, #889, #890, #709, #848, #892, #867, #868, #871 and #873, crediting their authors. ZIG-PREVIEW said a two-Mac GLM pair refuses "temperature-1" requests; it refuses any temperature above 0 (backend.zig and engine.zig both test temperature > 0).
|
Thank you, @jschmied, for the recorder's terminal-collision fix and ownership checks. #848 is included in 1.0.12 as merge ad42024, at e5e03ba. --record DIR writes committed tokens and target rows into a fresh recording folder; Nemotron CUDA records its final norm rows. The merge combines recording with the existing image path. In 8e90bef we read taps only from families that provide them, so GLM and Super VL refuse --record by name before allocating the host or prompt store. The recorder code moved to native/cuda_record.zig. On GB10, all 17 Nemotron recorded cells equal their unrecorded controls, and drafted replies equal plain ones. The run wrote 170 files, 113 MB. Posted by Ash's AI Assistant Synthena |
…apped features for drafter training
…he host is made After ashhart#848 met this tree's three CUDA families, openWith read `loaded.taps` for every family, and only Nemotron's Loaded has the field: the GLM instantiation would not compile. Taps now come from the family when it gives them and are empty otherwise, so --record is refused by name for GLM-5.3-Flash and Super VL. The two refusals (no rows to record, a folder that cannot be made) now return before the host, its store and its learner are made, where a null return released none of them. The recorder's parts move to cuda_record.zig so native/cuda.zig stays under 600 lines.
…VIEW names the refused GLM pair requests rightly One line each for ashhart#881, ashhart#882, ashhart#883, ashhart#889, ashhart#890, ashhart#709, ashhart#848, ashhart#892, ashhart#867, ashhart#868, ashhart#871 and ashhart#873, crediting their authors. ZIG-PREVIEW said a two-Mac GLM pair refuses "temperature-1" requests; it refuses any temperature above 0 (backend.zig and engine.zig both test temperature > 0).
What this changes
Item 2 of #620: a recorder in the core that writes what serving computes, for training drafters. It records with drafts on or off. Nemotron on CUDA is the first family to give it rows.
zig/src/core/lanes/recorder.zig:Recordedsits in front of anylanes.Backendthat givesfeatures. It forwards every entry the target gives.cachedon).prefill_step) is written when its last chunk completes.<dir>/<pid>-<k>: the firstkthat no file, folder or link has. It opens it without following links and keeps it open.Recorder.initTriesgives up after a number of taken names;initallows 65,536.<n>.tok(u32 tokens),.pos(u32 cache rows),.kind(u8, 1 for a reply's row) and.st(the tapped rows, asfeaturesgives them).<n>.json: rows, first row, prompt length, taps, row bytes, dtype, top-k, and the gap if one stopped the stream.logprobsit also writes.top: each reply token's ids and logprobs.queue) round stops there and its.jsonsays so.zig/src/families/nemotron/cuda_lanes.zig:prepare_features/featuresfor one tap, the final norm's rows (tap = layer count). These are the rows its head and MTP head read.Engine.tapshook. The hook is called inserialChunks. Staggered segments are skipped while it is set.hiddenbuffer before the next verify.--record DIR(server/cli.zig,native/cuda.zig): the CUDA server putsRecordedin front of a family that names taps (Loaded.taps).DIRmust exist. The log names the recorder's folder in it.Receipt
2984ea01plus these three commits (heade5e03baa). One DGX Spark (GB10, sm_121, CUDA 13). Nemotron 3.5 Lightning MLX 4-bit.mainis nowc7137bb3; its two new commits touch onlyapp/. The branch merges without conflicts.--record: six completions give identical reply shas: code drafted, prose drafted, code"draft": false, code sampled (seed 7), and code + prose concurrent, 128 tokens each..tokand.stfiles of the drafted, plain and concurrent streams are byte-identical (code: 163 rows x 5,376 bytes; prose: 165 rows)..tokand.stbyte-identical; 5,031 rows, positions 0 to 5,030, 31 reply rows;<dir>/<pid>-0. A second server on the sameDIRmade its own folder next to the first, which it left as it was.cached_tokens.zig build test(46/46 steps, 753/758 tests, 5 skipped) andzig build test-cuda-host(27/27 steps, 475/475 tests);tf-cuda-test glue1,242/1,242.zig fmt --checkclean.lean_check.py: 527 findings, as onmain.recorder_test.zigruns the fake target with and without the recorder: drafted, plain, shared (batched or not), greedy and sampled, a restored prompt, logprob rows, and one-token rounds.initTriesout of names..stmust equal its.tok.exclusive;follow_symlinks = true. A link planted beforemkdiralready fails there, so the flag only guards the moment betweenmkdirand opening.features). A CUDA family other than Nemotron (none onmain).core/lanes/drafted.zigis unchanged: a drafter behindDraftedand the recorder can share a target. Item 1 (the release format) and item 5 (the recipe) follow as their own PRs.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.