Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
121 KiB
Step ledger: every place where Leleka (LEL) loses to vanilla Strata (VANL), in pipeline order, request to decode
Owner rule (2026-11-09): every step where we lose is recorded, even 0.02 ms. A row is never dropped as "below noise", "under 1 %", "neutral" or "NO-GO because small". This file is the single register; the narrative and the measurements behind it stay in docs/experiments/codex-compare-speed-gap.md (cited as gap doc).
Arms. LEL = release package leleka-0.1.0-17e372944279 (CUPTI CL.1: plus the lever 1 switches ATTN_DAILY, GU_SWIGLU). VANL = vanilla 0.2.6, tail skip and CPU prefill share off. Differences are LEL minus VANL: positive = we are slower. "ms/round" means per speculation round of the verify window; one round is 17.9 ms in LEL and 15.9 ms in VANL in the CUPTI window.
Closing rule. A row is fixed only with (1) a measured section delta of that very step (CUPTI window or PROFILE lines of the step, not the end-to-end A/B, which cannot see 0.05 ms), (2) identity (bitwise for non-lossy changes: draftround-id.sh top-16 logprob rows and draft trace; placement-class changes need the gate against the control placement), and (3) the end-to-end paired A/B of the whole set of fixes. Statuses: open (nothing done), fixing (code or run exists, closing evidence incomplete), fixed, proved-equal (measured equal, or measured in our favour: the sign is in the difference column).
Owners. device = verify graph and everything on the GPU (this register, session hexagonal-44f3f4); hex-finish = host, draft and prefill.
Sources. CUPTI = one 15 s window over replay request 29 (67k context), runs /data/leleka-e2e/spd-gap/runs/cupti/{CL.1,CM.1,VANL}/win-r29.lct, scripts scripts/e2e/codex/speed/{cupti_layer_phases,cupti_doorbell_latency,cupti_verify_graph,cupti_stream_overlap,kernel_roles}.py and decode_rounds.py. One window per arm: the greedy trajectories differ a little (hit mix, window width), so a per-kernel mean can carry the entry mix. PROFILE = the product's own LELEKA_SERVE_PROFILE lines (runs/main/P). LOG = engine logs of the replay cells. ORCH = figure given by the orchestrator session, not re-derived here.
Order (owner rule 2026-11-09). The ledger follows the request linearly, from the request into the engine, through prefill, to the decode round (draft, verify graph, accept, commit, publication of the tokens, next round). Work goes in this order: step N is closed (fixed, or proved-equal with a section measurement) before step N+1. Prefill and host are led by hex-finish, the decode part (verify graph, accept on the device, branch overlap, their streams) by device; both run in parallel, each in its own order. After each group of steps comes the end-to-end paired A/B of the group.
Row ids are stable (they are cited in codex-compare-speed-gap.md and in reports); the section decides the order, not the number.
A. Request into the engine (HTTP and gateway, tokenizer, prefix cache)
No per-step figure exists for A1-A3; each is a not measured row that needs a section measurement before it can be closed.
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| A1 | request: HTTP, gateway and proxy time (code pf_probe.py) |
probe pending (job prefill-empty-request-probe-leleka) |
none: vanilla is not re-measured (owner 2026-11-09); the vanilla figure comes from its existing logs | the sum 'rest' per request is Q10: 22 ms against 32 ms | LOG | hex-finish | measured (probe job prefill-empty-request-probe-leleka, 2 boots x 2): tiny prompt wall 0.540 s = engine spans 503 ms (prefill.read 250, refill 137, assemble 94, disassemble 11, round 10, draft 1) + 37 ms outside the engine; cached long prompt wall 0.157 s = engine 120 ms + 37 ms. The same 37 ms for both (client, HTTP, gateway, SSE close) is A1. Vanilla not re-measured (owner); Q10 'rest' per request in real sessions is LEL 22 ms against VANL 32 ms: no loss shown, proved-equal (LEL ahead) |
| A2 | request: tokenizer and prompt assembly of a long prompt | probe pending (job prefill-empty-request-probe-leleka: long cached prompt minus tiny prompt) |
not measured | n/a | none | hex-finish | measured: long cached prompt minus tiny prompt outside the engine = 0 ms (37 ms both), so tokenizer and prompt assembly of the 67k-token prompt cost under the probe precision (about 2 ms); proved-equal |
| A3 | request: prefix-cache lookup and import (code request.resume, ctrl.begin_request, prefix.*) |
PROFILE runs/dc1 (60 requests): request.resume 2.53 + ctrl.begin_request 0.60 + prefix.import_session 0.80 + prefix.draft_resume_at 1.05 + prefix.mtp_kv_restore 0.61 + prefix.layer_index 0.38 = 5.97 ms per request |
not measured | n/a (replay logs cached_tokens; import time only in last_import_split) |
none | hex-finish | measured, cached repeats of the 67k prompt: request.resume 2.2-2.9 + ctrl.begin_request 0.8 + prefix.import_session 0.6-1.4 + prefix.draft_resume_at 0.8 + prefix.mtp_kv_restore 0.7 + prefix.layer_index 0.4 = 5.5-7.0 ms per request; vanilla's import is inside its prompt time and not separable without the instrumented copy (not built: no evidence that the sums diverge); open at 5.5-7.0 ms |
| Q10 | gateway, proxy, serialization ("rest" per request) | 22 ms | 32 ms | -10 ms | LOG | hex-finish | proved-equal (LEL ahead) |
B. Prefill (chunks, expert ring and copies, refill, QSA, GDN, first token), then the hand-over to decode
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| Q8 | request time per output token, prefill + decode | 0.59 + 5.63 = 6.22 ms | 0.36 + 4.61 = 4.97 ms | +1.25 ms (decode +1.02, prefill +0.23) | LOG | both | open |
| Q1 | prefill: time per request at equal uncached tokens (code ladder LELEKA_PREFILL_LOAN_TIERS) |
726 ms | 431 ms | +295 ms. Ladder (LELEKA_PREFILL_LOAN_TIERS=1) paired on the sparse holder, n=5 blocks: -3.1 s per 30-request session +-0.5; <= 2048 new tokens -151 ms per request (faster in 19 of 19); n=10 (5 + 5 blocks, jobs ab3 and prefill-ladder-ab-pairs-6-10): -3.0 s +-0.3 per 30-request session, median -104 ms per request, <= 2048 new tokens -154 ms (19 of 19 faster), > 2048 tokens -10 ms; identity PASS (chunk residual hashes equal) |
LOG | hex-finish | fixed for the ladder part (switch committed in the 5090 profiles); the remaining gap at equal uncached tokens (rows Q2, Q3) stays open 2026-11-12 GROUP e2e A/B of the stage (owner method, one A/B at the end; prefill-host-stage-start-vs-complete-default-set-group-ab-5-pairs, pkg-s18, 30 requests, n=5 pairs, order A0 A A A0 A0 A A A0 A0 A): A0 = the built-in profile WITHOUT loan tiers, check merge, park fast, graph reuse and stream 1536 (profile override; the engine environment line of up-foreground.txt proves the keys differ) against A = the profile as shipped. TTFT per request, A minus A0: all 30 requests -143.7 ms (-11.2 %, CI -318.8..+31.4; pair 1 is +100 ms, the first boot of the job, the other four pairs -204.5 ms, CI -272..-137); uncached tail 64-1023 (8 requests) -269.5 ms (-31.9 %, CI -293.4..-245.6, 5 of 5 pairs); 1024-4095 (16 requests) -230.2 ms (-19.8 %, CI -294.1..-166.3, 5 of 5); >= 4096 (6 requests) +254.7 ms (CI -457..+967, pair 1 +1,240 ms, the rest -217..+183: not resolved); decode -0.40 % (CI -3.49..+1.98): no regression. The sum of the section deltas (ladder -104, Q7 -96, stream 1536 -45, park -3 = -248 ms per request) is confirmed in direction and in class; realised -144 ms (five pairs) to -205 ms (four pairs). The first run of this group (prefill-host-complete-default-set-group-ab-5-pairs) compared the profile with itself (the built-in profile overrides the shell env of the engine since pkg-s14): an A/A, noise floor TTFT +4.0 ms (CI -27.5..+35.5), decode +0.19 % (CI -0.80..+1.52 tok/s). Status: fixed (group e2e confirmed). |
| Q2 | prefill latency by uncached tokens (< 64, 64-256, 256-1024, 1024-4096, >= 4096), median ms | 430, 530, 722, 1002, 4405 | 268, 292, 435, 715, 2184 | +162, +238, +287, +287, +2221 | LOG | hex-finish | open AFTER THE STREAM THRESHOLD 2026-11-10: VANL means from the VANL engine logs (read in X ms, 3 reps): 64-256 tokens 294 ms (n=121), 256-1024 447 (n=72), 1-4k 820 (n=23), > 4k 2062 (n=8); ours prefill.read with STRATA_PREFILL_STREAM_MIN=1536: 64-256 about 400-620, 256-1024 521, 1000-1536 729, 1536-4096 830, 4k+ 1245-1500: at parity from 1 to 4k tokens and ahead beyond 4.9k, behind by +75..+170 ms below 1k tokens (VANL reads 64-256 tokens in 294 ms = 14 GB / 50 GB/s with the rest of the chunk hidden under the DMA; ours has the DMA at 45 GB/s and about 130 ms of GDN/QSA unoverlapped). Open: ring prefetch (sub-agent, switch off), U6. |
| Q3 | prefill throughput over uncached tokens | 930-1050 tok/s | 1460-1560 tok/s | -35 % | LOG | hex-finish | open see Q2 (2026-11-10): the gap that remains is below 1k tokens, not a throughput gap above it. |
| Q4 | prefill: fixed part of the chunk read (code prefill.read, 581 ms + 0.134 ms per token; 485 ms for 239 tokens) |
485-581 ms | whole prefill of that size class 292 ms | +193 and more | PROFILE | hex-finish | open: root cause found (see Q5) RING FINDINGS 2026-11-10 (jobs prefill-ring-host-spans-profile, prefill-ring-copied-megabytes-profile, pkg-s11/s12, 15 requests): moe.ring is DMA-bound, not host-bound. Host spans of the copy ring per request with a 1.4k tail: init 10.5 ms (init_sync 0.0), stage 50.7, gather 36.3, enqueue 30.1 (about 130 ms, parallel with the DMA), finish_statuses (host waits for the GPU/DMA) 335.8 ms; the wait grows about 200 ms fixed + 0.08 ms per tail token. Experts copied over PCIe per request: 7,002 (14.3 GB) at a 279-token tail, 8,794 (18.4 GB) at 1,243, 11,576 (24.0 GB) at 1,454, 12,762 (26.5 GB) at 2,837; 146-266 per layer, 45-55 % of the routed experts are not resident. GB / 45 GB/s = 319, 410, 459, 590 ms vs ring wall 332, 428, 462, ~590: the ring runs at the PCIe rate. So synchronisation fixes (step A: syncs, cuMemGetInfo, gather by 16) buy nothing. Offline prefetch study (LELEKA_PREFILL_ROUTE_TRACE, 30 requests): the experts the layer's last 3-16 chunks missed predict the next chunk's missing set with 60 % precision at 150 experts per layer (86 hits), an upper bound of about -150..-190 ms per request for a prefetch under the GDN/QSA stage; not built (complex, 40 % wasted bandwidth). PREFETCH FIRST GPU RUN 2026-11-10 (pkg-s14, LELEKA_PREFILL_RING_PREFETCH=1, sub-agent branch merged, default off): 9 of 30 requests failed with class=InvalidDimension and the chunk hashes differ (60 PREFILL-R lines vs 31): the implementation is NOT correct yet; driver error trace job queued (prefill-ring-prefetch-failure-driver-error-trace). Remains OFF. |
| Q5 | moe.ring in a small tail (72-80 % of the chunk, 48 layers x 7.4 ms, 355 ms for 238 tokens) |
355 ms | vanilla reads tails of up to 64 tokens through verify windows | +355 ms for the smallest tails. Root cause: prompt_options (original_serve_stack_prefill_phase.rs) sets force_batched: true; the planner already emits PromptPath::Verify actions for tails <= 64 tokens but the executor's verify_window hook (original_prompt_executor_drop.rs:63) is not implemented |
PROFILE prof-l5 |
hex-finish | fixing (design pending) STREAM THRESHOLD 2026-11-10: vanilla streams every non-resident expert (overlapped with the mixers) from 1024-row chunks (kStreamAllMinDefault), ours from 4096 (STRATA_PREFILL_STREAM_MIN, settings/kv.rs, set when the expert cache was off and only 60 % of the experts were routed). Profile prefill-expert-stream-from-1024-rows-profile (shipped / 1024 / 256, 15 requests): prefill.read at tails 2,837 / 2,622 / 2,453 / 1,602 / 1,454 tokens 1129 / 1029 / 1001 / 782 / 799 ms became 876 / 863 / 818 / 702 / 702; no change below 1,300 tokens, worse from 256 rows (279 tokens 465 to 747). Threshold 1536. Job prefill-expert-stream-from-1536-rows-identity-and-profile (30 requests): PREFILL-R chunk residual hashes IDENTICAL, 31 of 31 (shipped vs stream), no failures; prefill.read by tail class (mean ms, shipped to stream): < 1000 tokens 530 to 521 (-9), 1000-1536 723 to 729 (+6), 1536-4096 1010 to 830 (-180, -17.8 %), > 4096 1245 to 1280 (+35, noise); over 29 warm requests -45 ms per request (prefill.phase 921 to 877). STRATA_PREFILL_STREAM_MIN=1536 is set in the three 5090 profiles (not the 3080: tier off there, different trade). Two more levers remain (not done): the prefetch of Q4 and vanilla's CPU share (lossy, off in the reference arm). 2026-11-10 ring expert prefetch (LELEKA_PREFILL_RING_PREFETCH, prefill-ring-prefetch-slot-wrap-fixed-identity-and-profile, pkg-s17 b800bba09, 30 requests, stream 1536): the first GPU runs failed 9 of 30 with stage.slot_not_gathered at layers 46/47 (sources 410-460 > slots 384: prefetch hits skip staging, the wrap met a live un-gathered slot; fixed by stage_target, CPU test sources=460/slots=384). After the fix: identity PASS, 0 failures, chunk residual hashes 31 of 31 identical to the shipped FR.1, in the plain form (PE) and with detached drains (PED). Section delta FAIL: prefill.read summed over the 30 requests 26,643 ms (FP.1, shipped) -> 29,228 (PEP, +2,585) and 29,922 (PEDP); in the 11 requests where the prefetch ran it is +60..+190 ms each (mean +124 ms), the other requests are +9 ms (boot noise; request 0, the cold one, +930/+2,046). Counters per request: issued 14.4 GB, hit 8.4-12.9 GB (60-90 %), wasted 1.5-6.0 GB. Reading: the ring is PCIe-DMA-bound (Q4/Q5, 45 GB/s), so reading ahead adds traffic (the wasted share) on the link that is already the limit and gains no overlap. Verdict: stays OFF, not a gain; rows Q4/Q5 close on the sub-1k tail by U6 (expert-major bank, deferred) only. Caveat: arms ran in different boots and packages (pkg-s14 vs pkg-s17), the effect is larger than the +9 ms noise of the unaffected requests. 2026-11-12 GROUP e2e A/B of the stage (owner method, one A/B at the end; prefill-host-stage-start-vs-complete-default-set-group-ab-5-pairs, pkg-s18, 30 requests, n=5 pairs, order A0 A A A0 A0 A A A0 A0 A): A0 = the built-in profile WITHOUT loan tiers, check merge, park fast, graph reuse and stream 1536 (profile override; the engine environment line of up-foreground.txt proves the keys differ) against A = the profile as shipped. TTFT per request, A minus A0: all 30 requests -143.7 ms (-11.2 %, CI -318.8..+31.4; pair 1 is +100 ms, the first boot of the job, the other four pairs -204.5 ms, CI -272..-137); uncached tail 64-1023 (8 requests) -269.5 ms (-31.9 %, CI -293.4..-245.6, 5 of 5 pairs); 1024-4095 (16 requests) -230.2 ms (-19.8 %, CI -294.1..-166.3, 5 of 5); >= 4096 (6 requests) +254.7 ms (CI -457..+967, pair 1 +1,240 ms, the rest -217..+183: not resolved); decode -0.40 % (CI -3.49..+1.98): no regression. The sum of the section deltas (ladder -104, Q7 -96, stream 1536 -45, park -3 = -248 ms per request) is confirmed in direction and in class; realised -144 ms (five pairs) to -205 ms (four pairs). The first run of this group (prefill-host-complete-default-set-group-ab-5-pairs) compared the profile with itself (the built-in profile overrides the shell env of the engine since pkg-s14): an A/A, noise floor TTFT +4.0 ms (CI -27.5..+35.5), decode +0.19 % (CI -0.80..+1.52 tok/s). Status: fixed (group e2e confirmed). |
| B1 | prefill GDN and QSA stages of a small tail (per stage split) | prof-l5/Q.1 has moe, moe.ring, gdn, qsa, input per chunk |
none for vanilla | n/a | PROFILE | hex-finish | open |
| B2 | first token sampling and publication after prefill | not measured | not measured | n/a | none | hex-finish | open |
| Q6 | prefill.refill of the lent expert slots (2,226 copy spans) |
137-140 ms per request | none | +138 ms; deferring it into the decode assembly (LELEKA_REFILL_DEFER): decode -0.92 % (CI -1.63..-0.21), end-to-end +0.56 % (CI -0.15..+1.27) |
PROFILE, A/B ab-l5v2 |
hex-finish | fixing PROFILE 2026-11-10 (job prefill-refill-deferred-with-default-set-profile, default set + stream 1536, YP without / YRP with LELEKA_REFILL_DEFER, 14 warm requests each): prefill.refill 93.9 vs 70.7 ms and refill.sync 23.3 vs 23.3, refill.queue 70.0 vs 70.2 ms (the host time to issue the copies stays, now behind the decode assembly); decode.reuse 13.0 vs 13.0; wall per output token 5.95 vs 6.01 ms (sums 155.0 vs 154.7 s, 26,047 vs 25,729 tokens): no gain from the deferral on top of Q7 (the host assembly it overlapped with is 13 ms now, not 98). The cost is HOST issue of about 1,000 slots x 3 cuMemcpyHtoDAsync = 70 us per slot; plan: one cuMemcpyBatchAsync_v2 per few hundred copies (driver 595.99 exports it), bitwise (same bytes and order), switch LELEKA_REFILL_BATCH off, in progress as a sub-agent branch (host-side tests + ignored GPU test); expected -50..-60 ms per request. LELEKA_REFILL_DEFER stays off. BATCH COPY 2026-11-10 (job prefill-ring-prefetch-and-refill-batch-identity-and-profile, pkg-s14, LELEKA_REFILL_BATCH=1): production refill with the batch: refill.batch_calls 6, batch_copies 2,997, per_copy 0, refill.queue 41.7 to 1.0 ms but refill.sync 23.8 to 57.0 ms, prefill.refill 65.9 to 58.3 ms (-7.6 ms per request): the host issue was already overlapped with the DMA, the refill is bytes-bound (999 slots x 2 MB = 2 GB = 45 ms at 45 GB/s). R hashes of all chunks identical to shipped (31 of 31), 0 failed requests. The isolated GPU test refill_batch_copy_gpu_slots_equal_per_copy (Vec registered by cuMemHostRegister, 3,072 pieces) faults with error 719 on the batch arm while the per-copy arm is exact: the known driver bug of the batch entry with page-locked sources (docs/windows.md, 3080), here on driver 595.99 too; the production bank evidently takes another route. Verdict: -7.6 ms is too small to justify a driver entry that faults in some memory kinds; LELEKA_REFILL_BATCH stays OFF; Q6 stays bytes-bound (floor = lent slots x 2 MB / 45 GB/s). 2026-11-10 driver check prefill-raw-batch-copy-page-locked-driver-check (5090, driver 595.99): pcie_copy_gpu_raw_batch_page_locked, ..._raw_batch_mixed, pcie_copy_gpu_production_page_locked, ..._production_pageable all pass (4/4, ~0.9 s each), so a raw batched copy from page-locked memory works on this driver; the CUDA 719 of the slots-equal GPU test is specific to that test's registered Vec, not to batch copy. Switch stays OFF (gain -7.6 ms, bytes-bound). |
| Q7 | decode.assemble (graph re-recording per request: record_all 83 ms of 98-109 ms, nine graphs, 54-62 capture + 27-30 instantiate) |
98-109 ms per request | none (vanilla keeps its graphs) | +98-109 ms | PROFILE | both | fixing (code 7570247d9, wired behind LELEKA_DECODE_GRAPH_REUSE, identity and section delta pending on the GPU): the speed session's handles, park/rearm/reseed and this side's key, GraphReuse::begin/end, QSA owner loan, drafter decision, shared-expert pin and stack wiring are merged and tested host-side and on the lifecycle fake; compare decode.assemble with decode.reuse, decode.disassemble with decode.keep, record.*, the first-draft capture, VRAM at the low-water mark; design and scenarios docs/experiments/decode-graph-reuse.md GPU (job host-decode-graph-reuse-identity-and-profile, package pkg-s6 = our wiring + the speed session's handles/re-arm, 4 profiled boots x 30 requests): REUSE WORKS. Per request, shipped (AP.1/AP.2): decode.assemble 103.5/104.1 ms (record_all 86.5/86.9, capture 34.0, instantiate 22.2) + decode.disassemble 14.7/12.3 = 118/116 ms. With LELEKA_DECODE_GRAPH_REUSE=1 (RGP.1/RGP.2): decode.assemble 6.0 + decode.reuse 14.0/13.8 + decode.keep 0.7/0.6 = 20.7/20.4 ms, record_all 5.4 (the one full assembly of the first request averaged over 30), record.capture 1.1, record.instantiate 1.3: section delta about -97 ms per request (a reused request costs ~18 ms: re-arm with the 118 MB reseed). 29 of 30 requests reused, 1 full assembly, zero decode graphs recorded again lines (no retire), all HTTP 200. VRAM low-water unchanged (535 MiB free in both). ms/token (unpaired, free-running): 6.18/6.19 shipped against 6.10/6.12 with reuse. Identity: teacher-forced bitwise job queued (host-draft-switches-teacher-forced-identity, P4); free-running hashes cannot decide it BITWISE IDENTITY PASS (job host-draft-switches-teacher-forced-identity, test binary rt-pf9, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). FIXED for the section: -97 ms per request (118 to 20.7 ms) and identity; ON by default in the three 5090 profiles (LELEKA_DECODE_GRAPH_REUSE=1, test the_switches_that_passed_the_bitwise_gate_are_on_for_the_5090_profiles_only); the end-to-end paired A/B of the group is still to come GROUP A/B 2026-11-10 (job host-draft-switches-group-ab, n=10 per arm, 30 requests each, free-running): the group arm X = chain pipeline + check merge + park fast (reuse RG is NOT in X; its own paired e2e arm is still to run). Decode ms/token A 6.33, X 6.30, paired -0.03 +-0.08 (no regression, no gain visible); session time A 329 +-19 s, X 340 +-20 s but output lengths differ run to run (free-running), so time per equal-output pair is the fair figure: 66 pairs with output within 2 %, mean X-A -73 ms (se 46), median -5 ms. Section deltas stand (Q7 -97 ms per request); the e2e effect is below the A/B noise (about 3 % of session time), CLOSED on section + bitwise identity; ON in the three 5090 profiles; e2e confirmation by RG paired arm pending. SECTION DELTA 2026-11-10 (job host-set-profile-paired-section-deltas, one profiled boot per arm, 15 requests, package pkg-s9; AP shipped, YP = check merge + park fast + graph reuse): decode.assemble 97.8 ms median + decode.disassemble 12.0 ms (= 109.8 ms per request) became decode.reuse 13.1 ms + decode.keep 0.63 ms (= 13.8 ms) on 14 of 15 requests; the first request records (assemble 178 ms, record_all 162 ms vs 81.6 ms shipped, the one-time cost of building the held set); over all 15: 1,726 ms to 373 ms = -90 ms per request including the cold one (-96 ms on the 14 warm ones). Matches the earlier -97 ms. FIXED: section delta + bitwise identity (teacher-forced 2057/2057 rows); ON in the 5090 profiles. 2026-11-12 GROUP e2e A/B of the stage (owner method, one A/B at the end; prefill-host-stage-start-vs-complete-default-set-group-ab-5-pairs, pkg-s18, 30 requests, n=5 pairs, order A0 A A A0 A0 A A A0 A0 A): A0 = the built-in profile WITHOUT loan tiers, check merge, park fast, graph reuse and stream 1536 (profile override; the engine environment line of up-foreground.txt proves the keys differ) against A = the profile as shipped. TTFT per request, A minus A0: all 30 requests -143.7 ms (-11.2 %, CI -318.8..+31.4; pair 1 is +100 ms, the first boot of the job, the other four pairs -204.5 ms, CI -272..-137); uncached tail 64-1023 (8 requests) -269.5 ms (-31.9 %, CI -293.4..-245.6, 5 of 5 pairs); 1024-4095 (16 requests) -230.2 ms (-19.8 %, CI -294.1..-166.3, 5 of 5); >= 4096 (6 requests) +254.7 ms (CI -457..+967, pair 1 +1,240 ms, the rest -217..+183: not resolved); decode -0.40 % (CI -3.49..+1.98): no regression. The sum of the section deltas (ladder -104, Q7 -96, stream 1536 -45, park -3 = -248 ms per request) is confirmed in direction and in class; realised -144 ms (five pairs) to -205 ms (four pairs). The first run of this group (prefill-host-complete-default-set-group-ab-5-pairs) compared the profile with itself (the built-in profile overrides the shell env of the engine since pkg-s14): an A/A, noise floor TTFT +4.0 ms (CI -27.5..+35.5), decode +0.19 % (CI -0.80..+1.52 tok/s). Status: fixed (group e2e confirmed). |
| B3 | prefill: prefix-cache parking in the request path (code prefix.export_kv 19.0 + export_index 2.3 + park_tail 14.7 + park_block 6.5 + after_prefill 9.4 + after_chunk 0.7 + after_decode 12.5, mean per request) |
65.1 ms | vanilla parks the conversation (checkpoints) inside its own prompt time, not separable | n/a until the instrumented vanilla | PROFILE runs/dc1 |
hex-finish | fixing (code a88a77b25, switches LELEKA_PREFIX_PARK_FAST=1 and LELEKA_PREFIX_PARK_ASYNC=1, both off by default, identity and section delta pending). Reading of the code: the seven listed spans are nested, not additive (export_kv and export_index sit inside park_block and park_tail, which sit inside after_prefill, after_chunk and after_decode), so the request-path total is after_prefill + after_chunk + after_decode = 22.6 ms, not 65.1 ms. FAST: one context drain per park instead of 12, K/V pages copied into unzeroed vectors, index rows take the device-read staging as the result (same bytes; compare prefix.export_kv and prefix.export_index, new prefix.export_drain; the sub-spans export.copy_fast and export.index_copy_fast replace export.sync, export.alloc, export.copy, export.index_alloc, export.index_copy). ASYNC (with --prefix-cache-tail reply): the after_decode part (12.5 ms) is taken after the terminal event of the request, before the prefix summary and before the next request, and reported on the line DBG profile park_deferred (sum the request and park_deferred lines for an equal-work comparison); the tail node is in the store before the next request exactly as before. Not deferred: after_prefill and after_chunk (the last page also holds cells the decode overwrites and the recurrent state the decode advances, so a later park gives other bytes). Not done: pooled buffers (the store retains the vectors) and threaded copies of the 12 layers. GPU run 2026-11-09 (prefill-prefix-park-identity-and-profile): FAST kept the prefix reuse and cut the three after_* sections by 2.0 ms (23.5 to 21.5; the first-touch page faults of fresh host memory dominate and stay); ASYNC was refused by the runner (the busy mark active was still set while the owner ran the deferred step, so the next request got runtime_capacity). Fixed in the next commit: the busy mark is released before the deferred step, so a request that arrives meanwhile is admitted and waits in the control queue (test a_request_arriving_during_the_deferred_tail_is_admitted_and_queued_not_refused); pass criterion for the rerun: cached_tokens equal to shipped for all 30 and no engine refused in requests.log. Pre-faulted buffer pool not built: the store keeps every parked vector, so a pool is the store budget held pre-touched (tens of GiB, or sizes that do not match the variable tail) and needs a store free list or a slab type; allocator tuning (MALLOC_TOP_PAD_, MALLOC_TRIM_THRESHOLD_) can be tried without code BITWISE IDENTITY PASS (job host-draft-switches-teacher-forced-identity, test binary rt-pf9, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). FAST: identity PASS and section -2.0 ms per request: ON by default in the three 5090 profiles (LELEKA_PREFIX_PARK_FAST=1); ASYNC is not in the default (admission fix queued for the rerun prefill-prefix-park-async-fix-identity-and-profile) ASYNC rerun 2026-11-10 (job prefill-prefix-park-async-fix-identity-and-profile, after fix 955a72e37): no engine_refused/runtime_capacity in any of the 8 boots; cached_tokens equal to the shipped arm for 30 of 30 requests in every arm (1,202,318 total); prefix.after_response 8.7 ms median on the park_deferred line, the work leaves the request path (prefix.export_kv 17.0 to 7.6 ms median, park_tail 13.7-15.2 to 6.3 ms) but prefix.after_prefill is 9.6/9.9 ms vs 10.5/11.1 (shipped) and 9.4 (FAST): the request path gains nothing measurable beyond FAST. FAST CLOSED (bitwise identity + section delta, ON in 5090 profiles); ASYNC stays OFF (no delta beyond FAST, adds a deferred step). SECTION DELTA 2026-11-10 (same job): prefix.after_prefill + prefix.after_decode per request AP 13.30 + 10.01 = 23.3 ms, YP 13.01 + 7.21 = 20.2 ms (-3.1 ms, -13 %; earlier job: -2.0 ms); prefix.park_tail 16.8 to 15.3 ms, prefix.export_drain 3 context drains per park instead of 12 (counter 0.00/3), prefix.export_index 3.50 to 2.89 ms; prefix.export_kv 22.6 to 25.3 ms (the copies themselves are the same bytes). FAST FIXED: section delta -2..-3 ms per request + bitwise identity; ON in the 5090 profiles. ASYNC stays OFF. 2026-11-12 GROUP e2e A/B of the stage (owner method, one A/B at the end; prefill-host-stage-start-vs-complete-default-set-group-ab-5-pairs, pkg-s18, 30 requests, n=5 pairs, order A0 A A A0 A0 A A A0 A0 A): A0 = the built-in profile WITHOUT loan tiers, check merge, park fast, graph reuse and stream 1536 (profile override; the engine environment line of up-foreground.txt proves the keys differ) against A = the profile as shipped. TTFT per request, A minus A0: all 30 requests -143.7 ms (-11.2 %, CI -318.8..+31.4; pair 1 is +100 ms, the first boot of the job, the other four pairs -204.5 ms, CI -272..-137); uncached tail 64-1023 (8 requests) -269.5 ms (-31.9 %, CI -293.4..-245.6, 5 of 5 pairs); 1024-4095 (16 requests) -230.2 ms (-19.8 %, CI -294.1..-166.3, 5 of 5); >= 4096 (6 requests) +254.7 ms (CI -457..+967, pair 1 +1,240 ms, the rest -217..+183: not resolved); decode -0.40 % (CI -3.49..+1.98): no regression. The sum of the section deltas (ladder -104, Q7 -96, stream 1536 -45, park -3 = -248 ms per request) is confirmed in direction and in class; realised -144 ms (five pairs) to -205 ms (four pairs). The first run of this group (prefill-host-complete-default-set-group-ab-5-pairs) compared the profile with itself (the built-in profile overrides the shell env of the engine since pkg-s14): an A/A, noise floor TTFT +4.0 ms (CI -27.5..+35.5), decode +0.19 % (CI -0.80..+1.52 tok/s). Status: fixed (group e2e confirmed). |
| B4 | decode hand-over: tear-down of the request (code decode.disassemble) |
11.7 ms per request | none | +11.7 ms | PROFILE runs/dc1 |
hex-finish | open |
| B5 | host: admission of CPU work (code cpu.admit, 819 calls per request) |
43.2 ms per request | not measured | n/a | PROFILE runs/dc1 |
hex-finish | open |
C. Decode round: summary, then draft, verify graph, accept, commit, publication, next round
Round-level totals first (they are the sum of the steps below).
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| R1 | round wall (graph start to start) | 17.864 | 15.886 | +1.978 | CUPTI | device | open |
| R4 | GPU idle over the round | 2.574 | 3.103 | -0.529 (busy 85.6 % against 80.5 %) | CUPTI | device | proved-equal (LEL ahead) |
| Q9 | round count: tokens per round | 3.59-3.66 | 2.95 | +0.64..+0.71 tokens per round (+22 %): our adaptive window pays +3.1 ms for +0.65 tokens | LOG | device | proved-equal (net +2.8 % decode, kept) |
C1. Draft (chain from the previous commit to the verify window's tokens)
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| O9 | draft: chain steps and the host idle between them (code LELEKA_DRAFT_CHAIN_PIPELINE) |
0.272 ms per round (2.38 boundaries x 114 us) | idle inside the draft 0.52 ms on 4.5 streams (draft span at equal steps: 1.83 against 1.85) | +0.27 | ORCH | hex-finish | fixing: S1 LELEKA_DRAFT_CHAIN_PIPELINE (code 1ab37e408, opt-in; all chain steps of a greedy draft with min_p 0 enqueued back to back, one drain, flags read once); package pkg-s1, identity and profile pair job host-draft-chain-one-pass-identity, paired A/B job host-draft-chain-one-pass-ab GPU (job host-draft-chain-gate-diagnosis, 8,377 drafts): mtp.chain_gate.min_p for ALL of them: the adaptive plan gives every round a positive min_p (the chain stops at the first step whose probability is below it), so the pipelined path (greedy, min_p 0) never engages in production; mtp.chain_step stays 0.480 ms x 2.66 steps per round. Pipelining a chain with an early stop would enqueue steps the sequential path never runs (each ~0.45 ms of GPU) against a gain of ~0.1 ms per boundary, so it is a loss without a device-side stop. S1 stays off, parked; the remaining 0.272 ms per round of host turnaround is open for cheaper per-step sync |
| O8 | draft: finite and q8 guard checks of the MTP ring (code mtp_original_finite 158.8 x 0.87 us, mtp_original_q8_guard 28 x 0.87 us per round, 186.8 launches) |
0.162 | none | +0.162 | CUPTI | hex-finish | fixing (code 306b39807, switch LELEKA_DRAFT_CHECK_MERGE, off by default; identity and section delta pending): S2' launches every run of ADJACENT checks of a draft step program as one mtp_original_check_batch (new sealed asset mtp_original_check_batch.ptx; each entry keeps its own buffer, count, kind and status word, so the status words are the separate launches' words). Per step 48 check launches, 3 runs (prefix guards after the GR block 5, tail after the MLP GR 5, tail after the shared gate and up 2): 12 launches become 3, 9 fewer per step, 36 per round at 4 steps (expect mtp_original_finite 158.8 to about 111 and mtp_original_q8_guard 28 unchanged per round (the merged runs hold finite checks only), plus about 12 mtp_original_check_batch launches, net 36 fewer; the upper bound of the gain is about 0.05 ms per round, no claim). Not done: moving a check across another command (deferral to the end of the chain): the checked buffers qcur, r, xn, lo are overwritten in place between their checks and the program has no write-set table, so it needs one first. Proofs: cuda-model draft_check_batch (the merged schedule expands to the separate one, and a NaN/Inf at the edges and middle of every buffer after every kernel leaves identical status words in a simulated step), driver tests on the real command lists, GPU test check_batch_program_gpu (--ignored, job draft-check-merge-gpu-proof) GPU: detection test PASS (73 cases: NaN/+Inf/-Inf in every buffer and Q8 scale, 72 raise a flag, 0 differ from the separate launches); step graph 114 -> 105 nodes (-9 per step, DBG mtp chain-step graph, job host-draft-chain-gate-diagnosis MCP against AP); section: draft.finish 1.392 -> 1.300 ms per round (single boot each, not paired: 6390 and 5744 rounds); bitwise identity under teacher forcing queued (host-draft-switches-teacher-forced-identity, P2). The free-running replay cannot decide identity: draft traces of DT, MT and XT diverge at the 12th draft and shipped against shipped differs across boots BITWISE IDENTITY PASS (job host-draft-switches-teacher-forced-identity, test binary rt-pf9, night5-long-256k, teacher forced, 5 requests to 243k, 240 forced tokens each): top-16 logprob rows 2057 of 2057 identical in both arms, draft trace 1036 of 1036 lines identical, A/A floor identical (q_tail_gate PASS, d_top1 0.0000, flips 0). Check merge: identity PASS, step graph 114 to 105 nodes: ON by default in the three 5090 profiles (LELEKA_DRAFT_CHECK_MERGE=1); the paired section delta stays to be read from the group A/B (host-draft-switches-group-ab) GROUP A/B 2026-11-10: see Q7 row (X arm includes check merge): no regression, ms/token paired -0.03 +-0.08. Identity bitwise PASS (teacher-forced, 1036/1036 draft lines); ON in the three 5090 profiles. The paired draft.finish delta was not profiled in that group job (no profile arm): a profiled arm X vs A is the remaining step for the section number. SECTION DELTA 2026-11-10 (same job, per call over 8,697 / 9,518 / 7,771 draft rounds): draft.finish AP 1.548 ms, MCP (check merge only) 1.494 ms (-0.054 ms, -3.5 %), YP (the complete set) 1.577 ms (+0.029 ms, +1.9 %); gpu.mtp_chain_step 0.458 / 0.452 / 0.453 ms per step and mtp.chain_step 0.488 / 0.480 / 0.481 equal in all three. One boot per arm cannot resolve a 2-4 % difference (boot-to-boot spread of this profile is about 3 %), and YP does not reproduce MCP's gain: the section delta is at most -0.054 ms per round (about -30 ms per request at 580 rounds), not resolved. CLOSED on bitwise identity (1036/1036 draft lines) and the graph-node count (114 to 105); no regression found; ON in the 5090 profiles. A resolved per-round number would need 3 or more boots per arm (not scheduled: owner rule 2026-11-10). 2026-11-12 GROUP e2e A/B of the stage (owner method, one A/B at the end; prefill-host-stage-start-vs-complete-default-set-group-ab-5-pairs, pkg-s18, 30 requests, n=5 pairs, order A0 A A A0 A0 A A A0 A0 A): A0 = the built-in profile WITHOUT loan tiers, check merge, park fast, graph reuse and stream 1536 (profile override; the engine environment line of up-foreground.txt proves the keys differ) against A = the profile as shipped. TTFT per request, A minus A0: all 30 requests -143.7 ms (-11.2 %, CI -318.8..+31.4; pair 1 is +100 ms, the first boot of the job, the other four pairs -204.5 ms, CI -272..-137); uncached tail 64-1023 (8 requests) -269.5 ms (-31.9 %, CI -293.4..-245.6, 5 of 5 pairs); 1024-4095 (16 requests) -230.2 ms (-19.8 %, CI -294.1..-166.3, 5 of 5); >= 4096 (6 requests) +254.7 ms (CI -457..+967, pair 1 +1,240 ms, the rest -217..+183: not resolved); decode -0.40 % (CI -3.49..+1.98): no regression. The sum of the section deltas (ladder -104, Q7 -96, stream 1536 -45, park -3 = -248 ms per request) is confirmed in direction and in class; realised -144 ms (five pairs) to -205 ms (four pairs). The first run of this group (prefill-host-complete-default-set-group-ab-5-pairs) compared the profile with itself (the built-in profile overrides the shell env of the engine since pkg-s14): an A/A, noise floor TTFT +4.0 ms (CI -27.5..+35.5), decode +0.19 % (CI -0.80..+1.52 tok/s). Status: fixed (group e2e confirmed). |
| K13 | draft chain role total (chain GR kernels, mtp_*) |
3.544 | 2.471 | +1.073 (includes the draft head and checks of R3 and O8; VANL books its draft in the shared GR kernels) | CUPTI role table | hex-finish | open (O8 LELEKA_DRAFT_CHECK_MERGE takes the adjacent checks out of this total once its section delta is measured) |
| O12 | draft: finish follows the window width (0.93 ms at T 3.0, 2.5 ms at T 6.2) | window price | part of the +3.1 ms for +0.65 tokens per round | PROFILE | hex-finish | open | |
| O2 | kernels outside big graphs | 630 | 147 | +483 | CUPTI | hex-finish | open |
| O3 | graph executions per round | 5.38 | 4.47 | +0.91 | CUPTI | hex-finish | open |
C2. Verify graph: embed, 48 layers (mixer half, FFN half), final write and head
Rule from the stage A/B decode-stage-group-ab-profile-set-pb-vs-pn (2026-11-11, n=5): a device section delta does not carry into the round while the critical path is the arrival of the CPU/PCIe rows (host/tier, V2 +0.94 ms). PB (before the stage) against PN (+ QSA prelude, fused commit, COMBINE_VEC4; about -0.45 ms/round by CUPTI sections): decode tok/s +0.30 % (CI -0.95..+1.55), end-to-end -0.85 % (CI -2.45..+0.76), ms/round +0.09 % (CI -4.08..+4.26), VRAM hit -0.29 points (same 12,192 slots); nothing is resolved and the upper decode bound (+1.55 %) does not confirm the expected +2.3 %. Do not extend new device-only steps without evidence that they are on the critical path of the round (layers without a CPU/PCIe wait, or a graph that is the bottleneck); the open levers are in host/tier (V2/V5/V7, H1-H7, pcie share). Orchestrator decision 2026-11-11.
A/A check of the group A/Bs (2026-11-11, orchestrator request after hex-finish found that the built-in profile engine_env overrides the shell env since pkg-s14). decode-stage-group-ab-profile-set-pb-vs-pn is VALID, not A/A: every one of the 10 engine logs carries the requested switches (PB.1-5 fused_qsa_prelude=false, combine_vec4=false; PN.1-5 both true), because all my bin-* directories (sq, ffn-switches, pcie-auto, tail, s11-s9-u5a) hold the same older leleka (sha256 4cf47d97...) whose embedded profile has no switch keys beyond ATTN_DAILY_MTP; the PB/PN result (about 0, ms/round +0.09 %, CI +-4.2) stands. The pending group A/Bs (PG vs PS/PW, PG vs PA, PB vs PG) use the same binaries and are not affected. A release package from 02c784249 on (profile carries S11/D1/D2/prelude/fused commit) IS affected: arms of such a run need a profile per arm. Guard in spd_ab_job.sh (job copy tools/spd_ab_job_x.sh, helper tools/spd_arm_guard.py, from this commit): after the engine is ready, effective-switches.txt and aa-guard.txt are written per arm and an arm is refused ("NOT VALID (A/A guard)") when the requested Sm120Switches line or the engine environment line of leleka up differs from what the arm exports (an exported switch not on, a switch on that the arm does not export, a profile key different from the export); SPD_ARM_PROFILE=1 builds the arm profile (leleka profiles show minus the guarded keys plus the arm exports, up --profile), as hex-finish pf_ab_job.sh does. Every A/B record names the arm lines of effective-switches.txt.
PcieAuto closed as a design failure (2026-11-11, from the hex-finish probes host-pcie-share-and-mode-probes-profile, pkg-s18, 30 profiled replay requests, 2 repeats per arm, T about 4.2, tokens/round unchanged, A/A spread 0.9 %). Fixed PCIe share against the 0.45 base: 0.55 = decode +5.6 % (ms/round -7.6 %), 0.35 = -4.2 % (+4.6 %); --pcie-mode kernel 0 % (activation not confirmed in the log). The VRAM hit share does not move with the PCIe share. Our PCIe leg (DMA batch + flag B) is cheaper than vanilla's, so the balance sits above 0.55 and the vanilla PcieAuto (balance of link and pool rate, steps of 0.05, bounds 0.10..0.60, drift 0.55 -> 0.40 -> 0.35 by T) walks the wrong way: it would end at 0.35-0.40, the measured loss. The queued A/B decode-pcie-auto-group-ab-pg-vs-pa was removed from the GPU queue (backups in garbage/); LELEKA_ORIGINAL_SERVE_PCIE_AUTO stays OFF and is not to be enabled. The lever is a higher fixed (or T-dependent) share: hex-finish probes 0.65 and 0.75 (host-pcie-share-higher-probes-profile); a new default is placement-class and needs the q_tail_gate quality gate against a control placement first.
Incident of the A/A guard (2026-11-11 22:00 to 2026-11-12 00:00; cost about 2.5 h of GPU; no data lost from valid runs). The guard added the day before refused every arm of decode-stage-group-ab-profile-set-pb-vs-pg, decode-slots-and-adapt-every-group-ab-pg-vs-ps-pw and verify-tail-head-chain-cupti-windows ("no requested Sm120Switches line"): it looked for the switch line in the engine log at "ready", but the line is written with the first request. It was tested on finished logs only, never on a live arm. Fix (6b613b1a8): at ready only the "engine environment" line of leleka up is checked (can refuse an arm), the full switch comparison runs after the arm ran and only marks it (aa-guard.txt, "INVALID" in the job log). Rules from this: (1) a new gate in a runner is tested on one live short arm before it can refuse anything, and until then it only marks; (2) every rerun and group A/B carries an A/A control: twin arms PH (= PG) and QQ (= QP) run under the same conditions; the first slots/adapt rerun started before the twin existed, so its A/A control is decode-slots-aa-control-pg-vs-ph (PG against PH, n=3). The live check of the fixed guard is the first arm of decode-slots-and-adapt-every-group-ab-pg-vs-ps-pw-rerun (its PG.1/aa-guard-env.txt and aa-guard.txt must say "ok").
Verdict of decode-slots-and-adapt-every-group-ab-pg-vs-ps-pw-rerun (2026-11-12, 5 paired blocks, 27 requests each after warm-up, A/A guard ok on all 15 arms: PG 11, PW 12, PS 13 guarded keys; PG 12,192 slots, PW 12,192, PS 12,432). PS (alias + reserve 130, +240 slots) against PG: decode tok/s 187.67 -> 190.46 (+1.48 %, CI +0.41..+2.56), end-to-end 168.58 -> 172.69 (+2.44 %, CI +0.73..+4.15), ms/round 19.75 -> 18.61 (-5.77 %, CI -10.94..-0.60), tokens/round 3.71 -> 3.54 (-4.40 %, CI -9.75..+0.95), VRAM hit share +0.62 % (CI +0.09..+1.14). PW (ADAPT_EVERY=2, same slots) against PG: decode +1.43 % (CI +0.53..+2.33), end-to-end +1.81 % (CI -0.54..+4.16), ms/round -5.06 % (CI -7.93..-2.20), tokens/round -3.71 % (CI -6.94..-0.47), VRAM share +1.13 % (CI +0.53..+1.73). Both are placement-class, so outputs are not bitwise (byte-identical requests: PS 13/150, PW 10/150; the adaptive tier is not reproducible even run to run); the lower tokens/round with a faster round is the same pattern as in ab-l3v2 and must be read through the quality gate. No default changed. Limits: (1) the A/A control for this group is decode-slots-aa-control-pg-vs-ph (queued; the CI half-widths of 4-11 % in ms/round are wide, so the PG-vs-PH spread decides how much of the delta is real); (2) PS fails the 256k floor (212 MiB, see H4), so the +1.5 % decode of PS is not usable as it is; the slots part is bounded by the VRAM floor, not by the speed. Recommendation: do not enable PS; PW (adapt every 2) is a candidate that needs a quality gate against a control placement (q_tail_gate) and a 256k session with the same decode reserve before a default; the gain of both is of the order of the A/A noise until the control is read.
Structure first, then the layer steps in graph order: embed (R7), mixer half (V3 and the kernels in it), FFN half (V2/V4 and the kernels in it), tail (R8).
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| V1 | streams in the verify graph | 1 | 11 | wall time with two or more streams active: 0 against 2.03 ms | CUPTI | device | fixing |
| R2 | verify graph GPU span | 13.561 | 11.743 | +1.818 | CUPTI | device | open |
| V9 | verify graph kernel time sum | 13.349 | 13.728 | -0.379 (VANL runs kernels concurrently: its span is shorter than its sum) | CUPTI | device | proved-equal (LEL ahead) |
| V8 | launches per verify graph | 2061 | 2098 | -37 | CUPTI | device | proved-equal (LEL ahead) |
| R5 | verify graph launch call (host) | 1.485 | 1.509 | -0.024 | CUPTI | device | proved-equal (LEL ahead) |
| R6 | idle inside the verify graph (2052 gaps against 1193 per round, mean 0.1 us) | 0.213 | 0.119 | +0.094 | CUPTI | device | proved-equal (2026-11-11 docs/experiments/verify-tail-and-gaps.md: the 2052/1193 are per verify graph; union gaps CL.2 2035 / 211.0 us, VANL 1194 / 119.3 us; with the side streams LEL has 1124 / 123.7 us (CP.1) and 1070 / 118.4 us (CY.1): residual +5.8 us a graph at LEL's T mix, closed by the side-stream switches) |
| R7 | first doorbell after graph start (embed, first layer mixer) | 0.132 | 0.117 | +0.015 | CUPTI | device | proved-equal (2026-11-11 docs/experiments/verify-tail-and-gaps.md: 21-23 kernels precede the first doorbell in both; LEL 95.6 / 105.6 / 112.5 / 121.9 / 137.4 / 149.5 us at T 1..6, VANL 93.3 / 98.6 / 114.7 / 125.8 / - / 135.3: mixed signs, no gap) |
| V3 | mixer phase (add_hits end to next doorbell) |
6.366 | 5.963 | +0.403 | CUPTI | device | fixing |
| verify: side branch of the GDN mixer (V3a) | GDN gates and gate projection on side streams (LELEKA_SM120_SIDE_MIXER=1, existing, off) |
mixer 5.913, round 17.508 (CM.1) |
mixer 5.963 | section delta mixer -0.453, round -0.356; mixer phase now equal to VANL | CUPTI | device | fixed (identity spd-sqid1 P2 PASS: 2057 top-16 rows bit-identical, 0 argmax flips, draft trace 518/518; A/B ab-sm n=10 decode +1.39 %, CI +0.46..+2.32 %; default ON in the 5090 profiles; closed 2026-11-09 by section delta + identity (owner method); set A/B verify-side-branches-ab-mixer-only-vs-all-branches (M mixer only against U all three side parts, n=10 pairs, 27 requests a block, 2026-11-10): decode tok/s 179.11 -> 182.90, +2.11 %, CI +1.18..+3.04 % (ms/token 5.583 -> 5.467); end-to-end 162.29 -> 164.70, +1.49 %, CI +0.17..+2.80 %; ms/round 20.06 -> 19.90, -0.80 %, CI -3.80..+2.21 % (not significant); tokens/round 3.59 -> 3.64, CI -2.01..+4.60 %; no regression; out_sha equal in 15 of 300 live requests, which is replay placement noise, the identity gate is the teacher-forced spd-sqid1) |
| verify: side branches of the QSA indexer and query chains (V3b) | QSA indexer chain and query chain on side streams (LELEKA_SM120_SIDE_QSA, code 0c30105d4, off) |
in line | 0.509 ms of overlap with the main stream (main+qsa) | section delta (CN.1 against CL.1, same replay window r29): mixer phase of a QSA layer 184.5 -> 169.7 us p50 (-14.8 us x 12 = -0.18 ms/round); CT.1 (all three) 169.2 us. FFN phase rose in CN.1 on GDN layers too (109 -> 131 us), which the branch does not touch, so the whole-graph time of that window (14.62 against 13.56 ms mean) is window drift, not the branch; the A/B decides |
CUPTI (VANL) | device | fixed (A/B ab-sqn L against N, n=10: decode tok/s +0.35 %, CI -0.23..+0.93 % (not significant, no regression); ms/token 5.635 -> 5.616; ms/round +0.11, CI -2.99..+4.11 %; end-to-end +0.87 %, CI -0.16..+1.90 %; default ON in the 5090 profiles; closed 2026-11-09 by section delta + identity (owner method); set A/B verify-side-branches-ab-mixer-only-vs-all-branches (M mixer only against U all three side parts, n=10 pairs, 27 requests a block, 2026-11-10): decode tok/s 179.11 -> 182.90, +2.11 %, CI +1.18..+3.04 % (ms/token 5.583 -> 5.467); end-to-end 162.29 -> 164.70, +1.49 %, CI +0.17..+2.80 %; ms/round 20.06 -> 19.90, -0.80 %, CI -3.80..+2.21 % (not significant); tokens/round 3.59 -> 3.64, CI -2.01..+4.60 %; no regression; out_sha equal in 15 of 300 live requests, which is replay placement noise, the identity gate is the teacher-forced spd-sqid1) |
| K6 | attention role in total (norm/RoPE, appends, scores, top-k, resolve, chunk, merge, gate) | 1.357 | 1.125 | +0.232 | CUPTI role table | device | fixed (switch LELEKA_SM120_FUSED_QSA_PRELUDE, ON in the three 5090 profiles since 2026-11-10; verify-new-switches-identity: top-16 rows 2057/2057 identical, draft trace 1036/1036 identical, argmax flips 0, A/A identical (P2, P3, P8). Section verify-new-switches-cupti-windows (2026-11-10, windows of request 29, 15 s, new binary bin-verify-switches, per-T within one variant: T 2..6 have 77-376 graphs; the control CL.2 and each variant ran in separate sessions, so the expert-tier (FFN) phase differs between them and is NOT compared): QSA prelude launches per graph at T 3..6 204/216/228/240 -> 192 (the per-row verify_qsa_append_analytic goes, leleka_verify_qsa_kv_rows + leleka_verify_qsa_index_rows 12 each come); QSA kernel time per graph +23 / +21 / +11 / +3 / -18 us at T 2..6 (CQ.1 against CL.2), mixer phase per layer -0.6 / -1.1 / -1.6 / -2.2 / -2.8 us = -0.03 / -0.05 / -0.08 / -0.10 / -0.13 ms per graph (x47). set A/B verify-qsa-prelude-set-ab-profile-vs-profile-plus-prelude (PB profile set against ZQ = PB + prelude, n=10 pairs, 27 requests a block, 2026-11-10): decode tok/s 183.52 -> 184.46, +0.51 %, CI -0.02..+1.05 % (ms/token 5.449 -> 5.421); end-to-end 166.32 -> 166.72, +0.24 %, CI -1.22..+1.69 %; ms/round 19.55 -> 19.53, -0.12 %, CI -3.62..+3.37 %; tokens/round 3.59 -> 3.60; no regression, the section gain (-0.056 ms) is below what n=10 resolves; closed 2026-11-10 by section delta + identity + set A/B (owner method)) |
| K1 | attention decode chunk (leleka_qsa_decode_chunk_daily 18.3 us, 12 per graph) against attn_chunk_kernel_pre75 (17.1 us) |
0.220 | 0.206 | +0.014 | CUPTI | device | fixed (no code of its own: chunk kernel at parity (+0.014 ms); in the CQ.1 and CY.1 windows leleka_qsa_decode_chunk_daily stays 17.9-18.3 us, 12 per graph, unchanged by the prelude; rides with K6; set A/B verify-qsa-prelude-set-ab-profile-vs-profile-plus-prelude (PB profile set against ZQ = PB + prelude, n=10 pairs, 27 requests a block, 2026-11-10): decode tok/s 183.52 -> 184.46, +0.51 %, CI -0.02..+1.05 % (ms/token 5.449 -> 5.421); end-to-end 166.32 -> 166.72, +0.24 %, CI -1.22..+1.69 %; ms/round 19.55 -> 19.53, -0.12 %, CI -3.62..+3.37 %; tokens/round 3.59 -> 3.60; no regression, the section gain (-0.056 ms) is below what n=10 resolves; closed 2026-11-10 by section delta + identity + set A/B (owner method)) |
| K2 | indexer block scores (leleka_qsa_decode_scores 14.2 us against block_scores_multi 17.1 us) |
0.170 | 0.205 | -0.035 | CUPTI | device | proved-equal (LEL ahead) |
| K3 | block top-k cluster (17.3 us against 18.0 us) | 0.208 | 0.216 | -0.008 | CUPTI | device | proved-equal (LEL ahead) |
| K4 | KV miss copy / copy kernel (11.1 us against 11.6 us) | 0.133 | 0.139 | -0.006 | CUPTI | device | proved-equal (LEL ahead) |
| K5 | KV resolve (7.8 us against 8.4 us) | 0.094 | 0.100 | -0.006 | CUPTI | device | proved-equal (LEL ahead) |
| K7 | GDN role in total (step, conv, ab, commit) | 0.914 | 0.759 | +0.155 | CUPTI role table | device | open (switch LELEKA_SM120_FUSED_GDN built, identity PASS (P4, P5, P8: verify-new-switches-identity: top-16 rows 2057/2057 identical, draft trace 1036/1036 identical, argmax flips 0, A/A identical), OFF in the profiles. Section verify-new-switches-cupti-windows (2026-11-10, windows of request 29, 15 s, new binary bin-verify-switches, per-T within one variant: T 2..6 have 77-376 graphs; the control CL.2 and each variant ran in separate sessions, so the expert-tier (FFN) phase differs between them and is NOT compared): without side streams (CG.1 against CL.2) GDN kernel time per graph -78 / -74 / -82 / -70 / -60 us at T 2..6, launches 108 -> 36, mixer phase -1.6 / -1.3 / -1.6 / -1.3 / -0.8 us per layer (-0.04..-0.075 ms per graph). With the profile's SIDE_MIXER (CY.1) the a/b projection stays a separate chain_gdn_ab_multi_kernel on the side stream (10.1 us x 36) and the fused kernel is step+norm+conv only: 7.18 us against verify_gdn_step_norm_multi_kernel 5.66 + verify_gdn_conv_l2_multi_kernel 1.34 = 7.00 us, so no gain on the profile's critical path. The remaining +0.155 ms of the GDN role is the step kernel itself: next step is the step kernel's own time, not launch count) |
| K7a | GDN step/norm in the verify graph (verify_gdn_step_norm_multi 6.1 us against gdn_step_norm_multi 6.2 us, but 36 against 30.9 launches) |
0.220 | 0.191 | +0.029 | CUPTI | device | open (as K7: the step/norm kernel stays 7.18 us fused against 7.00 us separate under SIDE_MIXER, so the gap to gdn_step_norm_multi 6.1 us is in the kernel body) |
| K7b | GDN alpha/beta (chain_gdn_ab_multi 36 x 8.5 us against gdn_ab_multi 22.9 x 10.5 us plus the rest) |
0.307 | 0.344 | -0.037 | CUPTI | device | proved-equal (LEL ahead) |
| K12 | dense projections, lm head, MMVQ/MMVF role (head_n*, bf16_f32_mmvf_multi) |
3.892 | 4.589 | -0.697 | CUPTI | device | proved-equal (LEL ahead) |
| S1 | ATTN_DAILY (decode attention) |
on since lever 1 | on | paired decode +1.85 % with S2 (CI excludes zero), identity PASS (teacher-forced, 2057 of 2057 rows); no section delta of its own | gap doc lever 1 | device | fixing (needs a CUPTI section delta) |
| verify: side-stream mixer switch (SIDE_MIXER=2) (S3) | SIDE_MIXER=2 |
GDN part off by default, QSA part not ported before 0c30105d4 |
on | V3a, V3b | CUPTI | device | fixed (closed by V3a/V3b/V4a) |
| S8 | MMVQ_IL (2-4 and 5-8 columns) |
not ported | on | estimate 0.10-0.40; CUPTI role K12 shows our dense projections faster by 0.70 in total | upstream plan | device | open |
| verify: batched K/V and indexer append (S10) | batched K/V append and indexer append | per row (verify_qsa_append_analytic 138 x 1.04 us, mtp_original_append 49 x 1.6 us) |
batched (append 12 x 3.0 us, kv_append_q8 14.6 x 2.2 us) |
estimate 0.05-0.10 | upstream plan, CUPTI | device | fixed (as K6: batched K/V and indexer append inside the QSA prelude fusion, CQ.1 shows verify_qsa_append_analytic 36 x 1.05 us (0.038 ms) replaced by kv_rows 12 x 1.93 us + index_rows 12 x 2.47 us (0.053 ms): fewer launches, more kernel time, net in the mixer phase as K6; set A/B verify-qsa-prelude-set-ab-profile-vs-profile-plus-prelude (PB profile set against ZQ = PB + prelude, n=10 pairs, 27 requests a block, 2026-11-10): decode tok/s 183.52 -> 184.46, +0.51 %, CI -0.02..+1.05 % (ms/token 5.449 -> 5.421); end-to-end 166.32 -> 166.72, +0.24 %, CI -1.22..+1.69 %; ms/round 19.55 -> 19.53, -0.12 %, CI -3.62..+3.37 %; tokens/round 3.59 -> 3.60; no regression, the section gain (-0.056 ms) is below what n=10 resolves; closed 2026-11-10 by section delta + identity + set A/B (owner method)) |
| V2 | FFN phase (doorbell to add_hits end) |
6.600 | 5.293 | +1.307 | CUPTI | device | open (analysis 2026-11-11, docs/experiments/ffn-phase-loss-design.md, windows CY.1 against VANL, per T and per layer class: with SIDE_SHARED the device chain of the layers without a wait is at parity, -0.010 ms at CY.1's own T mix; the rest, +0.94 ms of +0.95, is the arrival of the CPU rows and PCIe copies after the doorbell (+0.76 / +0.99 / +2.03 ms at T 2 / 3 / 4), which belongs to V5/V7 (host/tier, hex-finish); small device options D1-D3 below, 0.20-0.23 ms upper range) |
| verify: doorbell to first routed expert (V4) | doorbell to first routed expert (gate/up) start, us | 27.6 | 15.0 | +12.6 us x 48 = +0.60 ms; with SIDE_SHARED (CE.1) 10.9 us, i.e. below VANL (CT.1 11.5 us) |
CUPTI | device | fixed (closed by V3a/V3b/V4a) |
| verify: shared expert on a side stream (V4a) | shared expert on a side stream, forked after the doorbell, joined before the combine (LELEKA_SM120_SIDE_SHARED, code 255159a89, off) |
27.6 us before the first expert | 15.0 us | section delta (CE.1 against CL.1): doorbell to first expert 27.6 -> 10.9 us (VANL 15.0), FFN phase 6.600 -> 6.267 ms (-0.333; qsa layers 99.8 -> 87.6, gdn 109.3 -> 102.7 us p50), graph p50 12.386 -> 11.944 ms (-0.44); identity spd-sqid1 P4 PASS: 2057 rows bit-identical, draft trace 518/518; A/B ab-sqe (L against E, n=10): decode tok/s +0.29 %, CI -0.43..+1.01 % (not significant); ms/round -0.61 (-2.97 %), CI -6.08..+0.15 %; tokens/round 3.64 -> 3.54 (live replay placement noise, numerics are identical); stays OFF; the CUPTI section gain (-0.33 ms) is of the size the replay cannot resolve at n=10, so 10 more pairs (spd-sqe2) and the set A/B M against all side parts (verify-side-branches-ab-mixer-only-vs-all-branches) are queued |
CUPTI | device | fixed (closed 2026-11-09 by section delta + identity (owner method); set A/B verify-side-branches-ab-mixer-only-vs-all-branches (M mixer only against U all three side parts, n=10 pairs, 27 requests a block, 2026-11-10): decode tok/s 179.11 -> 182.90, +2.11 %, CI +1.18..+3.04 % (ms/token 5.583 -> 5.467); end-to-end 162.29 -> 164.70, +1.49 %, CI +0.17..+2.80 %; ms/round 20.06 -> 19.90, -0.80 %, CI -3.80..+2.21 % (not significant); tokens/round 3.59 -> 3.64, CI -2.01..+4.60 %; no regression; out_sha equal in 15 of 300 live requests, which is replay placement noise, the identity gate is the teacher-forced spd-sqid1) |
| V4b | routed experts on their own branch (VANL: plan wait, VRAM experts, fetch_blobs, CPU wait, add_hits on a side stream; main stream does the shared expert and the next norm) |
all on the capture stream | branch | none left: SIDE_SHARED is the same stream structure (fork after the doorbell, join before the combine); the windows CT.1/CY.1 show the VANL pattern and no serial time before the routed chain |
CUPTI | device | fixed (closed 2026-11-11 by V4a, docs/experiments/ffn-phase-loss-design.md section 4.0) |
| V4c | norms and hyper-connection reads (gr_norm_split, gr_down, gr_up) as separate branches |
main stream | main stream (VANL does not branch them; a layer's gr_* chain stays on the main stream) |
no structural difference; kernels in K8..K10 | CUPTI | device | proved-equal |
| V5 | flag waits on the CPU leg (verify_wait_flag_ge 96 x 26.9 us + chain_wait_copy_i32 48 x 5.4 us against wait_flag_ge 144 x 8.1 us) |
2.836 | 1.160 | +1.676 | CUPTI | device | open (analysis 2026-11-10, no code and no switch: the wait kernels have no overhead part to remove; script scripts/e2e/codex/speed/cupti_flag_waits.py, windows verify-new-switches-cupti-windows/CL.2 (LEL) and cupti/VANL, request 29. Per graph from the window: LEL A 0.215 + B 0.718 + M 1.816 = 2.748 ms (the cell 2.836 is the earlier graph set), VANL 0.266 + 0.099 + 0.791 = 1.156 ms. What is waited on: A = flag A, the plan the host publishes after the doorbell; B = flag B, the PCIe copies landed (DMA mode: raised behind the copy batch, the wait ends 3.3 us (p50 3.0) after the last copy ends); M = flag M, the CPU rows in mapped memory. Three waits a layer in both (144 nodes) and the same poll loop (while (*flag < v) __nanosleep(100); __threadfence_system() in original_verify.cu, chain_window.cu, upstream dp4a.hpp). Overhead part: a wait whose flag is already set when it starts lasts 1.3-1.4 us for B and M in both sessions (VANL B median 2.2) and 2.2 us for A with the plan copy fused (VANL: wait 1.7 + separate copy 3.2-3.7), i.e. 48 x (2.2 + 1.3 + 1.4) = 0.24 ms a graph against about 0.25 ms in VANL; the poll latency after the flag is set is at most the same 1.4 us on about 35 blocked waits a graph, <= 0.05 ms, also in VANL. The rest is real waiting. By wait, LEL minus VANL: A -0.051, B +0.619, M +1.025 ms. B: 13.9 % of LEL layers have a DMA PCIe leg (3.9 MB p50, B wait 99 us mean there); in VANL 21.3 % of layers have a fetch_blobs above 2 us and pay the PCIe time as kernel time on the GPU stream (V6, -1.621), so V5 and V6 move the same time between wait and kernel (V7). M: the wait does not start early (M start after the doorbell, layers without a PCIe leg: LEL 70.7 us, VANL 60.1 us); the CPU rows arrive later: layers with CPU work (M wait > 4 us) 37.1 % against 24.3 %, M end after the doorbell 133.5 against 98.9 us mean (p50 111.6 against 92.8); at equal T the same (T=4: 45.5 % / 142.1 us against 24.4 % / 109.2 us; T=3: 36.5 % / 125.2 against 24.8 % / 95.6). So the loss is the arrival time of the CPU leg, not the graph kernels; to look at on the host/tier side (hand-over to hex-finish): the PCIe/CPU split (LEL engine.log pcie_frac=0.45 fixed; VANL's PcieAuto in the same session went 0.55, 0.40, 0.35), tier state (request stats of the window's request: LEL VRAM 92.6 %, PCIe 2.2 %, CPU 5.2 %; VANL about 93.7 / 1.3 / 5.0 % from its strata serve lines, windows not matched), host pickup and plan latency (not visible: the trace has no timestamp of the flag word; upstream wait_flag_ge_stamped, verify_kernels.cu:1250, would give flag arrival against poll latency and needs a GPU run, not done)) 2026-11-11 per layer (profile counters `tier.lNN.vram |
| V6 | PCIe fetch and CPU-row hand-over (doorbell, mapped copies, fetch_blobs, add_hits, rebase_ptrs) |
0.488 | 2.109 | -1.621 | CUPTI | device | proved-equal (LEL ahead) |
| V7 | V5 + V6, the whole miss-leg handling | 3.324 | 3.269 | +0.055 (+0.17 by an earlier count of the same sets) | CUPTI | device | open (analysis 2026-11-10 with V5: V5 +1.676 and V6 -1.621 are the same PCIe time counted as wait in LEL (DMA, flag B) and as kernel time in VANL (fetch_blobs, rebase_ptrs, copy_rows_from_mapped), so the sum is flat and no graph kernel is left to change; what remains is the CPU leg arriving 25-35 us later after the doorbell in the layers that have CPU work (V5), a host/tier/split question; closes when that is A/B'd or the tier states of the two sessions are matched) 2026-11-11 per layer (profile counters `tier.lNN.vram |
| K11 | routed experts in the verify graph, role total (gate/up/SwiGLU, down) | 2.507 | 2.484 | +0.023 (entry mix differs; at equal entry counts LEL is faster: window_moe_down_20 13.6 us with 40 entries against 17.4 us, sm120_moe_gu_swiglu_22 12.3 us with 50 entries against 26 us with 40) |
CUPTI | device | open (2026-11-11 per layer pair, T 2-4: window_moe_down_* is 3.4-7.1 us slower than VANL in 48 of 48 layers, the gate/up kernel 3-4 us faster, and the empty PCIe pass launches at full grid every layer (about 5.5 us against about 0.7); the role total hides this in the entry mix; docs/experiments/ffn-phase-loss-design.md section 4.1 D1) |
| K15 | hit tally add_hits (48 x 1.2 us against 48 x 1.3 us) |
0.059 | 0.063 | -0.004 | CUPTI | device | proved-equal (LEL ahead) |
| S2 | GU_SWIGLU (routed expert gate/up + SwiGLU + q8_1) |
on since lever 1 | on | as S1 | gap doc lever 1 | device | fixing (needs a CUPTI section delta) |
| S7 | sub16 routed-expert kernels beyond GU_SWIGLU |
warp-per-row | sub16 | estimate 0.20-0.35; the CUPTI pair K11 does not show LEL slower, so this must be re-measured by kernel before any work | upstream plan | device | fixed (closed 2026-11-11 by section delta + identity; enabled in the three 5090 profiles; windows docs/experiments/ffn-d1-d2-d3-windows.md WD-CP: F-layer FFN phase -3.9 / -7.7 / -10.0 / -12.9 / -18.7 us at T 1..5 = -0.214 ms a graph at CP's T mix (se 0.008), VRAM-pass down 19.3 -> 14.1 us and PCIe-pass down 5.5 -> 0.64 us at T 3; probe 64 cases byte-identical; identity P2/P5 2057/2057 rows, draft trace identical) (was: built, off: LELEKA_SM120_DOWN_SUB16, branch claude/ffn-down-sub16 merged, sealed sm120_down_sub16; jobs verify-ffn-d1-d2-d3-bitwise-probes (sm120_probe down), -identity P2/P5, window WD/WZ queued 2026-11-11; look at window_moe_down_20/_42 -> sm120_moe_down_20/_42; estimate refined to 0.17-0.23 ms a graph; docs/experiments/ffn-phase-loss-design.md) |
| D2 | add_hits folded into the combine (LELEKA_SM120_HITS_IN_COMBINE, upstream combine_k10_vec4_hits) |
add_hits 48 x 1.2-1.3 us a graph |
folded | upper bound 0.06 ms a graph (T 2-4) | design ffn-phase-loss-design.md 4.1 |
device | fixed (closed 2026-11-11 by section delta + identity; enabled in the three 5090 profiles; windows docs/experiments/ffn-d1-d2-d3-windows.md WH-CP: add_hits gone, tail after the CPU rows -0.86..-0.93 us a layer = -0.043 ms a graph (about -0.025 with COMBINE_VEC4 on); probe failures=0, identity P3/P5 2057/2057 rows) (was: built, off: LELEKA_SM120_HITS_IN_COMBINE, branch claude/ffn-hits-combine merged, sealed sm120_combine_hits; jobs verify-ffn-d1-d2-d3-bitwise-probes, -identity P3/P5, -cupti-windows WH/WZ queued 2026-11-11; look at add_hits (-48 launches a graph) and the combine entry) |
| D3 | wait on flag M folded into the copy of the CPU rows (LELEKA_SM120_WAIT_M_ROWS) |
2 launches a layer | folded | 0.04-0.06 ms a graph; risk: upstream measured -1.5 % decode on Turing for the same fold | design ffn-phase-loss-design.md 4.1 |
device | open (measured LOSS, docs/experiments/ffn-d1-d2-d3-windows.md WW-CP: the fused kernel costs 5.8 / 10.2 / 14.4 / 18.8 / 23.2 us at T 1..5 against 2.7 us for wait M + copy (1.44 us + 0.433 us per block: every block polls the flag over PCIe), F-layer FFN phase +3.3 / +7.7 / +12.6 / +17.3 / +21.8 us per layer; OFF, probe and identity PASS; retry key: ONE polling block for the whole grid (the other blocks wait on a device-side release word the poller writes, or the copy is split into a one-block wait kernel + the existing copy graph node), so the PCIe flag is read by one warp, not by T x 10 blocks; the floor to beat is 2.7 us for wait M + copy) (was: built, off: LELEKA_SM120_WAIT_M_ROWS, branch claude/ffn-wait-m-rows merged, sealed sm120_wait_copy_rows; thread 0 of each block polls, fence, barrier, then the copy; jobs as D2, window WW/WZ; look at the second verify_wait_flag_ge + chain_copy_rows_from_mapped -> leleka_verify_wait_copy_rows, and watch for a longer copy kernel) |
| S11 | float4 combine | not ported | combine_k10_vec4 50.6 x 1.2 us |
estimate 0.05-0.10 (the code has no launch saving, one launch a layer both ways: expect 0.01-0.02) | upstream plan | device | fixed (switch LELEKA_SM120_COMBINE_VEC4 (off), sealed sm120_combine_vec4, branch claude/s11-s9-combine-headmix merged; jobs verify-s11-s9-u5a-bitwise-probes, -identity P2/P5, -cupti-windows CS/CZ queued; look at mtp_full_combine against leleka_verify_combine_k10_vec4 per launch). Identity 2026-11-10 (verify-s11-s9-u5a-identity P2): top-16 rows 2057/2057 bit-identical, draft trace 1036/1036, A/A identical: PASS. Window (cumulative variants, CS-CP, docs/experiments/verify-s11-s9-u5a-windows.md): combine 1.50 -> 1.15 us per launch, -0.0164 ms a graph weighted over T (noise <= 0.0004), resolved at every T. Enabled by default in the three 5090 profiles 2026-11-11 (closed by section delta + identity)) |
| K8 | hyper-connection down (chain_gr_down_t2w8_nb4 11.1 us against gr_down_staged 11.5 us) |
1.063 | 1.112 | -0.049 | CUPTI | device | proved-equal (LEL ahead) |
| K9 | hyper-connection up (chain_gr_up8 8.5 us against gr_up75 + gr_up_multi variants) |
0.817 | 0.877 | -0.060 | CUPTI | device | proved-equal (LEL ahead) |
| K10 | hyper-connection split (chain_gr_split 96 x 3.1 us against gr_norm_split 97 x 2.9 us) |
0.299 | 0.280 | +0.019 | CUPTI | device | open |
| S4 | GR_DOWN_TG |
9.7 us (chain_gr_down_t2w8_nb4) |
18.4 us | -8.7 us | gap doc | device | proved-equal (LEL ahead) |
| S5 | GR_UP75 (hoisted row loads) |
partial | on | estimate 0.05-0.10 | upstream plan | device | open |
| K14 | small kernels (norms, PLE, copies, sampler) | 0.049 | 0.253 | -0.204 | CUPTI role table | device | proved-equal (LEL ahead) |
| R8 | tail after the last layer's add_hits (final write, head, argmax) |
0.463 | 0.373 | +0.090 | CUPTI | device | fixing (2026-11-11 docs/experiments/verify-tail-and-gaps.md: LEL +86.5 us at its T mix = the ledger's +0.090; head hc chain +31.2 us (6T+4 launches against 10), head matmul at T>=3 +38.4 us, greedy pick + finite scan +18.0 us (chain_sampler_greedy_kernel 25 us against ~7). Switch LELEKA_SM120_HEAD_CHAIN_BATCH (off, branch claude/tail-fusion merged, sealed sm120_head_chain): batches the 6T tail launches into 6, bitwise by construction, expected 0.02-0.035 ms a graph; jobs verify-tail-head-chain-bitwise-probe, -identity, -cupti-windows (QP/QT) queued 2026-11-11, binary bin-tail. Not done: greedy pick fold (18 us, bitwise-safe, needs a scratch buffer in OriginalNativeHeadRows), head matmul T>=3 (38 us, try the sealed head_n14_tN_small dispatch, per-row arithmetic unverified)) UPDATE 2026-11-12: verify-tail-head-chain-bitwise-probe SUMMARY failures=0 (T 1..8, all first offsets, seeds 1-2, R/xn/lo/gated/mixed identical); verify-tail-head-chain-identity IDENTICAL (top-16 rows 2057/2057 for P2 and P3 against the reference, argmax flips 0, A/A identical, draft trace 1036/1036). The switch is bit-identical; the section delta (CUPTI QP against QT) is still missing: the first run verify-tail-head-chain-cupti-windows produced no windows because the new A/A guard refused every arm by mistake (bug of the guard, fixed in 6b613b1a8); rerun queued as verify-tail-head-chain-cupti-windows-rerun. Default stays OFF until the delta is read. |
| S9 | HEAD_MIX_MULTI |
not ported | on | estimate 0.06-0.10 | upstream plan | device | open (switch LELEKA_SM120_HEAD_MIX_MULTI (off), one multi-token hc read for the head, 3 launches a token instead of 5 (-(5T-3) a graph), branch claude/s11-s9-combine-headmix merged; bitwise rests on upstream's claim until verify-s11-s9-u5a-bitwise-probes and identity P3/P5 run; window CH/CZ queued). Identity 2026-11-10 (P3): NOT bitwise. 25 of 2057 top-16 rows differ against the reference (same 25 in both arms, A/A identical, so it is the switch, not noise), d_top1 max 0.0015, p99 0.0013, argmax flips 0, draft trace 1036/1036 identical. The multi-token head read changes the summation order of the head mix. A lossy-class change: OFF, and it needs its own quality gate and a delta before it can be considered (the window CH; expected gain is only the 5T-3 launches). Window CH-CS (docs/experiments/verify-s11-s9-u5a-windows.md): -(5T-3) kernels confirmed, head span -0.0004 .. -0.0605 ms a graph at T 1..6, weighted -0.023 ms (noise <= 0.0001): real but small, far below the 0.06-0.10 estimate; OFF because it is not bitwise |
C2u. Upstream cc 12.0 defaults after 0.2.6 (owner 2026-11-09: +0.3 % and +0.5 % are tokens too)
These are in upstream strata-upstream/main (October 31 to November 1) and not in the vanilla 0.2.6 arms (VANL 202.1 tok/s), so they widen upstream's lead; we take them when we have no equivalent. Columns LEL = what our tree has, VANL = the upstream claim.
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| verify: programmatic dependent launch on the all-resident verify graph (U1) | PDL (081d1c04d): kernels carry griddepcontrol.wait after their constant-weight loads and are launched with the programmatic stream-serialization attribute inside the graph capture, only kernel-to-kernel edges, cc >= 9 |
not present: the verify window issues ordinary launches (launch_ex.rs has only the cluster attribute); our sealed PTX has no griddepcontrol |
claim +0.3..0.5 % decode, bit-identical, RTX PRO 5000, all-resident graph; -1.6..-4.5 % in the doorbell graph of a partly resident cache (our serve graph is the doorbell graph, hit rate 90.8 %) | not measured | upstream commit, pdl.hpp |
device | open (plan: kernel edits in the dense kernels that upstream opted in - native_mmvq x4, native_bf16 x1, verify_kernels x2 - behind LELEKA_SM120_PDL, off; section = gap between consecutive kernels in a CUPTI window; only worth keeping if the doorbell graph does not lose) |
| verify: unrolled bf16 router read (U2) | STRATA_SMALL_UNR bit 0 (bf16_f32_mmvf_multi, constant-trip loops), default 3 on cc 12.0 (08b20b104) |
no (our router read is the Original-literal kernel) | claim +0.18 % agent, +0.28 % code_py, 5/5 pairs, bitwise | not measured | upstream commit | device | open |
| verify: unrolled GDN a/b projection (U3) | STRATA_SMALL_UNR bit 1 (gdn_ab_body; ours verify_gdn_ab_multi_kernel) |
no | same A/B as U2 (bits 0 and 1 together) | not measured; part of the GDN role K7 | upstream commit | device | open (switch LELEKA_SM120_GDN_AB_UNROLL built, identity PASS (P6, P8: verify-new-switches-identity: top-16 rows 2057/2057 identical, draft trace 1036/1036 identical, argmax flips 0, A/A identical), OFF in the profiles. Section verify-new-switches-cupti-windows (2026-11-10, windows of request 29, 15 s, new binary bin-verify-switches, per-T within one variant: T 2..6 have 77-376 graphs; the control CL.2 and each variant ran in separate sessions, so the expert-tier (FFN) phase differs between them and is NOT compared) without side streams (CV.1 against CL.2): GDN kernel time per graph -63 / -93 / -137 / -177 / -168 us at T 2..6 (chain_gdn_ab_multi_kernel 7.72 us x 36 -> leleka_gdn_ab_unrolled_t1..t8 2.97 .. 15.56 us), mixer phase -1.3 / -1.8 / -2.8 / -3.3 / -3.7 us per layer = -0.06 .. -0.17 ms per graph. With SIDE_MIXER on (CY.1) the unrolled kernel does not run at all (the side stream keeps chain_gdn_ab_multi_kernel), so the profile set does not take it. Next step: use the unrolled a/b kernel on the side stream and check whether the join then waits less) |
| verify: batched staging and read loads of the HC read (U4) | STRATA_GR_V3_PF bits 0 and 2 of gr_down_v3/gr_up_v3 (08b20b104) |
no GR_V3 port (upstream-port-plan.md 5.7); our HC kernels are the chain kernels (chain_gr_down_t2w8_nb4 11.1 us, chain_gr_up8 8.5 us), ahead of vanilla 0.2.6 by K8/K9 |
no number of its own | not measured against the chain kernels | upstream commit | device | open (needs the same-T kernel table of upstream's variant against the chain kernel) |
| verify: HC down kernel, two rows a warp for windows of 5+ rows (U5) | STRATA_GR_V3_PF bit 7, default mask 133 on sm_120 (4ab81c796, 5f24b96db, merged as 27a3e056a; bitwise, same dots in the same order) |
not present; chain down kernel by window rows in CL.1 (gy = rows/2): T 1-2 9.35 us, T 3-4 10.65 us, T 5-6 13.11 us, T 7-8 15.33 us (vanilla 0.2.6 VANL by its own grid-y 1/2/3/4/6: 8.80 / 9.04 / 10.18 / 12.54 / 15.92 us; a different row mapping) |
down kernel 16.1 / 16.2 / 17.6 / 19.5 -> 13.3 / 14.1 / 14.7 / 15.6 us at T 5-8 (upstream's own table); serve A/B spec 6 +1.21 %, spec 8 +1.4 %, ids identical 96/96 | RTX 5090 micro-benchmark verify-hc-down-kernel-microbench-vs-upstream (2026-11-10, upstream 504b1433, ours 6b2a69f1d; 64-node graph, 7 rounds x 40 replays, weights cold from DRAM): the whole read, ours (split + down + up8) against upstream (down + up, mask 133), is slower by 3.9 / 4.4 / 3.4 / 3.1 / 3.9 / 5.2 / 5.9 / 5.2 us per layer half at T 1..8 (+15..+29 %, every point above the round spread); against mask 0 by 3.2 / 3.1 / 2.5 / 1.3 / 0.8 / 1.1 / 0.2 / -0.9 us. Our down kernel alone is slower by 2.8..5.1 us (warm); the split kernel adds 2.3..2.6 us that upstream's down kernel does itself (norm sum of squares and staging). At 96 launches a graph (48 layers x 2 halves, docs/experiments/verify-hc-down-kernel-microbench-vs-upstream.md) that is 0.30 (T 4) .. 0.56 ms (T 7) per verify graph. Bitwise: NOT established, the harness inputs give NaN in most outputs (nonfinite in the DIFF lines), so the byte compare says nothing; the finite rows show rs differing by 1 ulp from upstream. |
upstream commit | device | fixing (measured: upstream faster at every T, so the earlier "level within 1 us" reading was wrong; steps: U5a. Section delta to confirm in the CUPTI window: chain_gr_down_t2w8_nb4 + chain_gr_split -> one fused down kernel, per-layer-half time) |
| verify: HC down plus split fused into one upstream-style kernel (U5a) | gr_down_v3_kernel mask 133: staging, norm sum of squares and the dots in one launch, no chain_gr_split |
chain_gr_split + chain_gr_down_t2w8_nb4 (+ chain_gr_up8): two launches, split 2.3..2.6 us (warm) |
microbench (U5): ours slower by 3.1..5.9 us per layer half cold, 96 launches a graph = 0.30..0.56 ms a graph | not measured on the engine | microbench verify-hc-down-kernel-microbench-vs-upstream |
device | open (built, off, slower in the graph; branch claude/u5a-gr-down-fused merged; jobs verify-s11-s9-u5a-bitwise-probes, -identity P4/P5, -cupti-windows CD/CZ queued 2026-11-10; no separate A/B, owner rule of 2026-11-10). LELEKA_SM120_GR_DOWN_FUSED=1 (needs LELEKA_CHAIN with gr, staged read, 81,920 B shared) records leleka_gr_down_fused_t2w8 (sm120_gr_down_fused.cu, sealed PTX, 191 registers, no spill) in place of chain_gr_split + chain_gr_down_t2w8_nb4: the block stages R' * w_norm of its two tokens into shared memory, adds the sum of squares in the split kernel's order, scales, and runs the down kernel's dots; rs is written by the blocks of column 0; the arithmetic order is the two kernels' (bitwise by construction, unlike upstream's v3), so the weights' DRAM fetch (about 4 us cold) overlaps the staging instead of waiting behind the split launch. Probe tools/gr-down-fused/gr_down_fused_probe.cpp compares every output byte against the pair for T 1..8. Microbench inputs were finite all along; its NaN came from a race between the poison memsets (legacy default stream) and the kernels (non-blocking stream), fixed with a device synchronize; the byte compare of the earlier run is invalid and the microbench has to be re-run. Section to look at: chain_gr_split + chain_gr_down_t2w8_nb4 (96 + 96 launches a graph) -> leleka_gr_down_fused_t2w8 (96 a graph)). Identity 2026-11-10 (P4): 2057/2057 rows bit-identical, draft trace 1036/1036, A/A identical: PASS. Window CD-CH (docs/experiments/verify-s11-s9-u5a-windows.md): the fused kernel is SLOWER in the graph, pair per layer half +1.47 / +2.46 / +1.69 / +1.44 / +0.32 / -0.10 us at T 1..6, +0.145 ms a graph weighted (noise <= 0.005): do NOT enable; the launch gap inside the pair is only 0.1 us, so the fuse has nothing to save, the microbench gain did not carry over; the reason it is slower is not measured |
C2v. CUPTI windows of the new verify switches (verify-new-switches-cupti-windows, 2026-11-10)
Windows of request 29 of the VANL nestng-crm-r2 replay, 15 s each, binary bin-verify-switches. CL.2 = control (lever 1, no side streams), CQ.1 = + QSA prelude, CG.1 = + fused GDN, CV.1 = + a/b unroll, CA.1 = + accept on device, CY.1 = profile set (side streams) + all new switches. Every row is within one variant per window row count T (graphs T2/T3/T4/T5/T6 in CL.2: 312/235/77/139/19); the FFN phase (expert tier) differs between sessions and is not compared. The VANL column is the role table of the earlier VANL window (rows K6, K7), not re-measured.
| section (per graph) | CL.2 T2 / T3 / T4 / T5 / T6 | CQ.1 prelude, delta | CG.1 fused GDN, delta | CV.1 unroll, delta | CA.1 accept, delta | VANL |
|---|---|---|---|---|---|---|
| mixer phase, us per layer | 117.2 / 127.1 / 138.8 / 156.4 / 171.5 | -0.6 / -1.1 / -1.6 / -2.2 / -2.8 | -1.6 / -1.3 / -1.6 / -1.3 / -0.8 | -1.3 / -1.8 / -2.8 / -3.3 / -3.7 | +0.2 / +0.2 / 0 / 0 / -0.3 | not windowed |
| same, ms per graph (x47) | 5.5 / 6.0 / 6.5 / 7.4 / 8.1 | -0.03 / -0.05 / -0.08 / -0.10 / -0.13 | -0.075 / -0.06 / -0.075 / -0.06 / -0.04 | -0.06 / -0.085 / -0.13 / -0.155 / -0.17 | 0 | |
| QSA kernels, us per graph (launches) | 871 (192) / 974 (204) / 1046 (216) / 1118 (228) / 1255 (240) | +23 (192) / +21 (192) / +11 (192) / +3 (192) / -18 (192) | +5 / +7 / +5 / +1 / +1 | +1 / 0 / 0 / +6 / -24 | +6 / +5 / -1 / -1 / -21 | attention role 1.125 ms against ours 1.357 (K6) |
| GDN kernels, us per graph (launches) | 430 (108) / 529 / 628 / 721 / 816 | +1 / +1 / +1 / +2 / +2 | -78 (36) / -74 / -82 / -70 / -60 | -63 / -93 / -137 / -177 / -168 | +1 / +1 / 0 / +1 / +1 | GDN role 0.759 ms against ours 0.914 (K7) |
| accept: graph end to first draft kernel, us | 275 / 297 / 353 / 324 / 386 | n/a | n/a | n/a | 287 / 291 / 296 / 354 / 346 (no consistent sign) | vanilla decides on the host as well |
| profile set CY.1 (side streams + everything), mixer us per layer | CY.1: 108.4 / 116.6 / 126.3 / 143.2 / 155.6 (-8.8 .. -15.9 against CL.2, mostly the side streams) |
Under the profile's SIDE_MIXER the a/b projection runs as chain_gdn_ab_multi_kernel on the side stream (10.1 us x 36 in CY.1), so the fused GDN step is step+norm+conv only (7.18 us against 7.00 us separate) and the unrolled a/b kernel does not run: fused GDN and unroll give nothing on the profile and stay off. Only the QSA prelude has a delta on the profile path: weighted by CL.2's graph mix, -0.056 ms per graph (one graph a round), about 2.4 % of VANL's attention-role gap of 0.232 ms. Against the +1.98 ms a round at 67 k that is 0.06 ms closer (3 %), before the set A/B confirms it.
C3. Accept (verdict of the window on the device) and the hand-over to the next draft
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| O7 | verify end to first draft kernel, ms (design note docs/experiments/verify-accept-on-device.md: vanilla decides the accept count on the HOST too, generate.cpp:15255; what vanilla keeps on the device is the finite check of the head logits, one sync; ours does a second launch pair, a stream sync, a DtoH and a context sync) |
0.32 | 0.08 | +0.24 | ORCH | hex-finish (finite check: device) | fixing (LELEKA_SM120_ACCEPT_ON_DEVICE (off), branch claude/verify-accept-on-device merged, identity PASS (P7, P8: verify-new-switches-identity: top-16 rows 2057/2057 identical, draft trace 1036/1036 identical, argmax flips 0, A/A identical). Section verify-new-switches-cupti-windows (2026-11-10, windows of request 29, 15 s, new binary bin-verify-switches, per-T within one variant: T 2..6 have 77-376 graphs; the control CL.2 and each variant ran in separate sessions, so the expert-tier (FFN) phase differs between them and is NOT compared) (CA.1 against CL.2): verify_clear_status 0.59 us + verify_scan_logits 2.0-2.3 us added to the graph; graph end to first draft kernel 275 -> 287 / 297 -> 291 / 353 -> 296 / 324 -> 354 / 386 -> 346 us at T 2..6: no consistent sign (differences -57..+30 us, window T mixes differ), no measurable section gain, so OFF in the profiles; the host chain (0.2 ms) is hex-finish) |
C4. Commit (accepted-prefix graph, GDN replay, QSA tail restore, re-append, PLE history)
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| verify: fused commit graph (accepted-prefix commit) (S6) | COMMIT_BATCH + state-only GDN commit (commit graph 158 kernels, 0.463 ms) |
not ported | on (gdn_step_commit_layers 0.9 per round, 0.095 ms) |
estimate 0.25-0.35 | upstream plan, CUPTI | device | fixed (the fused commit graph exists since draft-round: LELEKA_DRAFT_FUSED_COMMIT=on, 182 -> 4 nodes, GPU 516 -> 125 us, identity 2057/2057 rows and 1036/1036 draft-trace lines; it was never in the profile because the replay A/B called it neutral; now: section window (verify-fused-commit-cupti-windows, 2026-11-10, replay r29): commit graph in CL.2 182 kernels, span 509.3 us (p50 510.4, 836 graphs; verify_gdn_step_norm_multi_kernel 36 x 7.2 us = 258.5 us, verify_qsa_append_analytic 96 x 1.0 us, verify_gdn_conv_commit_kernel 36 x 1.7 us) -> CF.1 (lever 1 + fused commit) 4 kernels, span 125.2 us (p50 124.4, 795 graphs; draft_commit_gdn_layers 113.9 us, draft_commit_qsa_layers 4.9 us) and CU.1 (profile set + fused commit) 4 kernels, span 125.6 us (761 graphs): section delta -0.384 ms/round, -178 kernels/round; round wall of the windows is not comparable (T mix and expert-tier state differ between sessions: p50 CL.2 15.30, CF.1 15.73, CU.1 15.95, VANL 14.73 ms), the set A/B decides; identity verify-fused-commit-and-side-branches-identity P2/P3 on this tree, then ON in the 5090 profiles; no separate paired A/B: a bitwise-identical step closes by section delta + identity, the e2e A/B is the one group A/B at the end of the stage; identity verify-fused-commit-and-side-branches-identity (2026-11-10, against the reference process of spd-sqid1): P2 (profile set SIDE_MIXER+QSA+SHARED + fused commit) and P3 (fused commit with lever 1): top-16 logprob rows 2057/2057 identical, 0 argmax flips; draft trace 518/518 identical against the reference (the harness line DRAFT VERDICT: DIFFERENT compares the two halves of the reference's single arm, whose I2 arm did not open in spd-sqid1 (InputAllocation), so it is not a verdict on the step); A/A of arm I2 against arm I1 inside P2 and P3: 2057/2057 identical; enabled by default in the three 5090 profiles (LELEKA_DRAFT_FUSED_COMMIT=1, profile tests 50 passed); closed 2026-11-10 by section delta + identity (owner method)) |
| verify: commit graph kernel count (O11) | commit graph (158 kernels, verify_gdn_conv_commit 36 x 1.7 us) |
0.463 | 0.095 (gdn_step_commit_layers) |
+0.37 (S6) | CUPTI | device | fixed (as S6: commit graph 182 -> 4 kernels, 509 -> 125 us, identity PASS, ON in the 5090 profiles) |
| O10 | fused commit (LELEKA_DRAFT_FUSED_COMMIT) |
measured | -0.024 | ORCH | hex-finish | fixing |
C5. Publication of the tokens, host work and syncs around the round
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| R3 | verify end to next verify start (draft, commit, host, CPU-leg join) | 4.304 | 4.144 | +0.160 | CUPTI | hex-finish | open |
| O4 | API calls per round | 207 | 20 | +187 | CUPTI | hex-finish | open |
| O5 | copies per round (count, MB) | 121 (71.5 MB) | 12 (23.6 MB) | +109 copies, +47.9 MB | CUPTI | hex-finish | open |
| O6 | syncs per round (count, host time) | 27.8 (2.468 ms) | 89 (0.926 ms) | -61 syncs, +1.542 ms of host sync time (overlapped with GPU work: R3 is only +0.16) | CUPTI | hex-finish | open |
| O13 | host work around a group (split 3, spans 2, publish plan 6, open and zero 5 us; 48 groups) | 0.8 | not measured | n/a | PROFILE | hex-finish | open |
| O1 | kernels per round | 2691 | 2245 | +446 | CUPTI | hex-finish | open |
C6. Between rounds and requests: expert tier (hit rate, placement)
The tier adapts every 4 rounds and survives across requests.
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| H1 | VRAM hit share in the replay | 90.8 % | 92.8 % | -2.0 points; 28 % more misses | LOG | device | open (2026-11-11 docs/experiments/vram-hit-share-gap.md: the -2.0 does not reproduce, the two surviving VANL replays give 91.8 unweighted / 93.4 token-weighted; gap on the 30-request replay is -0.7..-1.3 points token-weighted, -1.0..-1.6 unweighted) |
| H2 | VRAM hit share weighted by decode time in real sessions | nestng-crm 91.38 %, ttt 92.68 % | 92.41 %, 93.38 % | -1.03 and -0.70 points; at most 0.57 ms per round per point, so up to 0.59 and 0.40 ms per round | LOG | device | open |
| H3 | short requests (< 600 tokens) hit share | 86.9 % | 89.9 % | -3.0 points (up to 7 in single requests) | LOG | device | open |
| H4 | expert slots | 12,192 | 12,575 (+3 %) | -383 slots; variant H (reserves 130 / 500 MiB, about +190 slots): VRAM share +0.44 points, ms/round -0.44 (-2.19 %, CI -3.55..-0.83), tokens per round -1.69 %, decode +0.51 % (CI -0.19..+1.20), end-to-end +1.06 % (CI -0.38..+2.50) | A/B ab-l3v2 |
device | fixing (CORRECTION 2026-11-11 docs/experiments/vram-hit-share-gap.md: the earlier reading that variant H 'gained nothing' was an env leak; the clean paired A/B ab-l3v2 (10 pairs, H 12,384 slots against A 12,192) is a real gain: hit share +0.44 points token-weighted (CI +0.24..+0.64), ms/round -2.10 % (CI -3.61..-0.59), decode tok/s +0.67 % (CI +0.02..+1.31); about 0.23 points per 100 slots, 383 missing slots are worth about 0.9 of the 1.3-point gap. Not enabled: the free VRAM at decode drops to about 355 MiB (vanilla 315), and the project rule is that real work is 256k: before any profile change a run on the 245k corpus (docs/quality-gate.md q245, leleka/decode/, sha in the manifest) with the memory profile, the minimum free VRAM along the run, no OOM or refusal and the memory governor without incident is required, and the memory owner (hex-finish, 2026-11-11) names the threshold: no stricter rule exists, vanilla's own minimum free VRAM of 315 MiB (vram-footprint-5090.md: 389 at request start, 315 after the windows are captured; decode_headroom_mib() = 700+130-514 = 316) is the proof of safety, so 355 MiB is inside it. Pass criteria: (1) minimum free VRAM by 100 ms sampling (mon.csv) over the WHOLE 245k corpus session >= 315 MiB, (2) 0 request failures / CudaExecution / OOM, (3) 3 repeats (the adaptive tier is not bitwise reproducible), (4) the cost confirmed: 12,384 slots. The VRAM floor is set by decode_reserve + usable_room (original_cache_startup.rs), not by the memory governor (host RAM). No current 256k stub with a memory profile exists in jobs/: nearest are 987-decode-vram (dc-g2, run_corpus of dec-common.sh, prints the minimum free VRAM, old binary) and q245-*; the plan is run_corpus with the current binary and the two variables. Group A/B decode-slots-and-adapt-every-group-ab-pg-vs-ps-pw (PS = alias + reserve 130) queued; the per-layer-quota arm (EXPERT_PER_LAYER=no) is measured by hex-finish (host-tier-global-rank-fill-vs-uniform-layer-quota-profile)) UPDATE 2026-11-12: 256k session check memory-256k-codex-session-alias-reserve130-vram-floor (release 02c784249, alias + reserve 130, 12,432 slots, Codex fixbug-ledger x3 at 178-228k input tokens, 100 ms sampler): 0 OOM/CudaExecution, 3 accepted, but the minimum free VRAM is 212 MiB (about 400 at the start, 312 -> 212 at the longest contexts; 478 of 12,792 samples below 315): NOT PASSED. Reserve 130 is too small; about +100 MiB of reserve (about -55 slots) would be needed for the 315 floor. The group A/B (PG against PS/PW) is rerun (decode-slots-and-adapt-every-group-ab-pg-vs-ps-pw-rerun, the first run was refused by the faulty guard). The hex-finish candidate (quota=no + PCIE_FRAC 0.65, +62 slots, reserve unchanged) is checked separately by memory-256k-codex-session-quota-no-pcie065-vram-floor. 2026-11-11 host-tier-global-rank-fill-vs-uniform-layer-quota-profile (pkg-s19, 30 requests, profiled, FP GLP GLP FP, key proven different: log expert cache 12192 slots (per layer) against 12254 slots (global)): global rank fill instead of the 254-slot uniform quota (LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=no, set through a profile override because the built-in profile overrides the shell env): VRAM share 89.76/90.38 -> 91.21/91.12 (+1.1 points), non-resident experts per layer-window 2.96/2.67 -> 2.40/2.47 (-13.5 %), layer 0 non-resident 7.0 -> 2.35 (layers 0-15 3.9 -> 3.1), ms/round (round.run_window) 16.33/15.55 -> 15.03/15.19 (mean 15.94 -> 15.11, -5.2 %), decode 186.0/182.8 -> 186.4/187.8 tok/s (+1.5 %, 2 reps, A/A floor +-1 %). Slots differ by 62 (12,254 against 12,192), about 0.1 point of the gain. Placement-class: needs the quality gate against the control placement and the VRAM/OOM floor before it may become a default. Cross-layer potential of the swap rule (tier.cross.*, uncapped): global minus within-layer swap gain is 0.02-0.03 % of the usage mass in both layouts (within 517 / global 524 against usage mass 27,443; miss mass 6.1 % uniform, 5.3 % global), so moving slots between layers at adaptation time adds nothing; the gain of the global fill is the initial layout, which the capped swaps (96 per 4 rounds) repair slowly (H3/H7). The layer-weight policy is therefore not needed. 2026-11-12 PLACEMENT GATE (host-tier-quota-no-and-pcie-share-065-placement-gate, teacher-forced night5-long-256k, 5 requests to 243k, 240 forced tokens, adaptive tier, rt-pf21 = 02c784249a, A/A floor 0 in all three processes): P2 = EXPERT_PER_LAYER=no + PCIE_FRAC 0.65 against the shipped placement: 1,720 common rows, argmax flips 33 (1.92 %), d_top1 p99 0.210, max 0.653; P3 = share 0.65 only: 1,741 rows, flips 39 (2.24 %), p99 0.198, max 0.763. Against the Original envelope (p99 <= 0.22, max <= 0.43, flips <= 2.8 %): p99 and flip rate inside, the single-row max outside for both (the quota change adds nothing worse than the share change alone); the draft trace differs from the first row on by construction (placement-class). Verdict: NOT a clean PASS (max); the control host-pcie-share-control-placement-gate-035-and-055 (shares 0.35 and 0.55 against 0.45, same reference) decides whether the max is the size of any ordinary placement change. VRAM/OOM floor: the speed session's 256k Codex run of its own variant (alias + DECODE_RESERVE 130, 12,432 slots) measured a minimum free VRAM of 212 MiB (rule >= 315) with 0 OOM: FAIL for that variant; the candidate (quota=no + share, default reserve) has not been run at 256k. Default stays unchanged; the candidate is an option only. 2026-11-12 CONTROL (host-pcie-share-control-placement-gate-035-and-055, same binary, same reference idP1 = shipped 0.45, A/A floor 0 in both processes): an ordinary placement change of the same kind, the PCIe share alone: 0.35 (vanilla's share) 1,746 common rows, flips 39 (2.23 %), d_top1 p99 0.224, max 0.746; 0.55: 1,760 rows, flips 45 (2.56 %), p99 0.215, max 0.665. Candidate rows for reading side by side: quota=no + 0.65: flips 1.92 %, p99 0.210, max 0.653; share 0.65 only: flips 2.24 %, p99 0.198, max 0.763. The single-row max of 0.65..0.76 is therefore the size of ANY placement change (0.665 and 0.746 for a share step of 0.10 and 0.10), not a property of the candidate; the p99 and flip rate of the candidate are at or below the controls (p99 0.210 vs 0.215/0.224; flips 1.92 % vs 2.23/2.56 %). The Original envelope max <= 0.43 was measured on ~100-token prompts and is not applicable to the placement class at 243k context (every placement step overshoots it); the applicable rule is the control-relative one of q_tail_gate.py --control (p99, max and flip rate each <= 1.25 x the control's): the candidate passes it against the worst control (p99 0.210 <= 0.28, max 0.653 <= 0.93, flips 1.92 % <= 3.2 %). Quality gate of the candidate: PASS under the control-relative rule (n = 1 replay of 5 requests, 240 tokens, one workload; the second evidence is the e2e acceptance of the candidate run, not yet made). Still open for the candidate: the 256k VRAM/OOM floor (speed session's stub), then e2e (CRM x3 + ttt x3). Default unchanged. 2026-11-12 STAGE 7 e2e, DEFAULT profile (release 02c784249a, e2e-codex-ttt-and-crm-default-profile, nestng-crm x3 + ttt x3, saved VAN/VANL cells): CRM accepted 0/3 (54/56, 54/56, 55/56) against VAN and VANL 3/3 56/56; ttt 3/3 14/14 in every arm. The failing checks are two STATIC source-pattern checks of accept.py section 5 ("frontend src: a board with one column per stage" needs one file with all five stage names AND a loop - LEL keeps the names in models.ts and loops over stages in the html; "calls /api/companies, contacts, deals" needs the literal /api/<name> or /api/${ - LEL writes ${this.base}/companies); all behavioural checks (REST, e2e suites, 54 of 56) pass, rounds failed 0, no tool-call error: coding style of the greedy session, not tool-call integrity. History of the same two checks over all LEL CRM cells since 2026-11-09: LEL-A 5/6 and LEL-L 6/6 (no tracing flags) vs profile/trace variants LEL-LP 0/3, LEL-AP 1/2, LEL-LS 1/8, LEL-AS 0/6 (LELEKA_SERVE_PROFILE + BRINGUP_TRACE + PROFILE_SYNC: timing changes the greedy trajectory), VANL 4/5 (one 55/56 on the same board check, 2026-11-10), VAN 3/3; the default profile now 0/3, so the style difference is systematic enough to matter but n is small and package and date are confounded. Decode (CRM): LEL 163.1 +- 2.2 tok/s against VANL 202.1 and VAN 221.4 (-39.0 +- 4.4 and -58.4 +- 7.0 paired); ttt: LEL 157 against VANL 202 and VAN 226. Wall s (CRM): LEL 465.8 +- 21.4, VAN 434.0 +- 98.9, VANL 461.8 +- 106.2 (paired LEL-VANL +4.0 +- 123.6, LEL-VAN +31.8 +- 117.0: inside the session noise; LEL runs 45 rounds against 62-71 but 9.3 s/request against 5.2-6.3); ttt wall: LEL 172 s, VAN 99 s, VANL 137 s. Plan target "accept 56/56" NOT met. Bisect step 1 queued (e2e-codex-crm-stage-set-off-lel-r1..r3, CRM x3, profile with LOAN_TIERS, DRAFT_CHECK_MERGE, PREFIX_PARK_FAST, DECODE_GRAPH_REUSE, STREAM_MIN dropped); if it passes >= 2/3 the five keys are bisected one by one, if it fails the regression is not the stage set (candidate: the Leleka-vs-Strata trajectory itself). BLOCKER for the plan target until the bisect is read. |
| H5 | adaptive tie order (equal-gain swaps share the cap across layers, LELEKA_ADAPT_TIE_SPREAD, 9d130fd38) |
low layer first | run memory-tier-tie-spread-ab-first-half/xb queued |
gap doc | device | fixing | |
| H6 | tier knobs: adapt every 2, 192 swaps, decay 0.85, margin 1.0 (spd-w1..w5) |
4, 96, 0.7, 1.5 | same policy | runs queued | gap doc | device | fixing (W1 adapt every 2: earlier n=5 +0.56 points hit, +1.31 % tok/s (CI +0.77..+1.85); in the group A/B above as PW against PG, then 10 pairs if it holds) |
| H7 | first rounds of a request see an unadapted tier | not isolated | gap doc | device | open (isolated for ours 2026-11-11 docs/experiments/vram-hit-share-gap.md: hit share 79 % in the first 4 windows of a request, 85 % at windows 16-31, 90 % at 32-63, 93 % from 128; the first 64 windows carry 20 % of the misses, a ceiling of 0.71 points; vanilla has no per-window log; a request-start warm-up needs code in original_serve_residency/source_spans.rs, hex-finish) |
||
| H8 | CPU expert compute per expert (2 MB) | 39 us (52 GB/s) | 44 us | -5 us | PROFILE | hex-finish | proved-equal (LEL ahead) |
Counts
Computed by scripts/e2e/codex/speed/ledger_counts.py (2026-11-10): 92 rows. The one both row and the hex-finish (finite check: device) row are counted in their owner's column below.
| status | rows | device | hex-finish | both |
|---|---|---|---|---|
| open | 47 | 24 | 22 | 1 |
| fixing | 15 | 11 | 3 | 1 |
| fixed | 10 | 10 | 0 | 0 |
| proved-equal | 20 | 18 | 2 | 0 |
fixed rows (V3a, V3b, V4, V4a, S3, K6, K1, S10, S6, O11) have a section delta, identity and a set A/B; the rest of the fixing rows wait for GPU validation.
Order of work in the device part (linear in the graph; step N closed before step N+1)
The device part starts at the verify graph; the draft (C1) and the host (C5) belong to hex-finish.
- C2, structure: V1 closes when V3a, V3b, V4a and V4b are closed.
- C2, mixer half in graph order: V3a (GDN branch; A/B
spd-sm1, identityspd-sqid1), V3b (QSA branch; windowCN.1, A/Bspd-sqn), then the kernels of the half: K1, K6, K7, K7a, S1, S8, S10. - C2, FFN half: V4a (shared expert; window
CE.1, A/Bspd-sqe), V4b (routed-expert branch), V5, V7, K11, S2, S7, S11, then K10, S5 and the tail R8, S9. - C3 accept (O7), C4 commit (S6, O11).
- C6 hit rate and tier placement (device side: H1..H7).
Each step is closed with: section delta (CUPTI of that step), identity, and the end-to-end paired A/B after the group.
A/B rules (owner, 2026-11-10: do not burn the GPU)
- A bitwise-identical step (identity PASS) gets no paired A/B of its own: it closes by the section delta (one CUPTI or profile load) plus identity.
- One group e2e A/B per set, at the end of the stage: n=5 pairs (10 runs); n=10 only when an effect below 1 % has to be resolved.
- Replay of 12-15 requests when a section is measured, not 30.
- Several variants in one load (switch by env or tune), not a restart for each.
- A/B only for changes that alter the numbers or carry a regression risk.
Job names (old code name -> readable name)
Queue stubs and result directories carry the readable name from 2026-11-09 (<area>-<what is measured>-<arm or step>, area prefix prefill-, verify-, draft-, host-, memory-). A job that already ran or runs keeps its directory; this table is the correspondence.
| old name | readable name | state |
|---|---|---|
spd-sm0 |
verify-side-mixer-cupti-window (dir runs/cupti/CM.1) |
done |
spd-sm1 |
verify-side-mixer-ab-default-vs-on (dir runs/ab-sm) |
done |
spd-sqid1 |
verify-side-branches-identity (dir runs/id-sq1) |
done |
spd-sqw |
verify-side-qsa-and-shared-cupti-windows (dirs runs/cupti/CE.1, CN.1, CT.1) |
done |
spd-sqe |
verify-side-shared-ab-default-vs-on (dir runs/ab-sqe) |
done |
spd-sqe2 |
verify-side-shared-ab-more-pairs | withdrawn |
spd-sqn |
verify-side-qsa-ab-default-vs-on (dir runs/ab-sqn) |
running |
spd-sqa |
verify-side-branches-ab-mixer-only-vs-all-branches (dir of the same name) | done (U against M: decode +2.11 %, no regression) |
spd-sqf |
verify-fused-commit-cupti-windows (dir of the same name) | done |
spd-sqid2 |
verify-fused-commit-and-side-branches-identity (dir of the same name) | done |
| - | verify-s11-s9-u5a-bitwise-probes (probes of S11, S9, U5a, kernel level) | first run 2026-11-10 failed: the frozen probe binaries had lost the executable bit (exit 126, nothing measured); -run2 stages them with +x, queued 2026-11-11 before the windows |
| - | verify-s11-s9-u5a-identity (P2 S11, P3 S9, P4 U5a, P5 profile set + all three) | done 2026-11-10 23:00: P2 PASS, P3 25 rows differ (d_top1 max 0.0015, no flips), P4 PASS, P5 the same 25 rows as P3 |
| - | verify-s11-s9-u5a-cupti-windows (CP control, CS, CH, CD, CZ) | done 2026-11-11 00:11; NOTE the variants are cumulative (the job did not unset the per-variant switches: CS = S11, CH = S11+S9, CD = S11+S9+U5a, CZ = all three = CD again, i.e. CZ-CD is a noise estimate); fixed in spd_ab_job.sh 2026-11-11 |
| - | verify-ffn-d1-d2-d3-bitwise-probes / -identity (P2 D1, P3 D2, P4 D3, P5 profile set + all three) / -cupti-windows (CP, WD, WH, WW, WZ), binary bin-ffn-switches, test binary dt/rt-ffn-switches |
queued 2026-11-11 |
spd-xa, spd-xb |
memory-tier-tie-spread-ab-first-half, -second-half (dir runs/memory-tier-tie-spread-ab) |
first half queued (5 pairs); second half withdrawn 2026-11-10 (A/B rule below) |
spd-cuo |
draft-and-verify-cupti-windows-leleka (dir runs/cupti/CL.1) |
done |
spd-cuv |
draft-and-verify-cupti-windows-vanilla (dir runs/cupti/VANL) |
done |
spd-w1 .. spd-w5 |
memory-tier-policy-screening-round-1 .. 5 | done |
U. Upstream fixes and small wins after the pin (checked 2026-11-09 against strata-upstream/main, reference only, engine/strata untouched)
Owner rule: small upstream wins (+0.3..0.5 %) are taken too. "VANL" here is vanilla 0.2.6; upstream items dated after it are wins on top of vanilla, not gaps against it. Each row says whether we have the analogue, then the closing evidence needed.
| id | step | LEL | VANL / upstream | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| U1 | prefill: GDN recurrence as a chunked scan on tensor cores (code STRATA_GDN_TC, upstream commits 8c2a84694 opt-in 2026-10-26, default 6858c919c 2026-11-07 with STRATA_GDN_CONVL2=2) |
present behind an off-by-default switch (LELEKA_PREFILL_GDN_TC); the default prompt GDN kernels stay the sealed Original ones (leleka_prefill_gdn_rec / _kh); the pinned engine/strata (0.1.50) has no GDN_TC either |
upstream 0.2.9: prompt +4.4 % at 4K, +5.5 % at 16K, +5.7 % at 32K; lossy: first-token KL mean 0.0019, max 0.0125; engine gates it at run time (compute capability >= 8, one SM per value head, shared memory) | not a gap against VANL 0.2.6 (it has no GDN_TC); a possible win of about 5 % of prefill |
upstream commit message | hex-finish | fixing (code c5a8b7794, switch LELEKA_PREFILL_GDN_TC, experimental/lossy; parity, quality gate and section delta pending): sealed asset gdn_prefill_tc.cu (prep + scan, 99-KB split plan, two value tiles per head on the 5090), runs of >= 128 tokens on sm_120, scratch = the idle dequantization scratch (no extra VRAM); not bitwise by design, the gate is docs/quality-gate.md (first-token KL / q_tail_gate / logprob envelope); checks: ignored GPU test gdn_tensor_core_scan_stays_within_the_gate_of_the_sequential_recurrence (1e-4), then the quality gate, then section delta = gdn stage per chunk of the prefill profile at 4K/16K/32K; no speedup claimed FIRST GPU RESULTS (2026-11-10): parity PASS (readout 5-7e-8, state 1-4e-7, gate 1e-4, T up to 2048+, both tile plans); synthetic kernel time kh 4.049 ms to tensor-core 1.308 ms at 8192 tokens. Logit gate (job prefill-gdn-tensor-core-logit-gate, first run, arm I1 only: both processes failed to open arm I2 with InputAllocation/HostAllocation on the full holder, so there is NO A/A floor): against the shipped path on night5-long-256k (5 requests, 45k-243k prompts, 240 forced tokens each) d_top1 p99 0.2727 (limit 0.22), max 0.7405 (limit 0.43), argmax flips 47 of 1658 common rows = 2.83 % (limit 2.8 %): OUTSIDE the Original envelope, preliminary; TTFT of the five requests 63.97 s to 60.57 s (-3.4 s, -5.3 %, unpaired single run). Rerun with the A/A floor on the sparse holder queued. LOGIT GATE 2026-11-10 (rerun with A/A floor, job prefill-gdn-tensor-core-logit-gate): A/A floor identical (arm I2 against I1 inside A: 518/518 draft lines, rows identical, so the difference is real); GDN-TC vs shipped: 1658 common rows, d_top1 median 0.0087, p99 0.2727, max 0.7405, argmax flips 47 (2.83 %), DRAFT VERDICT DIFFERENT; envelope (p99 <= 0.22, max <= 0.43, flips <= 2.8 %) FAILED on p99 and max, flips at the limit. PROFILE (job prefill-gdn-tensor-core-profile, 2 boots x 30 requests per arm): prefill.phase total 35539/34384 ms shipped vs 33996/34572 ms GDN-TC (-22.6 ms per request, -1.9 %, inside the 3 % boot-to-boot spread), because tails are short (mean ~800 uncached tokens, below the 128-token runs the kernel targets in most chunks). VERDICT: stays experimental and OFF; no A/B, no CRM x3. |
| U2 | prefill: batched PLE post-ops (code STRATA_PLE_BATCH; upstream 78316c8df 2026-11-02 turns it off for an engine built with CUDA 12.8 on cc 12.0: illegal memory access in native_ple_postops_batch_snap) |
we run the PLE of a prompt chunk batched (OriginalPromptDevice::apply_ple, ple_batch_ffi, ple_batch_queue); our sealed PTX is ISA 9.2 = CUDA 13.2 and the deploy refuses a driver older than 595 (docs/deploy.md), the production RTX 5090 host runs driver 595.99 / CUDA 13.2 |
upstream: with CUDA 13.0 the batch is ~23 % faster prompts, so only the 12.8 toolchain faults | same hazard does not apply (no 12.8 build exists in our chain); the batch is already on | source read | hex-finish | proved-equal (we have the fast path and not the faulting toolchain); no work |
| U3 | prefill: MMQ row table over-read by the stream-k fixup (code ids_identity; upstream f225844d1 2026-11-05, class E correctness) |
same structure: ids_identity is T*K entries exactly (original_prefill_layout.rs:330, a.rows("ids_identity", t, K, 4)), read by the same ggml mul_mat_q_stream_k_fixup (mmq_original_formats_fixup.cu); upstream needs T*K + roundup(T, J) + J entries (J = 8..128). It stays inside the arena today because bounds_dev, grp_gu, grp_d follow it in the same allocation, so the over-read lands in a neighbouring span and the skipped writes never use it |
upstream faulted (Xid 31) when the exact table ended a 2 MiB page | latent: not a fault with the current layout, would become one if the order of the Common spans changes or mmq_any spans end the allocation |
source read | hex-finish | fixing: margin roundup(T, 128) + 128 entries added (original_prefill_layout/mmq_identity.rs, unit test of every readable index; always on, class E, no switch); identity (prompt logit digests equal) pending in the batched identity job |
| U4 | verify: flag B stays behind queued copies (upstream 40849df0a 2026-11-05, P1.1, class E) |
OriginalVerifyGpuPlan::raise_after_staging (plan_phases.rs): a plan with a PCIe source queues the flag behind the staging copies on the copy stream even when the plan is empty (stage_pcie, then raise_after_copies), the copy-kernel mode and the no-source case raise at once. The upstream hazard (an empty plan raising the one counter early while an earlier layer's or the other token group's uploads are still queued) can only occur in the no-source branch if a window mixes groups with and without a source; not shown to happen |
upstream: counter jumped past a layer whose bytes had not landed | unknown; needs the check in the file owned by the speed session | source read | device | proved-equal (speed session, 2026-11-09): flag B is a monotonic ring word; a group with a PCIe source raises it behind the staging copies, one without a source or with the copy kernel raises it from the host at once; groups are never mixed in the product (pcie_num > 0 is fixed once per round, decode_parts.rs:209); pure function flag_b_route(copy_kernel, has_source) with a truth table added on their branch, behaviour unchanged |
| U5 | verify: adaptive-copy range covers the whole round (upstream 40849df0a) |
different implementation: adaptive swaps are planned and applied in original_serve_residency (adapt_swaps cap 96 per round, swap_tie_order.rs); no serial/pipelined split with lo/hi/bi ranges exists in the Rust port |
upstream: a pipelined round that drained early marked only an earlier round's range resident, so other swaps were lost (slot held the new expert, table still named the old one) | analogue not found; the resident marking of a drained round needs a read-through | source read | device | proved-equal (speed session, 2026-11-09): a swap is Queued until complete_swaps after wait_swaps/poll_swaps marks it Filled, and the slot search requires Filled, so a slot is resident only after its copy landed |
| U6 | prefill: expert-major (whole-blob) host bank for the copy ring (vanilla's pack holds one 2 MB blob per expert; ours is role-major, so the ring issues three H2D copies of ~0.7 MB per expert, copy_exact/copy_aligned in ring_stage_expert_copies.rs) |
PCIe 44.6 GB/s measured over the copies (PREFILL-COPY avg_call=696194 dma_gbps=44.6); a 1.4k-token tail copies 24 GB, the ring wall equals bytes / 45 GB/s |
vanilla: Original's own probe 49.9 GB/s with whole blobs | about -10 % of the ring DMA = -30..-45 ms per request at 0.3-1.5k tails (estimate: 0.9x of 460 ms) | PROFILE prefill-ring-copied-megabytes-profile (bytes), docs/upstream-port-plan.md:181 (probe) |
hex-finish | DEFERRED by the orchestrator 2026-11-10: it changes the KAR bank layout and the single compressed copy of the model (not a ring-local change); come back after the ring prefetch and Q6. Bitwise by construction (same bytes), needs a KAR format/version decision and a sealed-bank migration |
| U7 | prefill: fused int8 prompt experts (code STRATA_PF_FUSED, moe_fused_iq.cu; upstream 959e6c34, b1e0fdaa; ON by default for a 5090 in vanilla via sm120_series.hpp, confirmed in the VANL engine log: prompt experts on the fused int8 kernels (STRATA_PF_FUSED=1, #136)) |
absent (our prompt experts run the grouped MMQ kernels behind the copy ring; port-plan rows 3.2/6.2 are todo, size L, needs the GPU-side grouping) | VANL has it ON (and CPU share OFF in that arm); upstream measured prompt +7/+5/+3 % at 4K/20K/98K; KL against MMQ 0.0002, an exact int8 dot with one float add per 32 values (s0-7 row 5, B2) | not measured: at tails of 64-1024 tokens the ring wall equals the PCIe time of the copied bytes (7-13k experts per request, DMA 319-590 ms at 45 GB/s = ring wall 332-590 ms), so a faster expert kernel only moves the kernel tail after the last copy; expected effect at those tails is small (a few ms per layer of MMQ after the final group), and +3..7 % of compute at 4K+ | model-free prefill_fused_iq_test against our MMQ layer (row 6.1), then the Original envelope (q_tail_gate on night5-long-256k, first-token KL) |
hex-finish | open, NOT the cause of the 64-1024 tail gap (that gap is the unoverlapped GDN/QSA compute, ~130 ms, and DMA 45 vs 50 GB/s, rows Q4/U6); experimental switch OFF + gate only after the prefetch and Q6, default with the owner's word |
M. Host memory: the lab holder's sealed memfd
| id | step | LEL | VANL | difference | source | owner | status |
|---|---|---|---|---|---|---|---|
| M1 | lab holder restart after every holder window: the window scripts (cmp_codex_job.sh and the jobs built on it: cmp*, kar-off*, spd-van*, spd-cu*, pf-mv1) end with single-copy-holder.sh, the FULL seal (55.3 GB resident, allocated=55295533056), so the sparse holder of pf-hs1 (allocated=16000352256, 10:28) lasted only until pf-mv1 ended (10:50); the next window spd-cuv (13:31) restarted the full one again |
51.5 GiB resident memfd (profile ple_only needs 14.9) |
n/a (vanilla holds its own copy) | +36.6 GiB of host RAM held twice; builds with the memfd check refuse to start (leleka up: "a second copy of model bytes that nothing reads"); ab3 (12:13-13:17), ab4 (22:46-23:43) and dc-p1 ran on the full holder, both arms of each pair on the same one |
notes.md, holder3.out, stat of the memfd |
hex-finish | fixing: guard in pf_ab_job.sh (allocated size of the inherited memfd above 20 GiB: sparse restart through pf_holder_window.sh and the job queued again, pf_sparse_requeue.sh); window scripts of other sessions must end with pf_holder_sparse.sh instead of single-copy-holder.sh (not done: not our files) |
Job names (GPU queue stubs and result directories)
Naming rule (owner 2026-11-09): <area>-<what it measures>-<arm or step>, in words; areas prefill-, host-, draft-, memory-. Result directories under /data/leleka-e2e/prefill-latency/runs/ carry the same name. Jobs that already ran keep their old name; the map is old to new.
| old name | new name (job stub, queue entry and result directory) | what it measures | row |
|---|---|---|---|
pf-ab4 |
prefill-ladder-ab-pairs-6-10 |
paired A/B of the prompt loan ladder against shipped, pairs 6-10, sparse holder | Q1 |
pr-lel |
prefill-empty-request-probe-leleka |
empty-request probe on LEL: tiny prompt, cold, cached long prompt | A1, A2, A3 |
pr-prof |
prefill-prefix-park-subspans-profile |
profiled replay with the sub-spans of the prefix-cache export (sync, allocation, copy) | B3 |
s1-id1 |
host-draft-chain-one-pass-identity |
identity and host-span pair, draft chain in one pass against sequential | O9 |
s1-ab1 |
host-draft-chain-one-pass-ab |
paired A/B n=10, draft chain in one pass (ms per token, task time) | O9 |
pr-prof (then prefill-prefix-park-subspans-profile) |
prefill-prefix-park-identity-and-profile |
replaces the sub-span profile job: identity of parking FAST/ASYNC against shipped (A, PF, PA) and the profiled pair (AP, PFP, PAP), package pkg-s3 (commit 7a549b68e) |
B3, U3 |
s1-ab1 (then host-draft-chain-one-pass-ab) |
host-draft-switches-group-ab |
the one paired A/B of the group of host/draft switches (chain pipeline + check merge + parking fast) against shipped, n=10, package pkg-s4 |
O9, O8, B3 |
| (new) | draft-check-merge-gpu-proof |
GPU test check_batch (batched guard against separate launches, NaN/Inf in every buffer) |
O8 |
| (new) | host-draft-switches-identity |
replay hashes and draft trace lines equal with X (group), the check merge alone (MT), shipped (DT) | O8, O9, B3 |
| (new) | prefill-gdn-tensor-core-parity-gpu |
GPU tests: tensor-core GDN scan against the sequential kernel (gate 1e-4) and kernel timing; package pkg-s5 |
U1 |
| (new) | prefill-gdn-tensor-core-logit-gate |
lossy gate: teacher-forced night5-long-256k, 240 tokens by top-16 logprob, shipped against LELEKA_PREFILL_GDN_TC=1 (A/A floor), Original envelope via q_tail_gate.py; test binary dt/rt-pf7 |
U1 |
| (new) | prefill-gdn-tensor-core-profile |
gdn stage per chunk, shipped (AP) against tensor-core scan (GTP), replay of 30 requests |
U1 |
| (new) | host-decode-graph-reuse-identity-and-profile |
Q7: replay hashes and draft trace equal to shipped with LELEKA_DECODE_GRAPH_REUSE=1, and the decode.assemble/decode.reuse/record.* spans; package pkg-s6 (commit 2a1f2eccf) |
Q7 |
| (new) | prefill-prefix-park-async-fix-identity-and-profile |
rerun of the parking identity (reuse) and sections after the ASYNC admission fix; package pkg-s8 (commit 4fef1b009) |
B3 |
| (new) | host-draft-chain-gate-diagnosis |
which condition keeps the pipelined draft chain from engaging (mtp.chain_gate.* counters), and the step-graph node count with the check merge; package pkg-s9 (commit 4b0f87bf0) |
O9, O8 |
| (new) | host-draft-switches-teacher-forced-identity |
bitwise identity under teacher forcing (night5-long-256k, A/A floor): shipped against check merge, parking fast and decode graph reuse, one process each; test binary dt/rt-pf9 (commit 2a1f2eccf) |
O8, B3, Q7 |
pr-van |
removed | empty-request probe on VANL; vanilla is not re-measured (owner 2026-11-09) | A1-A3 |