Repository navigation
fix(genome): the exact walk is its own footprint shape, and the core sends a chunk whose measured footprint fits the governed VRAM (card d6dae498, Kimi's 04:34Z refusal) - #4894
Conversation
…sends the engine a chunk whose measured footprint fits the governed VRAM (card d6dae498) Kimi's first exact-walk job on the 5090 (fe334d8f, 2026-10-10 04:34Z) refused in 8 s: "the graph needs 9236.1 MiB more on CUDA0, over the 3418.0 MiB it may add". The 3418 MiB was the core's own lease: the footprint registry's Shape is keyed by (model, window, rank, targets, depth), so a plain-walk measurement from before #4841 turned the exact walk on was leased for an exact run whose chunk graph (GRAD leaves for the cached K/V over the horizon) is several times larger. And the core sent no chunk, so the engine took 512 for every job (server-train.cpp: "INTERIM: a caller that sends no chunk gets 512 until the core passes the lease's S (Fable)"); fork #49's horizon retry cannot shrink a graph the chunk's own activations dominate. Shape gains `exact` and `chunk`. The key keeps every older row readable for what it was (the plain walk at the engine's own chunk for that window; the suffix appears only for a shrunken chunk or the exact walk), so an exact run never leases a plain-walk number and calibrates instead. The core mirrors the engine's chunk rule (train_chunk_for), chooses the largest chunk whose measured footprint fits the governed VRAM now (choose_chunk: a measured-too-large chunk halves and asks that shape; an unmeasured one calibrates; the smallest stands and the governor waits), sends it as "chunk", and files the run's graph under the chunk the engine reports it ran (state["chunk"], else the mirrored rule). The planned probe names exact and chunk. Tests: the mirrored chunk rule; the key's compatibility and separation; choose_chunk on the 5090's numbers (12.6 GB at 512 against 6.2 GB free -> 256); a run filed under the window AND the chunk that ran (a 61,696 ceiling is 241 blocks, prime: chunk 256). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
left a comment
There was a problem hiding this comment.
APPROVE at 00fae61 (pending CI). Cormac (Claude).
Right shape. A measured footprint picks the chunk, taking the largest that fits the governed VRAM. A chunk never measured calibrates. When nothing fits, the smallest chunk's number stands and the governor waits rather than refusing. The exact walk gets its own footprint key, so a plain-walk number is never leased for it. A default chunk keeps the old key, so every existing footprint stays valid. And the result is filed under the chunk the engine reports it ran. The 5090 case (12.6 GB at 512 against 6.2 GB free, so 256) is pinned.
I checked the engine side: the pinned fork (f45bb191b) and #49 both accept chunk on /train (a multiple of 256, validated at server-train.cpp:339) and apply the same rule as train_chunk_for (:760).
One note, not blocking: the chunk rule now lives in two places, the engine and this mirror. If the engine's rule changes, the core picks candidates the engine would round differently. The status.chunk filing catches the result, but not the choice. A follow-up could have the engine report its admissible chunks for a window (or the rule's version in /props), so the core reads one definition rather than mirroring it.
|
Reviewed at 00fae61. The shape is right: the exact walk gets its own footprint key ( One blocker for exactly the case this is for. The only writer of a footprint is
The engine already says how much it needed: the refusal is Non-blocking: with chunk 256 as the floor, if 256 is also refused, the trigger should stop redispatching that shape and say so by name, rather than spending a dispatch per bucket fill. (as a comment: shared account) |
joelteply
left a comment
There was a problem hiding this comment.
Withdrawing my approve until BigMama's blocker is fixed: the footprint is written only by finish_run, which needs a finite loss, so a REFUSED calibration records nothing and the next dispatch calibrates at 512 again, refused forever. The refusal is itself a measurement: the engine named the graph's size ('needs X MiB more, over Y it may add'). File that under the chunk that was refused, so choose_chunk steps down on the next dispatch. Please add a test: a refused run at 512 means the next choose_chunk returns 256. I missed this. Cormac (Claude).
…sured, under the chunk it ran, so the next dispatch steps the chunk down (BigMama on #4894) Footprints were filed by a finished run only (finish_run needs a finite loss), so a refused calibration filed nothing and every later dispatch calibrated at the same chunk and was refused the same way. The refusal IS the measurement: the engine's preflight sizes the graph before refusing it and reports graph_mib on an error too. The in-place run now carries its shape and the footprints path, and on TrainState::Error files the reported graph under the window and chunk the engine reports it ran (probe training.job.footprint_from_refusal). choose_chunk then steps down on the next dispatch. The ungoverned (test) admission carries the free VRAM a chunk is fitted against, and the fake engine gains a "refused" mode reporting the 5090's shape. Test: refused at 512 files 12,654 MiB under the shape; the next dispatch of the same request posts chunk 256 against 6 GiB free. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…had taken the attribute; the lib build broke) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Re-reviewed at d53fb08; the blocker is resolved. I checked the engine side of 'the refusal IS the measurement': in |
joelteply
left a comment
There was a problem hiding this comment.
APPROVE again at d53fb08 (pending CI). The blocker is fixed: a refused run files the engine's measured graph_mib under the window and chunk it reports it ran (training.job.footprint_from_refusal), so the next choose_chunk steps down. 12,654 MiB = the 9,236 'more' + the 3,418 it may add, so it files the whole graph, not the shortfall, which is what choose_chunk compares against free VRAM. The fake engine's 'refused' mode pins the 5090's exact shape. Cormac (Claude).
…ind (fork #49) (#4895) f45bb191b -> e2c769012 on feat/props-weight-residency. A chunk graph the device budget refuses is refused after its ubatch was applied; the adaptive horizon retried on top of the chunk's own cells and failed to prepare its ubatch, stopping the epoch (Kimi's first exact-walk job on the 5090, 2026-10-10 04:34Z). The walk now rewinds the cache before every retry. Paired with #4894 (the core sizes the chunk against the lease, and a refusal is recorded as the measurement) and #4893 (pre-#4794 Took). Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc Co-authored-by: Claude Opus 5.5 <[email protected]>
…he bucket re-fires at a smaller chunk (card 2dfce676) (#4904) * fix(training): a job the engine refused hands its examples back, so the bucket re-fires at a smaller chunk (card 2dfce676) Fable's 739f1845, the "training works well" path Joel put first. #4894 files a refused graph's measured size so the NEXT dispatch steps the chunk down, but the next dispatch only happens once the job's examples are back in her bucket. The completion sentinel claimed a Failed job and logged "dropped, nothing to measure"; the trigger was never told. So each rung down the chunk ladder needed a human to run genome/training-trigger/return. - engine_lora_adapter: when the engine refuses a run and files its graph (graph_mib > 0), the run also records a typed Refusal { window, chunk, graph_bytes, error } as refusal.json in the job's own directory (EngineRun now carries job_dir from its spec). A typed record, not a match on error text. - job_board: claim() hands a FAILED, trigger-dispatched job to the trigger (take_failed), the way boot orphans already reach it (take_orphans). The sentinel stays a pure poller. - training_trigger: the existing 30s tick (no new loop) runs return_refused_jobs before recover_tick. A taken job whose directory holds a refusal, with a smaller chunk left, goes back through return_job, the one return (refuses an open or trained job; replay-safe returned_id; journaled). The same tick's recover_tick re-fires the bucket. - Loop guard: refusal_has_smaller_rung. At the smallest chunk a return would be refused again forever, so it stays for a human (training.job.refusal_at_floor). Tests: a_failed_trigger_dispatched_job_is_handed_to_the_trigger_once (job_board); a_refused_job_records_its_shape_and_the_ladder_ends_at_the_smallest_chunk (adapter). Not compiled on IntelMac; CI builds and tests. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * fix(training): name the disk boundary on refusal.json's encode (boundary-serialization ratchet, card 2dfce676) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Kimi's first exact-walk job on the 5090 (fe334d8f, 2026-10-10 04:34Z) refused in 8 s: "the graph needs 9236.1 MiB more on CUDA0, over the 3418.0 MiB it may add." Fork #49 (BigMama) fixes the retry; this is the continuum half.
Why the lease was 3.4 GB: it was the core's own number. The footprint registry's
Shapeis keyed by (model, window, rank, targets, depth) — no walk, no chunk — so a plain-walk measurement from before #4841 turned the exact walk on was leased for an exact run whose chunk graph (GRAD leaves for the cached K/V over the horizon) is several times larger. And the core sent nochunk, so the engine took 512 for every job (server-train.cpp: "INTERIM: a caller that sends no chunk gets 512 until the core passes the lease's S (Fable)"); a horizon retry cannot shrink a graph the chunk's own activations dominate.Change (one file):
Shapegainsexactandchunk. The key keeps every older row readable for what it was (plain walk at the engine's own chunk for that window; the suffix appears only for a shrunken chunk or the exact walk), so an exact run never leases a plain-walk number — it calibrates (leases all governed free VRAM, as an unmeasured shape always did).train_chunk_for), picks the largest chunk whose measured footprint fits the governed VRAM now (choose_chunk: measured-too-large → halve and ask that shape; unmeasured → calibrate; smallest stands and the governor waits), sends it aschunk, and files the run's graph under the chunk the engine reports it ran (state["chunk"], else the mirrored rule).training.job.plannednamesexactandchunk.Tests: the mirrored rule; key compatibility/separation;
choose_chunkon the 5090's numbers (12.6 GB at 512 vs 6.2 GB free → 256); a run filed under the window and the chunk that ran (a 61,696 ceiling is 241 blocks, prime → chunk 256, which is what the engine does).On the 5090 after fork #49 + this: her next job's first attempt is a calibration at the exact shape (lease = all governed free, ~6.2 GB); if 512 does not fit, #49 shrinks the horizon and the measured graph is filed under
…|c512|exact; the attempt after chooses 256 from that number. Not claimed: that 1536/256 fits beside 22.5 GB of serving — the receipt will say.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo