# Stage 6d: tokens per round and the drafter on the RTX 5090 (2026-11-12) Status: analysis done (no GPU); the knob measurements are queued (section 5) and their numbers are NOT in this file yet. Labels: M measured, E estimate. ## 1. Vanilla against Leleka: tokens per round Method: vanilla logs `generated N ... drafts accepted a of b` per request, so rounds = generated - accepted (one bonus token a window); Leleka logs `rounds` itself. Requests of 100+ tokens. | arm | requests | tok/round | ms/round | decode tok/s | source | | --- | ---: | ---: | ---: | ---: | --- | | VAN (vanilla 0.2.6, shipped defaults) | 258 | 2.960 | 12.42 | 238.3 | `codex-compare/runs/main/VAN/*/engine-slice.log` | | VANL (vanilla 0.2.6, lossy defaults off) | 240 | 2.959 | 13.65 | 216.8 | same, VANL | | LEL release 17e372944279 | 227 | 3.337 | 18.75 | 178.0 | same, LEL | | LEL release 83bdd85bb482 (owner default) | 259 | 3.194 | 16.41 | 194.6 | `prefill-latency/runs/e2e-codex-ttt-and-crm-release-83bdd85bb482-owner-default` | **Vanilla's accept length is NOT higher; ours is 8-13 % higher.** The gap to vanilla is the round time (16.4 against 12.4-13.7 ms), not acceptance. Tokens per round in the replays: 3.30 (243k), 3.58 (110k), 3.19-3.47 (cap-s3 / 67k). The same finding was made at 245k in 2026-11 (ours 2.05-2.13, vanilla 1.79-1.88, `docs/upstream-review/decode.md`). ## 2. What upstream changed (pin 41cf05a0 / engine 0.1.50 to `strata-upstream/main` 504b14334 / engine 0.1.59), local git only | upstream change | applies to us? | | --- | --- | | `6ec4d68ab`, `a04860fad` DFlash2 per-device defaults: Blackwell cc 12.0 conf 0.35 to 0.55, window 6 to 8 | **No.** They configure the DFlash2 block drafter (we run the MTP chain + suffix drafter), only on cc 12.0 cards with >= 48 GB (RTX PRO 5000 72 GB, set IQ3_S, every expert resident, +2.4 %, output identical). The code says explicitly that consumer cards under 48 GB (the RTX 5090 has 32 GB) keep conf 0.35 and window 6 (`strata_control/drafting.py` `big_blackwell`, `window_for`). | | DFlash2 is the Auto drafter on CUDA IQ3_S (`13edeb7f8`, CLASS_DEFAULTS: MTP only on the 12 GB streaming class) | Means a new-base vanilla on the 5090 will run DFlash2 (slots >= 12,000 give conf 0.35, window 6, tuned pack), not the MTP of our VAN/VANL. Upstream measures DFlash2 +2..+14 % per text kind over MTP on resident cards, +6.5 % on one streaming set, and the MTP wins by 12-44 % where the experts stream from file. Its accept length is not published in the repo (`phaseA-tests/` is not in it). Porting it is a drafter port (5 transformer layers, Q8_0/Q4_0 pack, selector), not a knob. Not started. | | `cc703b5e4`, `03627326d` (#4040) `--lookup-max-t 12` on by default: prompt-lookup windows up to 12 rows, run as two groups of 8 | The one change that targets accept length. Upstream: file rewrites and agent edit turns +11..+14 % (A6000, resident), prose and code within 1 %. Our `kVerifyMaxT` is 8 (compiled into the sealed PTX). See section 4. | | `STRATA_SPEC_PROB`, `STRATA_DF2_GATE` (retired later), `STRATA_WINDOW_MAX_T=12/16` | sampled-request or other-drafter features; wide-window build: upstream says it gains less than the two-group form. Not applicable to greedy MTP serving. | | MTP drafter code (`mtp.cpp`, +292 lines) | plumbing only (prompt room, KVA floor, Pascal Q8, DFlash2 head sharing); the draft numerics and the draft attention window (32768 cells, same constant in ours) are unchanged. | | `draft_vocab_en.bin` (release notes 0.2.7: +2.7..+3.1 % decode English text) | already ported opt-in (`LELEKA_DRAFT_VOCAB`, `2026-10-30-draft-vocab-en.md`); its A/B never ran. Queued, section 5. | | `MMQ_KQ` default for cc >= 8.0 | K-quant matmul default for prompt paths; our model is IQ3_S, no draft effect. | ## 3. Knobs that exist in our port `LELEKA_SPEC_ARMS` per-arm policy constants (`explore margin min_p_lo step alpha decay bias ceil rowq smooth measured`, floor ceiling = `adaptive@P`), process level `LELEKA_SPEC_SUFFIX` (suffix minimum match, 3), `LELEKA_SPEC_ADAPTIVE_MAX_T` (8, the compiled ceiling), `LELEKA_SPEC_MTP_MAX_T`, `LELEKA_DRAFT_VOCAB`. The draft attention window (32768) and the suffix index (trigram, 4 candidates) are constants. The window policy landscape was measured flat (+-1.2 %) at 245k on 2026-11-03 (`window-policy-5090.md`); a faster round has since moved the optimum only slightly. ## 4. Offline estimates (CPU only, M for the counts, E for the conclusions) Round cost by width (a request of the 67k replay, `ms_by_T`): T1..T8 = 9.0, 10.1, 11.4, 13.5, 16.1, 19.1, 22.8, 24.1 ms: a base of about 7-9 ms plus 2.2 ms a row. Rounds by accepted drafts (share of rounds, `spec-stats` of the owner-default A/B): 24 % accept nothing; 10 % (67k) and 3-4 % (243k) accept all 7 drafts of a full 8-row window. Suffix drafter simulated on the real Codex session cap-s3 (33 requests, 10,414 positions, teacher-forced text, history = prompt + reply; `scripts/e2e/decode/accept-knobs-suffix-sim.py`): a proposal of match length >= 3 exists at 56.5 % of positions; mean accepted 3.81 of 7 per proposal with the 4-candidate index, 3.85 / 3.88 / 3.92 with 8 / 16 / all candidates (+1..+3 % of accepted tokens: too small to pay). If the window allowed 11 drafts: mean accepted 5.29 per proposal and 34.7 % of proposals are fully matched. E for a 12-row window (single window, slope 2.2 ms a row): a fully copied stretch costs 24.1 + 4 x 2.2 = 32.9 ms for 12 tokens = 2.74 ms a token against 3.0 at 8 rows (-9 %); full-accept rounds carry roughly a quarter of the tokens, so **at most +2 % end to end** (+1 % at 243k), and only if one 12-row window is built. Upstream's two-group form in our regime would add a second pass with its own base (a 4-row window costs 13.5 ms): 37.6 ms for 12 tokens = 3.1 ms a token, worse than 8 rows. Cost of the port: window kernels and sealed PTX for T=12, GDN commit of 12 rows, drafter catch-up. **Not worth it for 220 tok/s** (needs +20 %). Arithmetic of the target: tok/s = tokens per round / round ms. 220 tok/s at 3.3 tokens a round needs a 15.0 ms round; at the current 16.4-17.9 ms it needs 3.6-3.9 tokens a round (+13..+22 %), which no policy knob delivers (all measured within +-1.5 %); the remaining lever is the round time (stages 6c, 6e, 6f). ## 5. Measurements queued (server, `/data/leleka-e2e/prefill-latency/accept-knobs`, inputs frozen by `MANIFEST.sha256`) Instrument: `scripts/e2e/decode/accept-knobs-replay.sh`: the real Codex session cap-s3 (33 requests of 177k-232k tokens, replies capped at 400) teacher-forced in ONE test-binary process (main code of release bcbfa2c99422, sha in the manifest), release profile `rtx5090-32g` engine_env read from the frozen json, several policies as `LELEKA_SPEC_ARMS` on identical text, 5 repetitions with rotated order, base arm and its twin (A/A floor). Summary: `accept-knobs-summary.py` (paired percent against the base, 95 % interval, n of N). | job (stub in `~/work/gpu-runs/holder2/jobs`) | content | | --- | --- | | `acceptance-replay-harness-smoke-two-arms-three-requests` | harness smoke | | `acceptance-draft-vocabulary-en-identity-fixed-window-top16-rows` | fixed window 4, suffix off, night5, top-16 rows, default vs English draft vocabulary, A/A inside each process | | `acceptance-policy-knobs-codex-session-teacher-forced-ceiling-explore-rowq-margin-and-vanilla-window` | base, twin, fixed4@0.5 (vanilla window), ceiling 0.5 / 0.7, explore=0, rowq=0.75, margin=0.05 | | `acceptance-draft-vocabulary-en-vs-default-codex-session-teacher-forced` | two processes (default vocabulary control, English subset), base + twin each | Results directories `/data/leleka-e2e/prefill-latency/runs//`. Identity reading for adaptive-window knobs: the policy changes which window widths run, so rows differ within the batch-rounding envelope (`window-policy-5090.md` section 5); the forced text makes equal output true by construction, and the fixed-window gate above is the bitwise one for the drafter knob. Nothing is defaulted until a knob beats the twin floor and passes its gate.