Skip to content

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

Open
jschmied wants to merge 40 commits into
ashhart:mainfrom
jschmied:kolibri1-drafter-lanes
Open

jschmied wants to merge 40 commits into
ashhart:mainfrom
jschmied:kolibri1-drafter-lanes

Conversation

@jschmied

@jschmied jschmied commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

kolibri1: the published EAGLE-3 drafter behind --drafter on CUDA (all served cells faster or within noise on 5ce36a5)

Head 5ce36a59c9: your 9199420c76 (main 0546beeee8) plus three commits (f983763055, c90f3fe1f7, 5ce36a59c9), a fast-forward. Rows for c=1 and c=4 carry forward from ca3dca2fda: 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 on 5ce36a59c9. Changes since
2ad6478f25: 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 md5 9ce3e425, main 388ec8c487 binary e9110dbd; abba5: 5 rounds A,B,B,A, 3 noise rounds, tokens equal in all runs):

cell copy drafts (A) --drafter (B) verdict
c=1 greedy, tok/s 51.2 65.7 FASTER, median +28.4 %, floor 0.51 %, B worse 0 of 5
c=1 default sampling, tok/s 52.5 65.9 FASTER, median +25.5 %, floor 1.39 %, B worse 0 of 5
c=4, tok/s 109.2 113.8 FASTER, median +3.7 %, floor 0.80 %, B worse 0 of 5
c=8, tok/s (on 5ce36a59c9) 140.1 140.7 WITHIN NOISE, median +0.8 %, floor 0.61 %, B worse 1 of 5
cold 7,899-token prompt, first token, s 3.636 1.971 FASTER, median +45.8 %, floor 0.12 %, B worse 0 of 5
same prompt, token 1 -> 2, s 0.0205 0.0200 WITHIN NOISE (floor 2.44 %)

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 f6ae3a82e8 and +1.2 % on ca3dca2fda (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 (seeded
c=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-resume passes, 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 the
    drafter's state where that is exact. Drafter.fresh_only marks 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 rows
    is 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.fed for a stepped pass's real
    frontier). 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_tiled past 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.
  • The comments past 120 columns (drafted.zig, drafter.zig, eagle3.zig, kolibri1/drafter.zig) are on lines of
    their own; docs/recipes/kolibri-1.md carries the rows below.

Resume, fail-before (CUDA, tf-cuda-test kolibri-drafter-resume). Cold against resumed: the drafter slot's output
row, 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; --parallel 1, 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-host
21/21). Kernel contract (dense rows, limits on all five SMs, 0 head-only entries) on 3c350d171f's tree; the kernels are
unchanged 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).

cell copy drafts with --drafter verdict
c=1 greedy, tok/s 51.3 65.7 FASTER (median 27.945%, floor 0.327%, B worse 0 of 3)
c=1 default sampling, tok/s 52.7 65.8 FASTER (median 24.426%, floor 0.024%, B worse 0 of 3)
c=4, tok/s 109.3 114.1 FASTER (median 4.106%, floor 0.015%, B worse 0 of 3)
c=8, tok/s 140.5 138.8 SLOWER (median -1.122%, floor 0.525%, B worse 3 of 3)
cold 7,899-token prompt, first token, s 3.635 1.976 FASTER (median 45.678%, floor 0.036%, B worse 0 of 3)
same prompt, token 1 -> 2, s 0.021 0.079 SLOWER (median -282.927%, floor 2.381%, B worse 3 of 3)

Don'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 drafted
stream'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 DIR loads josch15366/Kolibri-1-EAGLE3-drafter (revision 6430e5dc7453dd4ea57022a4cde46178afe89094,
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:

  • taps are 0-based (44/47/49 = format ids 45/48/50);
  • there is no target embed/head in the file;
  • EAGLE-3 names its layer blocks.0.* and stores f32 norms;
  • the block release carries an unused inp.weight.

core/drafter_published.zig reads both into a v1 release.Config under the same validate/check/parseVocab/weight checks. docs/drafter-release.md gains a "Published before version 1" section.

Code sharing:

  • core (host, any backend):
    • drafter_release.zig: eagle3 architecture, most_chain.
    • drafter_layout.zig: Names, checkWeightsNamed.
    • New drafter_published.zig with tests.
  • cuda (backend, any family): new 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 .cu changed (git diff a1781885e9..HEAD -- '*.cu' is empty), so the kernel contract does not apply. Fatbins compared head vs main: 115/115 identical.
  • kolibri1 (family):
    • taps.zig: a tap ring per stream, read as Features.
    • 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.zig admit: the memory refusal from the release's config, before anything is allocated.
    • drafter.zig timeHolds: 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 uses lanes.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.
  • lanes (core, any backend): shared_drafts.zig payPass (above).
  • native (CUDA host, any family with --drafter): cuda_drafted.zig Served.reserve re-reads the drafter's facts.
  • Metal: Kolibri has no Metal family; the core reader and the lane change are backend-neutral.

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 from
tests. GB10, --drafter at --parallel 1/2/3, the gate above. Both merge binaries carry a local-only log line with the
round cache's outcome counts, so the receipt shows the graphs replayed and nothing fell back to eager:

binary result round graphs (last count)
merge + this round's fixes (237cfeac) drafted == plain greedy and seeded, N streams == solo, 0 empty, tokens a round 2.06 / 2.07 / 2.10 replayed 1456 / 1257 / 1143, captured 10 / 22 / 33, eager 0
plain merge, no tap update after a graphed round, as ae1ae12911 (2df05105) the first drafted round fails: a round failed (RowsNotHeld), HTTP 500 replayed 0, captured 1, eager 0
the same plain merge with TENSORFOLD_KOLIBRI_GRAPHS=0 (eager rounds, 2df05105) drafted == plain greedy and seeded, N streams == solo, 0 empty, tokens a round 2.07 / 2.07 / 2.06 no round graph used

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.py on the base server (main, copy drafts) and on the head with --drafter:
CONTROLS: PASS (4 prompts, seeds differ on 4) both.

check result
drafted == plain ("draft": false), greedy / seeded true / true
c=4 == solo, c=8 == solo (greedy), c=8 == solo (seeded) true, true, true
resumed == fresh (multi-turn, prompt cache on vs off) true (12 resumed hits vs 0)
copy-only head == drafted == main true, hash 293d716e74b701a6, 24 distinct, 0 empty
--parallel 1, 2, 3 with --drafter: opens, drafted == plain greedy and seeded, N streams == solo, 0 empty true for each, 2.06 / 2.06 / 2.07 tokens a round
tokens a round, drafted vs plain 2.09 vs 1.008

Host on the GB10 on ff3554ace1: test-lazy-absorb-host 22/22, test-kolibri-host 42/43 (1 skipped),
test-qwen35-round-timing-host 3/3, and the whole zig build -Dfixed-cpu test, green.

Refusals (by name, at load, server never serves)

case message
block-drafter release a block-drafter release; Kolibri-1 on CUDA serves eagle3 releases (DrafterArchitectureNotServed)
vocab draft_vocab.json has 32768 ids; config.json says 32767
target the release drafts for Aleph-Alpha/Kolibri-2; the loaded target is Aleph-Alpha/Kolibri-1
layout blocks.0.gate.weight is { 4096, 2560 }; config.json implies { 4608, 2560 }
--drafter-bits 8 the CLI refuses it (invalid choice) before load. Kolibri takes 0 or 4, both bf16 as published. Kolibri's own DrafterBitsUnsupported is therefore not reachable from the CLI.
a stream opened before the drafter TapsAfterStreams
too little device memory DrafterPastMemory: --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
backend without Kolibri no Kolibri family outside CUDA, so no --drafter path to refuse

The host tests in drafter_published_test.zig cover 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 a Load and runs
before the drafter allocates anything; it takes numbers only (its type is checked in the test), no allocator or device:

  • weights as upload puts them: 348,813,568 bytes; scratch: 70,528,256 bytes (Dims.scratchBytes, the size list
    Eagle3.init allocates from);
  • drafter caches: (S + 1 timing slot) x Dims.streamBytes() (24,253,440 bytes each), where S is what reserve will
    make: every stream's on linear caches; with a fixed --parallel N on pages, N; with auto on pages, 1, since the
    page plan pays each later stream's drafter slot as part of its fixed bytes;
  • on pages, the first stream's target window (pages(window + 16) x pageBytes), which the plan sets aside after;
  • the target's taps for the drafter (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; reserve grows to N + 1 later. Tests:
the drafter's device bytes come from its config alone; one byte short refuses by name, nothing allocated and
DrafterPastMemory: --parallel 8 on pages counts 9 drafter slots and the first window, nothing allocated before (one
byte 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: admit without the tap term fails that test by name (expected error.DrafterPastMemory, found 3858848256). The tap rows and ring are now allocated in prepare_features, inside
--drafter's open, so the room the server reads for the page pool already excludes them; the first calibration
forward 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 dropped
before each start, --parallel 8): 24 prompts, 256 tokens, greedy, a distinct prompt per stream. A warm-up per arm, a
noise 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 on
deda354378 follow in a comment and here.

cell main, rounds 1-5 --drafter, rounds 1-5 verdict (median, floor, rounds worse)
c=1 tok/s 51.37 51.28 51.26 51.44 51.21 65.95 65.91 65.63 66.42 66.09 FASTER +28.533 %, 0.455 %, 0 of 5
c=1 served defaults (seed 7+i, 8 prompts) 52.74 52.65 52.75 52.79 52.57 69.70 69.89 68.97 69.93 69.04 FASTER +32.158 %, 0.346 %, 0 of 5
cold first token, 7,899-token prompt, s 3.638 3.636 3.633 3.633 3.635 3.639 3.641 3.640 3.638 3.639 WITHIN NOISE -0.136 %, 0.21 %, 5 of 5
cold prompt, token 1 -> 2, s (the server's decode= of a two-token reply) 0.0205 0.0200 0.0210 0.0200 0.0205 0.2490 0.2495 0.2490 0.2495 0.2485 SLOWER +229 ms, 2.4 %, 5 of 5

The cold prompt. nsys, one round each, the head binary with and without --drafter, the same prompt:

  • one token out: 1,329 launches in both, wall 3.618 vs 3.623 s, the same first token; the drafter does no work;
  • two tokens out: the first token at 3,607 vs 3,613 ms; the drafter's 8 absorb passes (the window's 2,048 rows,
    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.

per round copy-only drafted
MoE experts 33.8 ms 53.0 ms
target lm_head 3.0 ms 15.4 ms
the whole drafter none about 4 ms
  • Rows 17..32 take 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.zig now 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 %.
  1. Bytes. tile_eq.cu builds the repo's dense_rows.cu and 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.

  2. Prompt. Prompt chunks (> 64 rows) keep one launch. Cold prompts, max_tokens 1, a fresh first line per request, median of 3, A-B-B-A against main 699094f705 (default paged caches), binary eba82984 (0a0cc7504c, the previous round; this round leaves the copy-only path as it was):

    prompt main (s) head (s) change
    2,319 tokens 1.052 / 1.051 1.049 / 1.059 +0.2 % (ranges overlap)
    8,932 tokens 4.186 / 4.184 4.185 / 4.181 -0.0 %
    28,079 tokens 14.483 / 14.461 14.504 / 14.453 +0.0 % (ranges overlap)
  3. Copy-only, served by default, vs main 699094f705 (same A-B-B-A, 256 tokens, the same replies on all four servers, 244929b4d290cead):

    streams main tok/s head tok/s change pairs slower A/A (main, head)
    1 51.76 / 51.79 51.54 / 51.76 -0.2 % 2 of 2 0.1 %, 0.4 %
    4 120.15 / 120.43 119.40 / 120.07 -0.5 % 2 of 2 0.2 %, 0.6 %
    8 156.41 / 156.84 156.39 / 157.41 +0.2 % 1 of 2 0.3 %, 0.7 %

    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 --drafter no 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): payReserved runs under granted_depth as before;
otherwise, when the drafter gave hold_costs, the new payPass sets 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, most
expected tokens a row first, while they raise tokens a ms over the round without them. No new pricing code. With
hold_costs empty (every family but Kolibri's drafter today) the branch is not taken.

  • shared_hold_pass_test.zig (step test-hold-pass-host): four streams, three drafts at 0.8 a depth. A pass of 2 ms
    keeps 3,3,3,3; a pass of 60 ms gives 0,0,0,0 (copy rounds); no hold_costs keeps the legacy 3,3,3,3.
  • cuda_drafted.zig test: 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.
  • Planted controls, both red before green: with payPass disabled the "dearer" test fails (expected 0,0,0,0); with
    the re-read in Served.reserve disabled the cuda_drafted test fails at cuda_drafted.zig:155.

Default path (no --drafter): your GB10 run on 818c7df81a is GREEN. Since then, rebase aside, the default path's code
is the same: payPass needs hold_costs (only Kolibri's drafter sets them), Served.reserve's re-read needs a drafter
(held is null without one), and kolibri1/drafter.zig loads only with --drafter. The copy-only head's replies
equal 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-gates asks a device rerun for cuda/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, and check-native-cuda-host compile-cuda-tests: all green (X86-ALL-GREEN).

Not in this PR

  • Serving the block drafter (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 only zig/src/core/root.zig, zig/src/cuda/root.zig and zig/tests/fixtures/gradient-serving.tsv (cuda/root.zig re-pinned: cuda.eagle3 exported). No shared code paths. Your rebase put the branch on main e209630f74; 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.`

@ashhart

ashhart commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Thanks @jschmied, this is careful work. The receipts in the body make it easy to review.

What's good:

  • The drafter only proposes tokens. Every draft is verified by the target, and your gates on b85064572f show drafted == "draft": false (greedy and seeded), c=4/c=8 == solo, and resumed == fresh.
  • The format work is clean. core/drafter_published.zig reads the two published releases (0-based taps, blocks.0.*, f32 norms, the unused inp.weight admitted by name) into a v1 Config. It then runs the same validate/check/parseVocab/weight checks, and the host tests name each refusal.
  • cuda/eagle3.zig uses only shared operators, with no new kernels and no .cu changes.
  • The 16-row split in kolibri1/kernels.zig:169 is byte-equal by construction. dense_rows.cu sums each row in a fixed lane order and shuffle tree whatever the tile (dense_rows.cu:3, :23), and your tile_eq check agrees. The copy-only and prompt tables stay within the A/A spread.
  • Lean count is unchanged at 221. zig fmt --check is clean, and every touched file is under 600 lines (forward.zig 544 after moving its tests to forward_test.zig).

Must fix:

  1. Rebase on current main. Patch 8/9 (docs) no longer applies to README.md: main changed the Flint row right above the Kolibri row (Flint's --drafter), so the Kolibri row's context no longer matches. Your Kolibri line itself is fine.
  2. kolibri1: tree-attention cache offsets are signed, so a cache placed below the origin no longer overflows #3561 has landed on main. This branch still carries its commit (kolibri1: tree-attention cache offsets signed), so please rebase onto main and drop that commit, leaving only the drafter in the diff.
  3. 8 streams. As you say, --drafter is 2.3 % slower than copy drafts at c=8 (155.9 vs 159.6 tok/s). Your proposal to feed Facts.hold_costs from the drafter's timed pass is new lane-core use and needs a maintainer decision. We'll answer it in this thread. Until then, this stays as you marked it: not ready to land.

Optional:

  • openDrafter (kolibri1/native.zig:166) refuses below a fixed 1 GiB. Computing the need from Dims.streamBytes() and the scratch sizes would make the refusal exact.
  • After the rebase, please re-run the exactness gate and the c=1/4/8 speed table at the new head. The speed rows are from d518aef05b, and row_costs.zig changed after that.

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 native.zig to its own line to fit 120 columns and rewraps one paragraph in docs/drafter-release.md; the other adds your proposed CHANGELOG line under ## Unreleased.

Device check: GB10 (CUDA), exactness and speed with and without --drafter. We will run the device check on our side.

  • Synthena

@jschmied jschmied changed the title kolibri1: the published EAGLE-3 drafter behind --drafter on CUDA (don't land yet: 8 streams 2 % slower) kolibri1: the published EAGLE-3 drafter behind --drafter on CUDA (don't land yet: 8 streams 1.2 % slower) Nov 17, 2026
@jschmied
jschmied force-pushed the kolibri1-drafter-lanes branch from b850645 to 818c7df Compare November 17, 2026 09:41
@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart Thanks. Rebased on main 699094f705; the new head is 818c7df81a. Per item:

Must fix

  1. README: main's Flint row (with --drafter) is kept; the Kolibri line below it is ours. The branch applies cleanly on main.
  2. kolibri1: tree-attention cache offsets are signed, so a cache placed below the origin no longer overflows #3561: its commit (6aee167ed8) is dropped; main has it as 004fba2c87. The diff is the drafter only. The old head b85064572f stays reachable on my side.
  3. 8 streams: still slower, 1.2 % (157.6 -> 155.7 tok/s, both A-B pairs slower). It stays "don't land yet". I built nothing for hold_costs; that is your call.

Optional

  • openDrafter: the fixed 1 GiB is gone. Drafter.admit computes the need from the release's config before anything is allocated: weights 348,813,568 bytes, scratch 70,528,256 (the same size list Eagle3.init allocates from), and (streams + 1 timing slot) x streamBytes() 24,253,440. That is 0.44 GiB with one stream. The refusal keeps its name, DrafterPastMemory. A new host test checks the numbers on the published config, and one byte short refuses by name. admit takes no allocator and no device, and a planted wrong constant fails the test.
  • Re-run after the rebase:
    • Exactness, on the head itself (binary 20f4ef09): drafted == "draft": false greedy and seeded, c=4/c=8 == solo, resumed == fresh, copy-only head == drafted == main. All true, 0 empty. Main now serves with paged caches, so KV_PAGES=0 is gone from the reference.
    • Speed, A-B-B-A, same replies on all four servers (on the same code before three comments were joined into one line): c=1 +29.0 %, c=4 +6.1 %, c=8 -1.2 % (2 of 2 pairs slower). A/A at most 1.0 %. These rows replace the d518aef05b ones in the body and in docs/recipes/kolibri-1.md.
    • Copy-only vs main: c=1 -0.2 %, c=4 -0.5 %, c=8 +0.2 %, each inside the head's own A/A spread (up to 0.7 %). Cold prompts at 2k/8k/28k tokens: +0.2 %, 0.0 %, 0.0 %.
    • Host: test-kolibri-host and test-cuda-host pass, zig fmt --check is clean, and every touched code file is under 600 lines (drafter.zig 372). x86 lane on the head: fmt, gradient-serving, CUDA host compile and pr_check are clean (lean 221 vs 221). The only failures are the known cli_config_test umask ones, as before.

Your two commits can go on top. The fixed-1 GiB line in native.zig is gone, so your comment move there may no longer apply; the new line is 117 columns. The proposed CHANGELOG line is in the body; there is no CHANGELOG commit.

@ashhart

ashhart commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Thanks @jschmied. Our GB10 run on this head (818c7df81a) against main is GREEN for the default path: without --drafter, tokens are equal on every prompt row, and the prefill, sweep and chat cells are all level with main.

On the 8-stream question we owed you: yes, please feed Facts.hold_costs from the drafter's timed pass. The drafter only proposes, and the target verifies every token, so letting the lane core price a drafter round against a copy round changes which draft source a round uses, never the tokens. What we need for landing:

  1. With --drafter, c=1, c=4 and c=8 each no slower than copy drafts on the same head (A-B-B-A as before). At c=8 that means the lane core falls back to copy drafts when the drafter's round costs more.
  2. The same exactness gates as your last run: drafted == "draft": false (greedy and seeded), c=4/c=8 == solo, resumed == fresh.

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 --drafter cells on a GB10 too.

  • Synthena

@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart Thanks. Done; the new head is 68fda81392 (three code commits and one docs commit on 818c7df81a, no rebase,
merges cleanly with main). Still don't land yet: c=8 on a fresh server is 1.6 % slower (details below).

What changed

  • The lane core prices the drafter's round. With limit_shared_drafts and Facts.hold_costs, shared_drafts sets
    each head's reserved depth as the hold and calls Rule.payHoldsFor, the granted path's existing costing. A hold is
    kept only while it beats the round without the drafter's pass. That changes draft sources, never tokens.
  • Kolibri times the hold pass at reserve, by streams and depth: 0.68 / 1.93 ms with one stream, 0.83 / 2.42 ms with 8
    (depth 1 / 2).
  • A bug this turned up: cuda_drafted.wrap read the drafter's facts at open, before Served.reserve timed it. So on
    818c7df81a the rule had no prices at all (TF_SHARED_PRICE_LOG=1: shared_ms= empty, step_ms=0.000). The
    earlier round-cost and limit_shared_drafts commits did nothing while serving. Served.reserve now re-reads the
    drafter's facts after its reserve. Without --drafter that code is not reached.

1. Speed (binary 717d8777 = c83e9b40e2)

A-B-B-A as before: each server runs c=1, then c=4, then c=8. Same replies on all servers, 0 empty.

streams copy tok/s --drafter tok/s change paired slower
1 51.63 / 51.57 67.14 / 66.62 +29.6 % +30.0, +29.2 % 0 of 2
4 119.71 / 119.48 126.71 / 125.95 +5.6 % +5.9, +5.4 % 0 of 2
8 156.68 / 156.48 157.23 / 156.20 +0.1 % +0.35, -0.18 % 1 of 2
8, first on a fresh server 142.58 / 142.49 / 142.37 / 144.05 140.25 / 140.34 / 140.05 / 139.68 -2.0 % median -1.63 % 4 of 4
  • A/A spread: 0.1 / 0.2 / 0.1 %, and 1.2 % in the fresh-server row.
  • The fresh-server row was run A-B-B-A-A-B-B-A with c=8 only, so 5,877 of the 7,021 prompt tokens are not cached.
    In the run as before, c=8 comes after c=1 and c=4 have cached the prompts.
  • The servers' own per-request elapsed sums are about 1.7 % lower with the drafter, but the batch's wall clock is
    longer. I have not found the cause.

2. Exactness (same binary): all true, 0 empty.

  • drafted == "draft": false, greedy and seeded
  • c=4 == solo and c=8 == solo (greedy), seeded c=8 == solo
  • resumed == fresh (12 resumed hits vs 0)
  • copy-only head == main == drafted, hash 68821bb6df05e8d4, the same as on 818c7df81a

Tests

  • Host test test-hold-pass-host: a 2 ms pass keeps 3,3,3,3; a 60 ms pass gives 0,0,0,0 (copy rounds); no
    hold_costs keeps the legacy cap.
  • A cuda_drafted test checks that the served facts carry what the drafter timed at reserve.
  • Both planted controls go red: payPass off, and the re-read off.
  • x86 lane: green, apart from the known cli_config_test umask failures. pr_check: 0 errors.

Default path: your GREEN run on 818c7df81a still covers it. Since then the code without --drafter is unchanged:
the new branch needs hold_costs, and the re-read needs a drafter. Copy-only replies equal main's.

Not run

  • Copy-only timing rows on this head.
  • c=1 and c=4 first on a fresh server.
  • An A/B of the hold price alone: 17 of 383 c=8 rounds dropped the drafter's pass, and most of the c=8 change comes
    from the round costs reaching the rule at all.

The proposed CHANGELOG line is in the body; there is no CHANGELOG commit.

@ashhart

ashhart commented Nov 18, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena

@jschmied
jschmied force-pushed the kolibri1-drafter-lanes branch from 68fda81 to 5e0d06b Compare November 19, 2026 07:10
@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart Thanks. Rebased and re-run; the new head is 5e0d06bd81 on main a1781885e9 (merges cleanly with
6db2561b18). Still don't land yet: c=8 is 1.9 % slower, 4 of 4 pairs.

Rebase. The 14 commits are cherry-picked; code unchanged. Main's test registrations are kept in
lane_halt_host.zig and lanes/depth.zig, with ours added after them. The model row is now in
docs/supported-models.md ("EAGLE-3 drafter with --drafter"); README.md is main's.

Speed. Binary a25b535a (a2b65eb471) vs main a1781885e9 (56beeffc, copy drafts). One job per stream count,
each A-B-B-A-A-B-B-A on 8 fresh servers (page cache dropped before each start), running only that count. 24 prompts,
256 tokens, greedy. All 24 servers give the same replies (7b07ae66909cccc2), 0 empty.

streams main tok/s --drafter tok/s paired median slower
1 51.21 51.11 51.25 51.36 65.30 65.09 64.92 65.04 +27.5 +27.4 +26.7 +26.6 % +27.0 % 0 of 4
4 109.03 110.30 109.63 109.35 114.45 113.65 114.85 115.47 +5.0 +3.0 +4.8 +5.6 % +4.9 % 0 of 4
8 141.46 141.66 142.26 142.53 138.05 140.70 139.47 139.97 -2.4 -0.7 -2.0 -1.8 % -1.9 % 4 of 4

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 elapsed sums are about 1.4 % lower with the drafter, but the batch
waits on its slowest stream. Per-request elapsed at c=8: main max 15.1 s (std dev 1.7 s), drafter max 18.6 and
20.5 s (std dev 2.9 and 3.1 s). Rounds are shared, so a stream whose drafts rarely land still waits for the larger
drafted round. The depth rule prices tokens a ms over all streams, so it keeps those rounds. A fix would be a
per-stream bound in the lane core (no stream's expected rate below its copy-round rate). That is a core change, so
I would like your call before I build it.

Exactness (same binary): all true, 0 empty.

  • drafted == "draft": false, greedy and seeded
  • c=4 == solo, c=8 == solo (greedy), seeded c=8 == solo
  • resumed == fresh (12 resumed hits vs 0)
  • copy-only head == main == drafted, hash 293d716e74b701a6 (new base; was 68821bb6df05e8d4)

Tests. GB10 host (kolibri, cuda, hold-pass, shared-price-learning, lane-api): 434/434 steps, 0 failed. x86 lane:
green apart from the known cli_config_test umask failures; pr_check 0 errors, lean 221 vs 221.

The body names the new head; the proposed CHANGELOG line is in it, no CHANGELOG commit.

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Thanks @jschmied for the clean rebase keeping lane_halt_host.zig, lanes/depth.zig, and docs/supported-models.md aligned with main, and for the fresh-server runs and per-request latency breakdown at eight streams.

The c=8 regression (-1.9%, 4 of 4 pairs slower) still blocks landing, and your diagnosis makes sense. Please go ahead and add the per-stream rate bound in the lane core so no stream's expected rate drops below its copy-round rate (with host tests for the new guard), then re-run fresh-server A-B-B-A at c=1, c=4, and c=8 alongside the exactness gates on the updated head. Once all three stream counts are at or above copy drafts, we will run the --drafter checks on a GB10.

  • Synthena

@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart Thanks. I built the per-stream bound and measured it. It makes things worse, so I have not pushed it.
Don't land yet. The PR head stays at 5e0d06bd81.

What the bound does (local commit 9df247eef8): payPass keeps the drafter's holds in a round only when every
live stream holds one and each stream's expected tokens per ms, with the pass, are at least its copy round's
(Rule.payHoldsBound in core/lanes/depth.zig). Otherwise the round takes copy drafts. There are two host tests in
test-hold-pass-host (21/21). With the guard planted off, hold pass: bound: a stream left without a hold would wait on the others' pass, so none holds fails by name.

Exactness on that binary (c07935ad): all true, 0 empty. drafted == plain (greedy and seeded), c=4/c=8 == solo,
seeded c=8 == solo, resumed == fresh (12 hits vs 0), and copy-only head == main == drafted. Hash 293d716e74b701a6,
the same as before.

Speed. Fresh servers, A-B-B-A-A-B-B-A, each stream count run alone; A is main a1781885e9 (56beeffc) with copy
drafts. 24 prompts, 256 tokens, and the same replies on every server (7b07ae66909cccc2):

streams main tok/s bound tok/s paired median slower
1 51.44 51.65 51.51 51.55 65.16 65.20 65.52 65.95 +26.7 +26.2 +27.2 +27.9 % +26.9 % 0 of 4
4 110.58 110.17 109.85 109.56 109.62 108.65 107.64 105.77 -0.9 -1.4 -2.0 -3.5 % -1.7 % 4 of 4
8 140.03 139.99 140.61 141.19 136.20 135.38 135.84 136.04 -2.7 -3.3 -3.4 -3.6 % -3.3 % 4 of 4

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
1.4 points at c=8.

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
1.19-1.20 at c=8 (main: 1.07). Even so, these servers are slower than main. A loaded drafter seems to cost about 3 %
a round even when the round holds nothing. I have not proven this; my suspicion is the absorb pass, which runs every
round. The bound prices a copy round as if that cost were absent, so falling back to copy drafts cannot reach main's
rate.

Next. A fix has to make a copy round under --drafter as cheap as one on main. One way is to skip the absorb on
rounds without holds and catch up before the next hold. I will measure that cost first (the same server with
--drafter and holds forced off), then come back with the design before building it.

Tests on the bound commit. On the GB10 host: 434/434 steps. On x86: fmt 0, and gradient and cuda are green;
host/full fail only cli_config_test (the known umask failure). pr_check raised one lean finding (a two-line doc
comment), which is fixed in 9df247eef8.

@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena

@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart I measured the cost I promised: it is the drafter's absorb pass. Don't land yet. The PR head stays at
5e0d06bd81, and nothing new is pushed.

How. I used a local diagnostic build: PR head plus switches, never pushed. It loads --drafter but asks every
draft at depth 0, so no hold pass runs and every round is a copy round. The drafter still absorbs the kept rows.
Tokens per round are 1.073 on every server, the same as main. Fresh servers, A-B-B-A-A-B-B-A, each stream count run
alone. A is main a1781885e9 (56beeffc). 24 prompts, 256 tokens, and the same replies everywhere
(7b07ae66909cccc2), 0 empty:

streams main tok/s drafter, holds off paired median slower
1 51.46 51.13 51.07 51.24 48.89 49.04 48.75 48.89 -5.0 -4.1 -4.5 -4.6 % -4.6 % 4 of 4
4 109.14 109.20 110.02 110.07 105.08 105.01 104.90 106.73 -3.7 -3.8 -4.7 -3.0 % -3.8 % 4 of 4
8 141.38 142.64 141.45 140.91 135.82 135.85 137.15 135.57 -3.9 -4.8 -3.0 -3.8 % -3.9 % 4 of 4

Where it sits (c=8, two servers per arm, in mirrored order):

arm tok/s vs main
main 140.84 141.45 -
--drafter, holds off 135.66 135.96 -3.8 %
same, absorb skipped 140.99 141.13 -0.1 %
same, absorb and tap copies skipped 141.47 140.65 -0.1 %
head binary, no --drafter 140.86 141.48 0.0 %

nsys on a short c=8 run, same binary, absorb on vs off: +1,512 tf_dense_rows_16 launches (+244 ms), +271
tf_window_decode_tc (+29 ms), and about 27 ms of small kernels. That is about 1.0 ms per round over 271 passes.
Each pass reads the drafter's ~181 MB of weights (fuse, fc, qkv, o, gate_up, down), so it costs about the same
however many rows it takes. The tap copies and the wrapper cost nothing measurable.

Proposed design (not built yet; tokens cannot change, because the target still verifies every draft):

  1. Drafted.draft in the lane core: a depth-0 request no longer absorbs its kept rows. The stream records them as
    owed, as long as the drafter declares a new Facts.lazy_absorb.
  2. When that stream next gets a hold, Drafted absorbs the owed rows first, in the same absorbMany as that round's
    other rows. The chain then starts from the same row and token as with eager absorbing. The drafter's kernels
    compute each row by itself, so its state is bit-equal too.
  3. The target has to keep the owed rows. Kolibri's tap ring holds 256 positions per slot, and the backend would
    report that as a fact. When a stream's owed rows near that limit, Drafted absorbs them anyway, about once every
    180 rounds without a hold.
  4. The drafter times one absorb pass at reserve, as it already times the hold pass. payHolds and the per-stream
    bound add that cost for streams that owe rows, so the bound compares against a real copy round.

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
deferred absorbing give the same drafts (also across a ring wrap), the served gates as before, and fresh
A-B-B-A at c=1/4/8.

Expected effect (an estimate, not measured): a round without holds would then cost the same as on main (the
"absorb skipped" row). The bound alone is -1.7 % at c=4 and -3.3 % at c=8, and most of its rounds hold nothing. With
the absorb skipped on those rounds, it should land near +2 % at c=4 and near +0.5 % at c=8, with c=1 unchanged.
Without the bound the gain is small, because only about 4 % of c=8 rounds hold nothing.

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?

@ashhart

ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner

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 --drafter. The default path is fine: the 16-row tiling is bit-identical (0/48 differ) and level with main at eight streams.

With --drafter, eight streams still lose (-1.9%, 4 of 4 pairs slower), so we'll keep this unlanded, as your title says. Before you change that state path, could you sketch the absorb/catch-up change here so we can agree on it? Once it's pushed, please re-run fresh-server A-B-B-A at 1, 4 and 8 streams with the exactness checks on the new head, and we'll run the --drafter checks on a GB10.

  • Synthena

@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart, the sketch is in #3590 (comment); in short, for agreement before I touch the state path (nothing is built yet, head stays 2ffa4f9484):

  1. Defer: in the lane core's Drafted.draft, a depth-0 request no longer absorbs its kept rows when the drafter declares a new Facts.lazy_absorb; the stream records owed_from, its first unabsorbed position.
  2. Catch up: when that stream next gets a hold, Drafted absorbs [owed_from, start + kept) first, in the same absorbMany as that round's other rows (one weight read for all of them), then holds. The chain starts from the same row and token as with eager absorbing, and the drafter state is bit-equal, since each row is computed by itself and only the batching changes.
  3. Ring limit: the backend reports how many rows it keeps per stream (Model.feature_rows, 256 for Kolibri's tap ring). When owed rows would pass that minus one view (64), Drafted absorbs them that round anyway, about once every 180 hold-free rounds.
  4. Pricing: the drafter times one absorb pass at reserve, at 1 and 64 rows, as it times the hold pass. payHolds and the per-stream bound add it for streams that owe rows, so a hold-free round is compared against a real copy round.

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.

@ashhart
ashhart force-pushed the kolibri1-drafter-lanes branch 2 times, most recently from 6946958 to 230d1c9 Compare November 23, 2026 12:47
@ashhart

ashhart commented Nov 23, 2026

Copy link
Copy Markdown
Owner

@jschmied Thanks for the careful Kolibri-1 drafter work and the absorb measurements. One small fix in reserve: the EAGLE-3 caches are allocated, the step and hold timing passes run, and only then are the caches cleared. Those timings therefore read uninitialized device memory, and they feed the depth rule. Could you move the clear to right after x.e.reserve, and keep the existing clear after the timing passes? Tokens should not change, because the caches are cleared before any stream opens. We have not measured how much the timings move.

The red build on this head is not from your code. Our rebase changed the envOff line in backend.zig, and we will fix that on our side.

  • Synthena

@ashhart
ashhart force-pushed the kolibri1-drafter-lanes branch from 230d1c9 to 440b9e3 Compare November 23, 2026 17:15
@ashhart

ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Thanks @jschmied for the rebase and the fresh-server speed measurements. The drafter still has three correctness blockers:

  1. zig/src/families/kolibri1/drafter.zig:215-223 calls time and timeHolds immediately after x.e.reserve(streams + 1), but clears the EAGLE-3 caches only afterward. Both timing passes at position 64 therefore read uninitialized K/V and last-output state, and those timings drive draft-depth selection. Please clear immediately after reserve as well as after timing.

  2. zig/src/families/kolibri1/row_costs.zig:53-56 always times a 64-row round and requires its four chains. Since Drafter.reserve calls this unconditionally, configured --parallel 1, 2, or 3 returns TimingSlots instead of opening. Please make calibration use the available slots without requiring four, and add coverage for those three configured stream counts.

  3. The early paged memory check uses kb.m.slots, which is one at this point (forward.zig:93-96), while final reserve allocates N + 1 drafter slots (drafter.zig:215). The subsequent plan also does not include the first stream's new target cache and timing slot in that check. Please account for the final allocation before creating drafter resources, so a tight-budget load gets the promised early DrafterPastMemory refusal rather than exceeding the budget or failing later.

The recipe also gives only abbreviated drafter revision 6430e5dc74 and no drafter weight license. Please pin the full revision and record the upstream release's license rather than relying on TensorFold's license.

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.

  • Synthena

@jschmied jschmied changed the title kolibri1: the published EAGLE-3 drafter behind --drafter on CUDA (don't land yet: 8 streams 1.2 % slower) kolibri1: the published EAGLE-3 drafter behind --drafter on CUDA (don't land yet: 8 streams and cold prompts slower) Nov 24, 2026
@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart Thanks. Both reviews are answered on 57b037e491: three commits on your 440b9e33af, no rebase. Don't land
yet
: two served cells with --drafter are slower than main, 8 streams (-1.9 %) and a cold prompt's first token
(-41.8 %).

1. Clear before timing (cb9f870663). reserve now zeroes the EAGLE-3 caches right after x.e.reserve, before
the step and hold timing passes. The clear after them stays.

2. --parallel 1/2/3 (7a792d46d5). row_costs.time times only the widths the target's slots can take, 16 rows
a slot, and returns how many it timed. Host test: calibration times the widths 1, 2 and 3 streams can take, without asking four slots. On the GB10 with --drafter, each of --parallel 1, 2 and 3 opens and times its rounds over
1/2/3 slots (up to 16/32/48 rows). Drafted == plain, greedy and seeded, and N streams == solo.

3. Early memory check (7a792d46d5). Drafter.admit takes a Load and runs before the drafter allocates
anything. The Load counts:

  • every drafter slot reserve will make: N + 1 with a fixed --parallel N on pages, every stream's on linear caches;
  • on pages, the first stream's target window.

The first stream's drafter slot and the timing slot are not in the server's stream plan, so they are now allocated
at open, before the server reads its room. Test by name: DrafterPastMemory: --parallel 8 on pages counts 9 drafter slots and the first window, nothing allocated before. One byte short refuses; the old one-stream accounting let that
budget through. The test also checks admit's type, which takes numbers only. Planted controls (the old accounting,
and a calibration that needs four slots) fail all three tests by name.

4. Recipe (57b037e491). The drafter is pinned at 6430e5dc7453dd4ea57022a4cde46178afe89094 with its
model.safetensors sha256. The licence is the release's own: Apache-2.0 per its model card, with the card's note on
its German training data.

Exactness. Binary 1c88dadd is the head's code plus a local fix of the rebase's envOff line, never pushed.

  • drafted == plain, greedy and seeded: true
  • c=4 == solo and c=8 == solo (greedy), seeded c=8 == solo: true
  • resumed == fresh: true (12 hits vs 0)
  • copy-only head == main == drafted: true, 293d716e74b701a6, 0 empty
  • parity_controls.py on main and on the head: CONTROLS: PASS (4 prompts, seeds differ on 4) both

Speed. abba5.py: a noise floor from 3 rounds of A against A, then 5 rounds of A-B-B-A. Every run is a fresh
server measuring one cell, with main's copy drafts as A. Tokens are equal in every run.

cell verdict
c=1 FASTER +27.9 % (floor 0.6 %, 0 of 5 worse)
c=1, served defaults FASTER +32.1 % (0.8 %, 0 of 5)
c=4 FASTER +4.1 % (0.4 %, 0 of 5)
c=8 SLOWER -1.9 % (1.4 %, 5 of 5)
cold 7,900-token prompt, first token SLOWER -41.8 %, 3.64 -> 5.16 s (0.5 %, 5 of 5)

Why. One nsys round on the cold prompt: of +1.51 s of kernel time, tf_dense_rows_32 takes +1.41 s (236 launches
vs 50). The drafter absorbs every prompt row through the row kernels, 32 rows a tile, about 0.19 ms a row. c=8 is the
same pass once per round, as measured in 7027914287. A fix would absorb only the prompt rows the drafter's window can
still read, run long absorbs as a prefill-shaped GEMM, and defer absorb on hold-free rounds (7063086063). Each of
these changes the drafter's state path, so I haven't built any of them. Should I?

x86 full set: green (0 failed), apart from one lean finding (a two-line comment), fixed in the head; pr_check 0 errors
on the head. The body names the head; there is no CHANGELOG commit.

@ashhart

ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena

@AIFlowML

Copy link
Copy Markdown
Contributor

I replayed the paged admission case on a scratch merge of 57b037e491 into 4c79cfe346, keeping main’s tests and applying the documented envOff fix. On M5 Max, zig build test-kolibri-host test-gradient-serving check-native-cuda-host -Dfixed-cpu -j2 --summary all passed 34 tests with one skip.

For the tap-ring boundary Ash flagged, I extended the existing eight-stream DrafterPastMemory fixture. The paged model's slotCap() is 64 even at --parallel 8. With three taps, 2,560 hidden values and a 256+64 row ring, the production dimensions give 314,572,800 bytes. The existing fixture admits 3,858,848,256 bytes for the drafter and first window. At 4,173,421,055 bytes available, one byte short after adding the ring, Drafter.admit still returns 3,858,848,256 instead of DrafterPastMemory. The test runs without CUDA allocations. That supplies the one-byte-short case for the early check. The subsequent page-pool plan also needs to leave room for the ring before the first calibration forward allocates it.

Igor Lessio - AIFLOW LABS

jschmied and others added 15 commits November 29, 2026 19:19
… 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.
@ashhart
ashhart force-pushed the kolibri1-drafter-lanes branch from 2ad6478 to 9199420 Compare November 29, 2026 19:23
… 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.
@jschmied

Copy link
Copy Markdown
Contributor Author

@ashhart Thanks for 7259888978. Both slower cells are addressed on 5ce36a59c9, your head rebased onto main 0546beeee8 with our three commits on top.

  • Second token (cold 7,899-token prompt, token 1 -> 2): the drafter's reach is absorbed before token 1, so the first
    draft no longer waits on it. Copy drafts and --drafter now measure the same interval (0.0205 s against 0.0200 s, within noise).
  • c=8 (on this head): rounds of 17..64 rows run the router and head as one tiled launch (same bits as the 16-row split, micro-checked at
    every row count). c=8 is now within noise (+0.8 % median, floor 0.61 %, B worse in 1 of 5 rounds).

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
c=4 carried from ca3dca2fda, same kernels), c=8 +0.8 % on this head (within noise), cold first token +45.8 %, token 1 -> 2 within noise. Gates: drafted == plain (greedy, seeded), c=4/c=8 == solo,
resumed == fresh (12 hits), copy-only head == drafted == copy-only main, 0 empty, CONTROLS PASS, PAR123 PASS, resume plant
red, x86 green.

@ashhart

ashhart commented Dec 2, 2026

Copy link
Copy Markdown
Owner

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 5ce36a59c9:

  • The cold prompt's token 1 → 2 interval was 58 ms slower because the drafter's reach was not absorbed before token 1; the lazy absorb (b921776634) fixes it, and the cell is now within noise (0.0205 s copy drafts against 0.0200 s with the drafter, floor 2.44%).
  • The c=8 loss was the drafter's per-round dense launches over 17..64 rows; the prefill-shaped dense operator (ca3dca2fda) runs the router and head as one tiled launch at those row counts with the same bits (micro-checked at every row count), and c=8 is now within noise (+0.8% median, floor 0.61%, B worse in 1 of 5 rounds).

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 ca3dca2fda with identical kernels, nvcc include closure md5 equal), cold first token +45.8%, c=8 and token 1→2 within noise. Gates: drafted == plain greedy and seeded, c=4 and c=8 == solo (seeded c=8 too), resumed == fresh with 12 cache hits, copy-only head == drafted == copy-only main, 0 empty replies, CONTROLS PASS, PAR123 PASS, the resume plant red as planted, x86 CI green. The warm-restore work answers the earlier stale-state ask: a cache hit is kept and the drafter's history is rebuilt where that can be exact (prompt fits the 2,048-row drafter window and the restore lies within the 513-row sliding window), other restores take the conservative by-name option (no absorb, no hold, fillers), scoped by Drafter.fresh_only to Kolibri's EAGLE-3 with Qwen's tree drafter unchanged, and the regression compares drafter state and accepted drafts as well as replies.

Main-state check: --drafter for Kolibri-1 on CUDA is not on main; the drafter-outside-the-family plumbing exists in zig/src/core/lanes/drafter.zig (the taps, copy_match, the offered tree), but no published EAGLE-3 drafter is wired for this family, so this is a real user-facing gap.

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

@ashhart ashhart added kind:perf Classified by Synthena as performance improvement synthena:needs-receipt Speed PR awaiting verified perf_receipt.py hash run labels Dec 3, 2026
@ashhart

ashhart commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Synthena Initial Review — Performance receipt required (kind:perf)

Adds the EAGLE-3 drafter behind --drafter for Kolibri-1 on CUDA, including lazy absorb pricing, prompt-cache restore handling, and a new tf_dense_rows_tiled kernel for 17..64-row dense launches. Claims served-cell speedups (c=1 +28%, c=4 +3.7%, cold prompt +45.8%) with c=8 within noise.

  • Branch currently has merge conflicts against base.
  • Performance claim detected without a verified tf-receipt-v1 receipt.

Performance PRs require a verifiable benchmark receipt before running project CI hardware. See CONTRIBUTING.md (Performance PRs: verifiable benchmark receipt) and attach the output of:

python3 tools/perf_receipt.py run --base-bin /path/to/base-tf --head-bin /path/to/head-tf --model /path/to/model.tfold --out receipt.json

Findings:

  • [BLOCKER] zig/src/core/lanes/open.zig: firstDepth unconditionally decrements draft_room, but the function is also called for non-drafting paths (reach == .head with node_probabilities off falls through to e.rule.depth(who)); if any caller invokes firstDepth for streams that will not draft (e.g. copy-first or shared-cap streams), the room is consumed without a draft, permanently shrinking later rounds' depth. Suggested fix: Decrement only on the path that actually leads to a draft, or document and assert that firstDepth is only called for streams that will hold drafts; add a regression test for a copy-first stream's first round.
  • [BLOCKER] zig/src/core/lanes/depth.zig: The old code clamped with @max(1, who.draft_room - 1); removing it means draft_room == 0 now yields most = -1, and while the if (most <= 0) return 0 guard catches that, draft_room == 1 yields most = 0 which is now a silent no-draft where previously it drafted 1. Combined with the open.zig decrement, a stream whose room was 1 before firstDepth now drafts none, changing behavior for any existing caller that relied on the old floor. Suggested fix: Confirm the intended semantics change is covered by tests for draft_room == 1 and 0 on both depth() and headDepth(); the deep_chain_test addition covers headDepth but depth() with room 1 returning 0 should be asserted explicitly.
  • [WARNING] zig/src/families/kolibri1/forward.zig: tap() issues a cuMemcpy2DAsync per tapped layer per forward call; with taps configured but tap_rows sized for max_rows, a forward with n rows larger than the tap_rows allocation (e.g. a prompt chunk exceeding the reserved row count) writes past the buffer since there is no bounds check against the tap_rows height. Suggested fix: Assert or clamp n against the tap_rows allocation height in tap(), or size tap_rows from the same max_rows bound the forward already enforces and add a debug assert.
  • [WARNING] zig/src/families/kolibri1/rounds.zig: The fingerprint includes m.taps.len but not the tap layer indices themselves; two configurations with the same number of taps but different layers (e.g. taps {2} vs {5}) produce identical fingerprints, so a cached round graph could replay with tap copies taken from the wrong layers. Suggested fix: Hash the tap indices (e.g. fingerprintOf over m.taps slice contents) rather than only the count.
  • [WARNING] zig/src/core/lanes/drafter.zig: owed_max is a bare constant with no validation tying Facts.lazy_rows to it; a family returning lazy_rows > owed_max silently exceeds the documented one-target-feature-view bound, risking an oversized absorb or truncated taps. Suggested fix: Clamp or reject lazy_rows > owed_max where Facts are consumed, and note the bound in the Facts.lazy_rows comment.
  • Synthena

@jschmied

jschmied commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

I checked each finding against 5ce36a59c9. None needs a code change. The receipt is below.

  • [BLOCKER] firstDepth consumes room: it doesn't. who is a local copy (open.zig:147). win.who(s) returns depth.Who by value, with draft_room = s.draftRoom() (windows.zig:245-246), and draftRoom() is computed from the stream's budget on every call (stream.zig:441-445). The -= 1 (open.zig:148) changes only that copy, for the one depth it returns, and nothing is stored. It's the review-tools: authenticate cache benchmark probes with explicit bearer keys #1483 fix (11-29): a two-token reply's first round drafted a row it could never keep.
  • [BLOCKER] depth() with room 1 now returns 0: that change is intended. With one token left, a verify of the pending row alone gives it, so a draft there can never be kept. The tests assert it for both rules: deep_chain_test.zig:48-62, a stream with one token left drafts none, through the head rule and the depth rule alike, has r.depth(w) with room 1 == 0 at :58 and headDepth at :56-57. The old @max(1, room - 1) gives most = 1 there, and depth() then returns @max(1, ...) = 1, so :58 goes red on it. Room 0 gives most = -1, which returns 0 at depth.zig:168.
  • [WARNING] tap() past tap_rows: tap_rows holds max_rows rows (taps.zig:75). Every launch gets its n from stage, which refuses n > m.max_rows (forward.zig:404, error.TooManyRows). The calls are at forward.zig:383 and rounds.zig:59; the one-row step passes 1 (:570). So tap(s, j, n) (:538, :545-548) copies at most max_rows rows.
  • [WARNING] fingerprint without the tap ids: the ids can't change under a cached graph. prepare refuses a second call (taps.zig:69, error.TapsTwice). The one caller drops every captured step and round graph first (backend.zig:534-542), and refuses once a stream exists. Taps.deinit runs only at the backend's teardown, together with rounds.deinit (backend.zig:132, 137).
  • [WARNING] lazy_rows above owed_max: it is clamped where it is consumed: const lazy = @min(d.lazy_rows, dr.owed_max) (drafted.zig:349). The bound is in the field's comment (drafter.zig:30).
  • Conflict with main: ashhart rebases at landing. Not rebased.

Receipt (tools/perf_receipt.py and pack from main c05d9ff3b8, GB10, Aleph-Alpha/Kolibri-1@e52eb462). Base is main 0546beeee8 (the merge base) and head is 5ce36a59c9, run with --draft --check-draft, verify PASS:

  • decode 55.49 -> 70.41 tok/s (+26.89 %, base-vs-base noise 0.09 %, order base,head,head,base). This matches the body's c=1 row (+28.4 %).
  • The head's drafted tokens equal plain (prose_greedy, sha256 3eae120b…10d1 both). The seeded control diverged.
  • Binaries: the tool hashes the binary it launches, and it passes the same serve args to both arms. Main refuses --drafter for Kolibri-1, so each arm runs through a two-line exec wrapper: head = tensorfold-native "$@" --drafter <Kolibri-1-EAGLE3-drafter>, base = tensorfold-native "$@". So base/head_binary_sha256 are the wrappers' hashes. The real binaries are head f8c43e0a…b247a and main 4b7c9529…8104 (sha256), the ones the body's rows used.
  • Unsigned (we have no key), and not committed: a committed receipt's head_sha can never equal the head that adds it.
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"
}

@ashhart ashhart added synthena:needs-device Initial diff review passed; waiting for device and slowdown check before READY and removed synthena:needs-receipt Speed PR awaiting verified perf_receipt.py hash run labels Dec 5, 2026
@ashhart

ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:perf Classified by Synthena as performance improvement synthena:needs-device Initial diff review passed; waiting for device and slowdown check before READY

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants