Repository navigation
prompt radix: a checkpoint inside a page keeps a writable tail, a held copy never written again (#2444 P2, C4) - #3329
Conversation
|
Thanks @laudney. The tail keeps a separate store-held copy, resumes through a page from the stream's own promise, and fences copies before releasing their sources. The 74 radix cases, 28 pool cases and focused pool/adapter checks pass, including root tails, failure cleanup and namespace/lookahead matching. No current family enables tails. The shared store paths still need the pending CUDA cache regression checks against #2888; we will run those on our side. No requested source changes.
|
8b159f0 to
e16e223
Compare
|
Thanks @laudney, the rebase reads right, both commits unchanged and the full host suite green on the new head. Nothing new to review in the change itself. What is left is ours: the CUDA cache regression checks against the landed base that we said we would run, on this head. Once they pass this goes into the queue, and no family turns tails on in this step, so nothing served moves a token meanwhile.
|
|
Thanks @laudney. The rebase holds both commits unchanged, and the full host suite is green on the new head. The tail keeps its own store-held copy, resumes through a page from the stream's own promise, and is counted in reclaim; the planted removals each fail their tests. No family turns tails on in this step, and the posted token hashes and cached counts equal the base. Nothing further is needed from you. We will run the cache regression checks on our side.
|
C4 of ashhart#2444: a store that declares tails cuts at any row its request schedule allows, and a keep off a page edge holds one copy of the partial page per prefix group, made by copy_rows and never written again; a later prompt that repeats those rows, their lookahead, images and namespace resumes there and copies the page into its own. Tails count in the page limits, reclaim and eviction like parts, and a store without them keeps every mark, hit and eviction of P2.2.
A resume at a tail takes its private page from the stream's promise, trims it back on failure, and leaves the store's copy unwritten; an idle tail is reclaimed before a page a stream still maps, so the pool's census stays exact across the tail's whole life.
e16e223 to
9f28b2b
Compare
|
Thank you @laudney. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
What this changes
P2 of #2444, its third and last step: writable tails (C4) in the core radix store. A checkpoint may now sit inside a page. The store holds a copy of that page's valid rows and never writes it again. No store user turns tails on in this step, so every current user stays byte-equal.
[0, r)copied by the family'scopy_rows, never written after that keepCopythe stream makes into a page of its own promise, thenfinishreleases the sourceA tail is a separate entry on the node that ends at its page edge, so one edge can hold its own entry and several tails. Copies and
copy_rowsnumber the part groups first and prefix grouppasparts.len + p, so #2875's part numbering stands. The family view (kv_prompts.zig) does not change yet: no family's mark leaves a page edge until one declarescopy_rows.atc overlap --json: incomplete today (its time and request limits), so the files of all 350 open pull requests were compared directly: the only overlap is prompt radix: pages carry their reuse identity, and a request's chunk starts decide its resumes (#2444 P2, C6) #2888, the base of this stack.Checks on this head
zig build test: 5923 passed, 25 skipped;zig build test-cuda-host: 4035 passed, 10 skipped;zig build test-kv-pool: 28 passed; the store's tests: 74 passed;zig fmt --check build.zig zigandgit diff --check: clean.Receipt
TF_QWEN_KV_SHARE)TF_KV_SHARE), TP=2TF_KV_SHARE)TF_KV_SHARE)GLM at TP=2 with
--vision, a long shared text then picture A, picture B at the same position, A again: equal, cached 0 / 6144 / 8192 on both heads.TF_KV_SHAREfamilies, Qwen 3.5/3.6 on CUDA, Qwen 3.5 and Nemotron on HIP).Groups.tailsis a store declaration that no family sets yet.donelines, one run each, base / head: resumed ttft 0.303 / 0.304 s (Qwen 3.6), 0.193 / 0.193 s (Gemma 4 31B), 0.163 / 0.163 s (Kolibri-1), 0.096 / 0.097 s (Nemotron HIP), 0.094 / 0.092 s (Qwen 3.5 HIP); decode 11.6 / 11.6 (Gemma), 48.0 / 47.5 (Kolibri), 237.6 / 237.2 and 82.5 / 82.4 tok/s (HIP). Qwen 3.6's decode median is 70.7 / 67.6, all of it one request of nine (the others within 1 %; unset and off 70.3 / 69.8 and 70.5 / 70.2). The change adds a walk over an edge's tails at a hit and at a keep, nothing per token.Host: the store's tests (74) and the kv-pool checks (28): the same off-page position marks a tail with tails and its page edge without; a tail resumed by a prompt that diverges past its rows and missed by one that diverges inside them; a tail inside the first page (on the root) kept, found, resumed, evicted and reclaimed; three tails on one edge, the deepest usable chosen under a request's starts; a tail at a grid row inside a request's chunk refused; a page-only store with and without state slots; tails refused without
copy_rowsor a pool that holds pages; a window group with other rows a page copying its own rows at a tail and at an edge; hold, copy and allocation failures that leave nothing held; supersession only under the tail's own key and namespace; over a real pool, the private copy taken from the stream's promise and trimmed back on failure, the store's copy never written, and an idle tail reclaimed first. Planted removals (tail words ignored, tails' cut rules ignored, tails skipped by reclaim, the tail's Ns or lookahead ignored in eviction) each fail their tests.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Resumed equals fresh, above; the rest not run.)