Repository navigation
kolibri1: the published EAGLE-3 drafter behind --drafter on CUDA (don't land yet: c=8 -1.1 %, a cold prompt's second token 58 ms later) - #3590
Conversation
|
Thanks @jschmied, this is careful work. The receipts in the body make it easy to review. What's good:
Must fix:
Optional:
We have two small commits of our own ready, with no behaviour change, and will add them on top once the branch is rebased: one moves a comment in Device check: GB10 (CUDA), exactness and speed with and without
|
b850645 to
818c7df
Compare
|
@ashhart Thanks. Rebased on main Must fix
Optional
Your two commits can go on top. The fixed-1 GiB line in |
|
Thanks @jschmied. Our GB10 run on this head ( On the 8-stream question we owed you: yes, please feed
A faster opt-in path that is slower in any cell doesn't land with us, so (1) is the bar. Once you post those, we'll run the
|
|
@ashhart Thanks. Done; the new head is What changed
1. Speed (binary A-B-B-A as before: each server runs c=1, then c=4, then c=8. Same replies on all servers, 0 empty.
2. Exactness (same binary): all true, 0 empty.
Tests
Default path: your GREEN run on Not run
The proposed CHANGELOG line is in the body; there is no CHANGELOG commit. |
|
Thank you @jschmied for the hold-cost rule and for re-running the exactness gates. Drafted replies still equal plain replies, and copy-only still matches main. The bar we set was no slower in any cell. On a fresh server at c=8 your four drafter runs are all slower, by about 1.6% at the median, so that cell is still open. Could you run c=1, c=4 and c=8 first on fresh servers with A-B-B-A, on a head rebased on current main? The two Zig files and the README recipe do not apply at this head.
|
|
Thanks @jschmied. The hold-cost plumbing, reserve-time facts and exactness receipts answer those asks. The fresh-server eight-stream slowdown remains open. Please rebase on current main, preserving its test registrations and moved model documentation, then post A-B-B-A runs with one, four and eight streams each first on fresh servers. The same exactness gates still apply.
|
68fda81 to
5e0d06b
Compare
|
@ashhart Thanks. Rebased and re-run; the new head is Rebase. The 14 commits are cherry-picked; code unchanged. Main's test registrations are kept in Speed. Binary
A/A spread: 0.5 / 1.2 / 0.8 % (main), 0.6 / 1.6 / 1.9 % (drafter). The c=8 cause is visible. The servers' own Exactness (same binary): all true, 0 empty.
Tests. GB10 host (kolibri, cuda, hold-pass, shared-price-learning, lane-api): 434/434 steps, 0 failed. x86 lane: The body names the new head; the proposed CHANGELOG line is in it, no CHANGELOG commit. |
|
Thanks @jschmied for the clean rebase keeping The
|
|
@ashhart Thanks. I built the per-stream bound and measured it. It makes things worse, so I have not pushed it. What the bound does (local commit Exactness on that binary ( Speed. Fresh servers, A-B-B-A-A-B-B-A, each stream count run alone; A is main
Without the bound, the current head gives +27.0 / +4.9 / -1.9 %. So the bound costs about 6.6 points at c=4 and Why. The bound does stop most drafting: tokens per round fall from 1.62 to 1.16-1.19 at c=4, and from 1.65 to Next. A fix has to make a copy round under Tests on the bound commit. On the GB10 host: 434/434 steps. On x86: fmt 0, and gradient and cuda are green; |
|
Thanks @jschmied for measuring the bound and keeping the worse experiment off the PR. The rebase, hold-cost plumbing, reserve-time facts and reported exactness checks answer the earlier asks, but the published head still loses at eight streams. Please share the isolated cost measurement with a loaded drafter and no holds, then the proposed absorb/catch-up design before changing that state path. The no-slowdown and exactness gates remain open on the eventual updated head.
|
|
@ashhart I measured the cost I promised: it is the drafter's absorb pass. Don't land yet. The PR head stays at How. I used a local diagnostic build: PR head plus switches, never pushed. It loads
Where it sits (c=8, two servers per arm, in mirrored order):
nsys on a short c=8 run, same binary, absorb on vs off: +1,512 Proposed design (not built yet; tokens cannot change, because the target still verifies every draft):
Steps 1, 2 and 4 are lane-core changes. Step 3 is a backend fact. The gates would be a host test that eager and Expected effect (an estimate, not measured): a round without holds would then cost the same as on main (the Should I build it this way (lazy absorb plus the per-stream bound) and re-run the gates and the fresh c=1/4/8? |
5e0d06b to
0667f74
Compare
0667f74 to
2ffa4f9
Compare
|
Thanks @jschmied for narrowing the overhead to the drafter's absorb pass: -3.9% at eight streams with holds off, -0.1% with absorb skipped, and level without With
|
|
@ashhart, the sketch is in #3590 (comment); in short, for agreement before I touch the state path (nothing is built yet, head stays
Steps 1, 2 and 4 are lane core and opt-in by fact; step 3 is a backend fact. Gates: a host test with a fake drafter that eager and deferred absorbing give the same held drafts after N hold-free rounds and across a ring wrap; the served gates as before (drafted == plain, c4/c8 == solo, resumed == fresh); then fresh A-B-B-A at 1, 4 and 8 streams against main. The bound would come back with it, since on its own the deferral saves little (about 4 % of eight-stream rounds hold nothing without the bound). If that matches what you want, I'll build it on this branch. |
6946958 to
230d1c9
Compare
|
@jschmied Thanks for the careful Kolibri-1 drafter work and the absorb measurements. One small fix in The red build on this head is not from your code. Our rebase changed the
|
230d1c9 to
440b9e3
Compare
|
Thanks @jschmied for the rebase and the fresh-server speed measurements. The drafter still has three correctness blockers:
The recipe also gives only abbreviated drafter revision After the initialization and allocation fixes, please rerun the c=1/4/8 fresh-server A-B-B-A gate. The current receipt still has c=8 at -1.9%, slower in all four pairs, so the no-slower-cell condition is not met yet.
|
|
@ashhart Thanks. Both reviews are answered on 1. Clear before timing ( 2. 3. Early memory check (
The first stream's drafter slot and the timing slot are not in the server's stream plan, so they are now allocated 4. Recipe ( Exactness. Binary
Speed.
Why. One nsys round on the cold prompt: of +1.51 s of kernel time, x86 full set: green (0 failed), apart from one lean finding (a two-line comment), fixed in the head; |
|
Thanks @jschmied. The cache clears, calibration for one to three streams, slot/window accounting and full drafter pin are present. One memory gap remains: calibration allocates a 300 MiB tap ring after the page-pool plan, without pricing it. Please include that allocation in admission and add a tight-budget boundary check. The eight-stream and cold first-token losses still block landing. You have supplied the absorb sketch; its design decision and the graph/tap integration on main are ours.
|
|
I replayed the paged admission case on a scratch merge of For the tap-ring boundary Ash flagged, I extended the existing eight-stream Igor Lessio - AIFLOW LABS |
… one does Main's round graphs (cd00818) replay a decode round of several rows, but only the eager branch called Taps.kept after the forward. With graphs on (the default) a drafted round's rows never reached the ring, so the drafter's next read found stale positions. kept now follows both branches; the graph's launches already hold the tap copies into tap_rows. A round graph captured before the drafter named its taps copies none, so prepare_features drops the round graphs as it drops the step graphs, and the round fingerprint holds tap_rows and the tap count.
…ast the keys only each slot's last row A part's rows before Dims.firstNeeded (its end less a window a layer) are skipped: no later row and not its last output reads their keys and values, which a row's own inputs alone make. In the last layer only each slot's last row runs past its keys and values (pack): its attention, output projection and MLP. The row kernels and their arithmetic are unchanged.
… prompt after its first token, its absorb priced Facts.lazy_rows: a depth-0 request's kept rows are owed (position and the token after each, as its round gave it) while owed plus new rows fit; the stream's next hold, a non-contiguous or tree round, or the limit absorbs them first, oldest first, in the same absorb. A lazy drafter's last prompt chunk is absorbed at the first draft, which runs after the first token is out (first_before_draft). Facts.absorb_ms joins a round's hold pass price in payHoldsFor, so a round of copies pays no absorb. Kolibri-1's drafter owes up to a tap view (64 rows) and times its absorb pass at reserve. Host tests: test-lazy-absorb-host (eager and lazy give the same drafter rows and holds, past a 256-row ring wrap, limits 47/48/49/64; through the engine the same tokens, drafts and accepts; planted catch-up off fails), hold pass with an absorb price.
… the new one is made reserve freed the drafter's slot table before allocating the larger one; when that allocation failed, the drafter kept the freed slice and teardown freed it again. growSlots makes the new table first, then frees and swaps. Test: a smaller reserve, a larger one failing its allocation (FailingAllocator), the smaller table intact and freed once; the old order fails it.
…ps the drafter's reach for its first draft A reply of one token never drafts, so its prompt pass absorbs no rows. A lazy drafter names its prompt reach (layers x (window - 1)); Kolibri keeps the filling prompt's last 2,048 tap rows in one 31.5 MB slab, so earlier prompt chunks wait for the first draft too, after the first token. A second prompt filling meanwhile absorbs as it goes.
…h each weight load serving 8 rows tf_dense_rows_tiled keeps tf_dense_rows' per-lane k order and shuffle tree for every output, 8 rows x 8 columns a warp, so its bytes equal tf_dense_rows_32's at any row count; rows() takes it past 64 rows (a prompt chunk's router, a drafter's absorb pass). Registered with the kernel contract as a replacement of tf_dense_rows_32.
…where it can, and holds nothing where it cannot A prompt-cache hit restores the target's state, not the drafter's, so a resumed stream's drafter slot held another stream's rows. Drafter.fresh_only names a drafter whose state does not survive a restore (Kolibri's EAGLE-3); Qwen's tree drafter, whose state does, is unchanged. - The cache hit stays: Kolibri restores the kept state, then, for a drafted stream whose restore lies inside the drafter's reach, re-runs the prompt pass from the slab's first row (the prompt's last 2048) up to the restore. The forward is chunk-invariant, so the re-run rewrites the same keys and values; its tap rows fill the slab and the drafter absorbs them as on a cold prompt. Stream.rebuilt names where the pass started; fill_at, marks and kept states stay at or past the restore. - A restore at or before the prompt's last row minus the reach needs nothing: every row a draft reads is re-run after it and absorbed as a cold prompt's. - Where a re-run cannot be exact (a key it reads has left a sliding ring), the restored stream's drafts are fillers: no absorb, no hold. Its first token is still read. kolibri-drafter-resume compares cold and resumed drafter K/V, output row, accepted drafts and reply, greedy and seeded, for a restore before the reach, inside it and on a 131-token prompt restored at 45. Host: fresh_only reads a restored stream's first token and holds nothing for it; a restore before the reach, or one the pass rebuilt, holds. Also: the comments past 120 columns at drafted.zig, drafter.zig and kolibri1/drafter.zig on lines of their own.
…not fill_at A warm replay below the restore publishes fill_at at the restore (its cache-hit accounting). The drafter read that field as the end of the rows the target had computed, so a replay crossing a grid line asked for rows the target had not rebuilt yet, and the tap view refused them. Stream.fed is the pass's replay frontier, set by Kolibri's chunk loop and reset at each opening; Drafted.prefillStep reads it where it is set and fill_at elsewhere, so other backends are unchanged.
…e helper as the entry, and the tiled spec is inline A review pass on 7e5f989: run and replaced built the same launch twice. launchTile takes the tile and the output, run passes its own entry and output, replaced passes the tf_dense_rows_32 entry and its temporary. The grid and the entry are the same as before. tiledSpec had one caller, so denseSpec returns its spec directly.
…every key the re-run reads A kept state holds a sliding layer's last window - 1 keys (snap.tail), not its ring, so a re-run of rows before the restore reads keys it never kept. On a 4,001-token prompt restored at 3,001 the re-run from 1,953 landed 22 drafts where a cold prefill landed 25. The rebuild now runs only from row 0 with the restore below the sliding window (512 positions on Kolibri-1), where every key is kept: the served benchmark's 45-token prefix. Elsewhere inside the reach, the restored stream's drafts are fillers. kolibri-drafter-resume: the 4,001-token case now checks the fallback (no drafts, reply == cold).
A filler proposal can be accepted when the target picks the same token again, so zero accepted drafts is the wrong check. The reply equality and the no-rebuild check stay.
Measured on f6ae3a8: 3 rounds of A-B-B-A against main's copy drafts per stream count, the cold prompt's first and second token apart, and when a prompt-cache hit rebuilds the drafter's state.
2ad6478 to
9199420
Compare
… a round with one token left drafts none The prompt rows a lazy drafter's reach reads are absorbed with the last prompt chunk, before the first token, so the round after it waits for no absorb. A first round of no drafts owes the prompt's last row to the next hold. A stream with one token of room left drafts none: a verify of the pending row alone gives that token.
…e round after it sees it A two-token reply's first round drafted one row before its second token, which is the interval the drafter's absorb is priced into.
…e tiled launch tf_dense_rows_tiled gives the 16-row launches' bytes at every row count (micro: head 128000x2560, router 384x2560 and 32768x2560 at m 2..64, all equal, a planted input seen) and reads the head once: x1.2-2.3 at 17..64 rows on the GB10. Rounds of 16 rows or fewer keep their 16-row tile, which is faster there.
|
@ashhart Thanks for 7259888978. Both slower cells are addressed on
Rows (abba5, 5 rounds A,B,B,A, 3 noise rounds, tokens equal): c=1 +28.4 %, c=1 default sampling +25.5 %, c=4 +3.7 % (c=1 and |
|
Thanks for closing both slower cells and for the honest "don't land yet" title while they were open. The two performance blockers from the review are addressed on
The full row set on the final head: c=1 greedy +28.4%, c=1 default sampling +25.5%, c=4 +3.7% (c=1 and c=4 carried from Main-state check: Status: ready for our review and device run. The run is ours on the GB10 with Kolibri-1: the fresh-server one/four/eight-stream comparisons, one-stream default sampling and the two-token cold-prompt case on the exact head, plus the greedy/seeded equality, resumed-state and copy-only/default-graph gates - the rows the review asked to accompany the performance cells, which the author has posted and we will re-confirm on our box.
|
Synthena Initial Review — Performance receipt required (
|
|
I checked each finding against
Receipt (
receipt-3590.json{
"schema": 1,
"pack_id": "tf-receipt-v1",
"pack_sha256": "ab2a5d0ff262007e3ef4714fa46e62b2b2454b3f97b652ca18da49e4e0583c42",
"generated_at_utc": "2026-12-04T03:12:45Z",
"claim": "With --drafter (EAGLE-3) Kolibri-1 decodes one greedy stream faster than main's copy drafts, tokens equal to plain decoding.",
"git": {
"base_sha": "0546beeee8ace0b19f1495274011253e632bc808",
"head_sha": "5ce36a59c98b5c59999d643e3d6bccb102ad492d"
},
"environment": {
"chip": "gb10",
"os": "linux",
"arch": "aarch64",
"checkpoint_id": "Aleph-Alpha/Kolibri-1@e52eb4627d11516b0c01de49210ab5a4e4061444",
"draft": true,
"base_binary_sha256": "05d87edaf99110a9f56d1927e04388bcc98913f78cfaf0fdeed1579b1f05f7f5",
"head_binary_sha256": "2756dfdbe5302e522d052486ee15382546fccb80df3ae629d09c682d00c8b551"
},
"control": {
"prompt_id": "prose_seeded",
"seed_a": 424242,
"seed_b": 989898,
"base_token_sha256": "9ae7fff314220412982285cb0417ede21ffc9ecfb0956e9e33180e8ea154b38a",
"alt_token_sha256": "7f9e76023a9e7a2d78569a1bf915b4b62b856d82cd69db0c7a6b16223fab1c89",
"diverged": true
},
"draft_check": {
"prompt_id": "prose_greedy",
"plain_token_sha256": "3eae120b7c6cb3a3974168cc9d1e4c692e1d01271a2902b20ac57674c96a10d1",
"draft_token_sha256": "3eae120b7c6cb3a3974168cc9d1e4c692e1d01271a2902b20ac57674c96a10d1",
"equal": true
},
"order": [
"base",
"head",
"head",
"base"
],
"rounds": [
{
"index": 0,
"arm": "base",
"agg_tok_s": 55.466
},
{
"index": 1,
"arm": "head",
"agg_tok_s": 70.503
},
{
"index": 2,
"arm": "head",
"agg_tok_s": 70.315
},
{
"index": 3,
"arm": "base",
"agg_tok_s": 55.515
}
],
"summary": {
"mean_base_tok_s": 55.49,
"mean_head_tok_s": 70.409,
"gain_pct": 26.885,
"base_noise_pct": 0.088
},
"prompts": {
"prose_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 67,
"cached_tokens": 0,
"complete": true,
"token_sha256": "3eae120b7c6cb3a3974168cc9d1e4c692e1d01271a2902b20ac57674c96a10d1",
"output_sha256": "9fb872346c14a37baeeb26e0c62506f1ce36aca96a01e4419e39c6b3b4a707fc",
"tok_s": 54.333,
"ttft_s": 0.2306
},
"head": {
"tokens": 128,
"prompt_tokens": 67,
"cached_tokens": 0,
"complete": true,
"token_sha256": "3eae120b7c6cb3a3974168cc9d1e4c692e1d01271a2902b20ac57674c96a10d1",
"output_sha256": "9fb872346c14a37baeeb26e0c62506f1ce36aca96a01e4419e39c6b3b4a707fc",
"tok_s": 56.399,
"ttft_s": 0.2118
},
"token_equal": true
},
"code_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 77,
"cached_tokens": 0,
"complete": true,
"token_sha256": "1a32599ed76e8913cfc1d85991fd8c8aa190e0475c069ab63ab3e6f26b860675",
"output_sha256": "101dd25732ff935f09be340aba2bd5a4258484597a3b881db9f74bf67c9c8810",
"tok_s": 60.419,
"ttft_s": 0.1923
},
"head": {
"tokens": 128,
"prompt_tokens": 77,
"cached_tokens": 0,
"complete": true,
"token_sha256": "1a32599ed76e8913cfc1d85991fd8c8aa190e0475c069ab63ab3e6f26b860675",
"output_sha256": "101dd25732ff935f09be340aba2bd5a4258484597a3b881db9f74bf67c9c8810",
"tok_s": 70.257,
"ttft_s": 0.1818
},
"token_equal": true
},
"reasoning_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 87,
"cached_tokens": 0,
"complete": true,
"token_sha256": "602323c429aa14ce6524480af86265a287f50eec138f178b1e0c29995c5cbea6",
"output_sha256": "944728bc13f96dab50fb3f6c43ee23415735ccfe5ce3a52e5f611feb6808320e",
"tok_s": 52.651,
"ttft_s": 0.1961
},
"head": {
"tokens": 128,
"prompt_tokens": 87,
"cached_tokens": 0,
"complete": true,
"token_sha256": "602323c429aa14ce6524480af86265a287f50eec138f178b1e0c29995c5cbea6",
"output_sha256": "944728bc13f96dab50fb3f6c43ee23415735ccfe5ce3a52e5f611feb6808320e",
"tok_s": 77.378,
"ttft_s": 0.1887
},
"token_equal": true
},
"prose_seeded": {
"base": {
"tokens": 64,
"prompt_tokens": 62,
"cached_tokens": 0,
"complete": true,
"token_sha256": "9ae7fff314220412982285cb0417ede21ffc9ecfb0956e9e33180e8ea154b38a",
"output_sha256": "4568179b78632a2f0cf3876eb03cd71087b34d6ff7e73b440bd48d7dfdcbd1f0",
"tok_s": 54.965,
"ttft_s": 0.1641
},
"head": {
"tokens": 64,
"prompt_tokens": 62,
"cached_tokens": 0,
"complete": true,
"token_sha256": "9ae7fff314220412982285cb0417ede21ffc9ecfb0956e9e33180e8ea154b38a",
"output_sha256": "4568179b78632a2f0cf3876eb03cd71087b34d6ff7e73b440bd48d7dfdcbd1f0",
"tok_s": 102.291,
"ttft_s": 0.1693
},
"token_equal": true
}
},
"exactness_sha256": "dc2bc550850c8d57c02af5e8fd22944fa858b50624dfb8538baf7355b3af79d1",
"receipt_sha256": "14e2bd958625646101c6f0ad25620ae27d13633af0f263560314bb5963908df1"
}
|
|
Thanks @jschmied. The unchanged head supports all five replies: the room adjustment is local, room-one depth is already tested, staging bounds tap copies, tap IDs cannot change beneath captured graphs, and lazy rows are clamped. Those findings remain closed. The supplied one-stream receipt is credited at its stated baseline; its launcher hashes still need the underlying executable provenance in the final run. The verdict remains ready for A/B after integration. The remaining runs are ours: exact drafted/plain and copy-only/main output, concurrent/solo and resumed/fresh with cache hits, plus fresh-server one/four/eight-stream throughput, default sampling and the cold prompt's first-token and first-to-second-token latency. We'll handle the rebase, source pins, changelog and stale recipe table. No further source changes are requested for the answered findings.
|
kolibri1: the published EAGLE-3 drafter behind --drafter on CUDA (all served cells faster or within noise on 5ce36a5)
Head
5ce36a59c9: your9199420c76(main0546beeee8) plus three commits (f983763055,c90f3fe1f7,5ce36a59c9), a fast-forward. Rows for c=1 and c=4 carry forward fromca3dca2fda: the kernels are identical (nvcc include closure md5 on both heads), so the SASS is the same. c=8 and the gates, resume, plant and x86 ran on5ce36a59c9. Changes since2ad6478f25:b921776634(a lazy drafter's prompt reach absorbed before token 1, a depth-0 first round owes its last row,draft_room <= 1 drafts none),
f26f37dfa8(open.zig firstDepth charges the first token: review #1483),ca3dca2fda(Kolibri Ops.dense: rounds of 17..64 rows run the router and head in one tf_dense_rows_tiled launch; 16 rows or fewer keep the
16-row tile; review #1498 clean).
Rows on
ca3dca2fda(served, GB10; head binary md59ce3e425, main388ec8c487binarye9110dbd; abba5: 5 rounds A,B,B,A, 3 noise rounds, tokens equal in all runs):--drafter(B)5ce36a59c9)The token 1 -> 2 cell was 0.079 s at
f6ae3a82e8(+58 ms); it is now within noise of copy drafts. The c=8 cell was-1.1 % at
f6ae3a82e8and +1.2 % onca3dca2fda(before the rebase). The cause at c=8 was the drafter's per-round dense launches over 17..64 rows (nsys, kd31-prof8).Gates on
5ce36a59c9:GATES_OK;CONTROLS: PASS; drafted == plain greedy and seeded; c=4 and c=8 == solo (seededc=8 too); resumed == fresh with 12 cache hits; copy-only head == drafted == copy-only main; 0 empty replies;
PAR123 PASS.tf-cuda-test kolibri-drafter-resumepasses, and its planted control (re-run skipped) fails 2 checks as it must.x86 full CI (
kd34-x86):X86-ALL-GREEN.Earlier rows (
f6ae3a82e8, for history): see the section below.This round (reviews 7243451513, 7250191464).
61ca5431a7,7e5f989ee0,42aac12434,6a2d8c0877: a prompt-cache hit keeps its restore and rebuilds thedrafter's state where that is exact.
Drafter.fresh_onlymarks a drafter whose state does not survive a restore(Kolibri's EAGLE-3; Qwen's tree drafter is unchanged). Kolibri restores the kept state, then re-runs the prompt pass
from row 0 when the prompt fits the drafter's 2,048-row window and the restore lies within the target's sliding
window (512 rows): a kept state holds only a sliding layer's last 512 keys (
snap.tail), so a re-run of earlier rowsis exact only there. The forward is chunk-invariant, so the re-run rewrites the same keys and values and its tap rows
fill the slab; the drafter absorbs them as on a cold prompt (
Stream.rebuilt,Stream.fedfor a stepped pass's realfrontier). A restore before the window's start needs nothing. Any other restore inside the window drafts fillers: no
absorb, no hold, its first token still read, its reply a cold prompt's.
851adf9a42,ce48f8601b: the prefill-shaped operator is in this PR:tf_dense_rows_tiledpast 64 rows,tf_dense_rows_32's bytes, 4.3-6.7 times faster on the absorb's shapes; the contract registry records 42 entries.drafted.zig,drafter.zig,eagle3.zig,kolibri1/drafter.zig) are on lines oftheir own;
docs/recipes/kolibri-1.mdcarries the rows below.Resume, fail-before (CUDA,
tf-cuda-test kolibri-drafter-resume). Cold against resumed: the drafter slot's outputrow, K and V over the window, the drafts landed and the reply, greedy and seeded, after another prompt filled the slot.
Restored before the window's start and on a 131-token prompt restored at 45 (rebuilt from 0, the served benchmark's
shape): equal. A 4,001-token prompt restored at 3,001: fillers, reply equal to the cold one. Planted (the re-run
skipped): 2 checks fail. The first device run of a re-run from 1,953 at that restore landed 22 drafts where cold landed
25: that is how the sliding-window bound above was found.
Served gates (GB10,
f6ae3a82e8, default round graphs).CONTROLS: PASS (4 prompts, seeds differ on 4).Drafted == plain, greedy and seeded; c=4 and c=8 == solo (seeded c=8 too); 0 empty replies; 24 distinct replies, hash
293d716e74b701a6; resumed == fresh with 12 prompt-cache hits; copy-only head == drafted and copy-only main ==drafted;
--parallel1, 2 and 3 equal and no empty reply. Tokens a round 2.08 with the drafter, 1.01 plain.x86 lane on
f6ae3a82e8: all green (CI set 2860/2860 steps, 29341 of 29516 tests passed and 175 skipped; cuda-host21/21). Kernel contract (
dense rows, limits on all five SMs, 0 head-only entries) on3c350d171f's tree; the kernels areunchanged since.
Speed (abba5, fresh servers, main's copy drafts as A; floor from one A-vs-A round, then 3 rounds A-B-B-A).
--drafterDon't land yet: c=8 is 1.1 % slower (the absorb pass each round costs more than the drafts gain at 8 streams), and
a cold prompt's second token comes 58 ms after its first (the window's absorb runs after the first token). The second
token still lands 1.6 s sooner than main's (2.05 against 3.66 s). Tokens a round 1.96, 1.54 and 1.63 at c=1, 4 and 8
(copy drafts 1.07). Each arm gave the same replies in every run.
Not covered by these rows: kolibri-full was last green on
bd54625843; the commits since change only a restored draftedstream's pass. A per-slot save and restore of the drafter's own state could follow if you want drafts back on the
restores that now draft fillers.
What
--drafter DIRloadsjosch15366/Kolibri-1-EAGLE3-drafter(revision6430e5dc7453dd4ea57022a4cde46178afe89094,Apache-2.0 per its model card) on CUDA through the lane core's
Drafter/Drafted. It is off unless asked. Every draft is verified by the target, so replies are token for token those without it.The two published releases predate #893's format v1:
blocks.0.*and stores f32 norms;inp.weight.core/drafter_published.zigreads both into a v1release.Configunder the samevalidate/check/parseVocab/weight checks.docs/drafter-release.mdgains a "Published before version 1" section.Code sharing:
drafter_release.zig:eagle3architecture,most_chain.drafter_layout.zig:Names,checkWeightsNamed.drafter_published.zigwith tests.cuda/eagle3.zig. It runs EAGLE-3 absorb (every stream's rows in one pass) and chain (every stream's step in one pass) on the shared operators only:dense_rows,norms,qk_rows,window_attention.decode,act_rows.swiglu,embed_rows,tf_argmax_rows_i32,tf_f32_to_bf16. No new kernels, no.cuchanged (git diff a1781885e9..HEAD -- '*.cu'is empty), so the kernel contract does not apply. Fatbins compared head vs main: 115/115 identical.taps.zig: a tap ring per stream, read asFeatures.forward.zig: tap copies after layers 44/47/49.backend.zig:prepare_features/features.drafter.zig: upload, slots, the vtable.native.zig: open/reserve/refusals.drafter.zigadmit: the memory refusal from the release's config, before anything is allocated.drafter.zigtimeHolds: the hold pass by streams and depth (Facts.hold_costs).row_costs.zig: round costs for the depth rule, over the widths the served slots hold. It useslanes.cost_rule.fastest/smooth, as the other families time theirs; the lane core has no shared startup timer.kernels.zig: the 16-row split below.shared_drafts.zigpayPass(above).--drafter):cuda_drafted.zigServed.reservere-reads the drafter's facts.Graphed rounds: the stale-row case (receipt)
Measured before your rebase, on my local merge with main
82c4e6cce3, whose Kolibri code equals this head's apart fromtests. GB10,
--drafterat--parallel 1/2/3, the gate above. Both merge binaries carry a local-only log line with theround cache's outcome counts, so the receipt shows the graphs replayed and nothing fell back to eager:
237cfeac)ae1ae12911(2df05105)a round failed (RowsNotHeld), HTTP 500TENSORFOLD_KOLIBRI_GRAPHS=0(eager rounds,2df05105)So only the graphed round lost the ring update. The eager path already had it.
Exactness, measured on
ff3554ace1(before your main integration) (GB10, binary 730f2f38, main e209630 binary 25eee491, default round graphs)Every reply is hashed as reasoning_content + content + token ids; an empty reply FAILs. 24 prompts (chat, German,
code), 128 tokens.
parity_controls.pyon the base server (main, copy drafts) and on the head with--drafter:CONTROLS: PASS (4 prompts, seeds differ on 4)both."draft": false), greedy / seeded293d716e74b701a6, 24 distinct, 0 empty--parallel 1,2,3with--drafter: opens, drafted == plain greedy and seeded, N streams == solo, 0 emptyHost on the GB10 on
ff3554ace1:test-lazy-absorb-host22/22,test-kolibri-host42/43 (1 skipped),test-qwen35-round-timing-host3/3, and the wholezig build -Dfixed-cpu test, green.Refusals (by name, at load, server never serves)
a block-drafter release; Kolibri-1 on CUDA serves eagle3 releases(DrafterArchitectureNotServed)draft_vocab.json has 32768 ids; config.json says 32767the release drafts for Aleph-Alpha/Kolibri-2; the loaded target is Aleph-Alpha/Kolibri-1blocks.0.gate.weight is { 4096, 2560 }; config.json implies { 4608, 2560 }--drafter-bits 8invalid choice) before load. Kolibri takes 0 or 4, both bf16 as published. Kolibri's ownDrafterBitsUnsupportedis therefore not reachable from the CLI.TapsAfterStreamsDrafterPastMemory:--drafter DIR: needs N GiB of device memory for S streams and a timing slot, the target's taps T GiB and the first stream's window W GiB; the budget leaves M GiB--drafterpath to refuseThe host tests in
drafter_published_test.zigcover the layout, target, vocab and v1-not-published refusals in the reader, which runs before anything is allocated.Memory refusal, counted on the final allocation.
Drafter.admit(kolibri1/drafter.zig) takes aLoadand runsbefore the drafter allocates anything; it takes numbers only (its type is checked in the test), no allocator or device:
uploadputs them: 348,813,568 bytes; scratch: 70,528,256 bytes (Dims.scratchBytes, the size listEagle3.initallocates from);Dims.streamBytes()(24,253,440 bytes each), where S is whatreservewillmake: every stream's on linear caches; with a fixed
--parallel Non pages, N; with auto on pages, 1, since thepage plan pays each later stream's drafter slot as part of its fixed bytes;
pages(window + 16) x pageBytes), which the plan sets aside after;a006fe9015): a prompt chunk's tap rows and a ring for every slot(
taps.heldRows: 8,192 + 64 x (256 + 64) rows on pages, each 3 taps x 2,560 bf16), 440,401,920 bytes.The first stream's drafter slot and the timing slot, which the server's stream plan does not count, are now allocated
at open, so the room the server reads already excludes them;
reservegrows to N + 1 later. Tests:the drafter's device bytes come from its config alone; one byte short refuses by name, nothing allocatedandDrafterPastMemory: --parallel 8 on pages counts 9 drafter slots and the first window, nothing allocated before(onebyte short refuses; the old one-stream accounting let that budget through), and
DrafterPastMemory: the target's tap ring for 64 paged slots and a prompt chunk's tap rows count, one byte short(one byte short of 4,299,250,176 refuses, exactly that admits; the same budget without the taps is admitted at
3,858,848,256). Planted control:
admitwithout the tap term fails that test by name (expected error.DrafterPastMemory, found 3858848256). The tap rows and ring are now allocated inprepare_features, inside--drafter's open, so the room the server reads for the page pool already excludes them; the first calibrationforward finds the ring made.
Speed, measured on
ff3554ace1(before your main integration): main's copy drafts vs --drafter (abba5, fresh servers)SPEED=speed5.py python3 abba5.py compare OUT main head --rounds 5. Every run is a fresh server (page cache droppedbefore each start,
--parallel 8): 24 prompts, 256 tokens, greedy, a distinct prompt per stream. A warm-up per arm, anoise floor from 3 A-vs-A rounds, then 5 rounds of A,B,B,A; a round's value is each arm's mean of two runs. Replies
equal across all runs (
TOKENS: EQUAL). The old-base c=4 and c=8 runs were stopped for the new head; c=1, c=4 and c=8 ondeda354378follow in a comment and here.--drafter, rounds 1-5decode=of a two-token reply)The cold prompt. nsys, one round each, the head binary with and without
--drafter, the same prompt:tf_dense_rows_32+213 ms) at 3,607-3,820 ms; the second token at 3,857 vs 3,633 ms.The target splits this prompt at a prefix mark (7,846 rows, then 3); before the slab the window's rows in the first
piece were absorbed between the two, before the first token. Before this round: the first token 41.8 % slower
(3.64 -> 5.16 s), every prompt row absorbed.
The 16-row split, and copy-only vs main (three checks, run in the previous rounds on main
699094f705)nsys over a short c=8 run, before the split. The GPU is busy for the whole wall time in both arms.
dense_rows' 32-row tile. On Kolibri's 128000 x 2560 head that tile runs 5x slower than two 16-row launches (25.2 ms past 32 rows).kernels.zignow launches the router and head in 16-row tiles for 17..64 rows (split_rows= a round). That moved c=8 from -6.2 % to -2.3 %.Bytes.
tile_eq.cubuilds the repo'sdense_rows.cuand compares the fp32 output bytes of one 32-row launch (main) against the 16-row launches (this branch) at every m in 17..64, on the head (128000 x 2560) and router (384 x 2560) shapes with random bf16. Result: 0 of 48 row counts differ for both shapes. The planted control (one flipped input) is caught for both. The final reply hash == main's stays in the gates above.Prompt. Prompt chunks (> 64 rows) keep one launch. Cold prompts,
max_tokens1, a fresh first line per request, median of 3, A-B-B-A against main699094f705(default paged caches), binaryeba82984(0a0cc7504c, the previous round; this round leaves the copy-only path as it was):Copy-only, served by default, vs main
699094f705(same A-B-B-A, 256 tokens, the same replies on all four servers,244929b4d290cead):Copy-only c=1 and c=4 come out 0.2 % and 0.5 % below main in both pairs. Both are inside the head's own A/A spread (0.4 %, 0.6 %). Copy rounds rarely pass 16 rows, and without
--drafterno taps are copied, so the copy-only path rarely differs from main at all. On the old base the same check read -0.6 / -0.2 / +0.5 %.The lane core change, and its tests
shared_drafts.budgets(zig/src/core/lanes/shared_drafts.zig):payReservedruns undergranted_depthas before;otherwise, when the drafter gave
hold_costs, the newpayPasssets each head's reserved depth as the hold to price(its rows and the chances it expects to keep) and calls
Rule.payHoldsFor/payHolds. That keeps holds, mostexpected tokens a row first, while they raise tokens a ms over the round without them. No new pricing code. With
hold_costsempty (every family but Kolibri's drafter today) the branch is not taken.shared_hold_pass_test.zig(steptest-hold-pass-host): four streams, three drafts at 0.8 a depth. A pass of 2 mskeeps 3,3,3,3; a pass of 60 ms gives 0,0,0,0 (copy rounds); no
hold_costskeeps the legacy 3,3,3,3.cuda_drafted.zigtest: a drafter untimed at open and timed at reserve; the served facts carry its step (1.5 ms),hold costs and window costs after
reserve, and the rest as the drafter set it.payPassdisabled the "dearer" test fails (expected 0,0,0,0); withthe re-read in
Served.reservedisabled thecuda_draftedtest fails atcuda_drafted.zig:155.Default path (no
--drafter): your GB10 run on818c7df81ais GREEN. Since then, rebase aside, the default path's codeis the same:
payPassneedshold_costs(only Kolibri's drafter sets them),Served.reserve's re-read needs a drafter(
heldis null without one), andkolibri1/drafter.zigloads only with--drafter. The copy-only head's repliesequal main's (gate above). This round's speed rows measure against main's own binary; the head's copy-only timing
rows were not re-run.
x86 lane, measured on
ff3554ace1(before your main integration)On
ff3554ace1, x86 box, the full set (rebase-gatesasks a device rerun forcuda/eagle3.zig, so FULL):pr_check(0 errors),zig fmt --check,git diff --check, lean,-Dfixed-cpu test-host test test-golden test-kernel-contract test-server-security test-pull-security fuzz-cortheon check-release-paths, andcheck-native-cuda-host compile-cuda-tests: all green (X86-ALL-GREEN).Not in this PR
Kolibri-1-block-drafter, context keys, mask row, spine, predecessor head) is a stacked follow-up. It is not started. Its release is read and checked by core here and refused on CUDA by name.atc overlap: incomplete (ATC 0.9.5 read limits). Shared files with open PRs are onlyzig/src/core/root.zig,zig/src/cuda/root.zigandzig/tests/fixtures/gradient-serving.tsv(cuda/root.zigre-pinned:cuda.eagle3exported). No shared code paths. Your rebase put the branch on maine209630f74; I have not rebased.Proposed CHANGELOG line (you said you will add it; no CHANGELOG commit here):
- kolibri1: \--drafter` serves the published Kolibri-1 EAGLE-3 drafter on CUDA through the lane core (off unless asked; replies unchanged), and a round's router and head launch in 16-row tiles; the lane core prices a drafter's timed hold pass under a legacy cap.`