From 0fa4099b87c9bccecf74fc6688a3ee89f7199f1c Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Fri, 13 Nov 2026 02:36:23 +0100 Subject: [PATCH] Tail skip gate on 83bdd85bb482 (n=3 CRM + 3 ttt): results in the speed-gap doc and plan stage 6f; not proven, not enabled Co-Authored-By: Claude Sonnet 5.5 --- docs/experiments/codex-compare-speed-gap.md | 19 +++++++++++++++++++ docs/experiments/plan-faster-than-strata.md | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/experiments/codex-compare-speed-gap.md b/docs/experiments/codex-compare-speed-gap.md index f777b21b..8ef26b8d 100644 --- a/docs/experiments/codex-compare-speed-gap.md +++ b/docs/experiments/codex-compare-speed-gap.md @@ -390,3 +390,22 @@ Structure: in LEL the verify graph is on ONE stream (714; kernel sum 13.35 ms = Matched kernels are not slower in LEL: attention `leleka_qsa_decode_chunk_daily` 18.3 us against `attn_chunk_kernel_pre75` 17.1, topk 17.3 against 18.0, scores 14.2 against 17.1; draft chain `chain_gr_down` 11.1 against `gr_down_staged` 11.5, `chain_gr_split` 3.1 against 2.9; GDN equal; dense (`head_n*`, mmvf) 3.9 against 4.6 ms (LEL faster); routed experts at equal entry count: `window_moe_down_20` with 40 entries 13.6 us against `native_down_multi<20>` 17.4 us, `sm120_moe_gu_swiglu_22` with 50 entries 12.3 us against vanilla 26 us (with 40). Mean-per-kernel comparisons are distorted by the entry mix (vanilla has many empty 0.7 us launches). CPU/PCIe leg handling in total (flag waits + doorbell + mapped copies + `fetch_blobs`) 3.25 ms in LEL against 3.08 ms in VANL. Conclusion: no single kernel explains the gap; the verify graph has no parallel branches. Candidate steps in order: (1) measure the existing GDN `SIDE_MIXER` at this context (CUPTI window overlap + paired A/B), then port the QSA part (indexer/queries chain, about 0.5 ms of overlap in VANL), then the routed/shared-expert branch (about 1.5 ms of overlap); bitwise (only graph edges change). (2) the draft/commit tail: 0.16 ms. + +### Lever 7 gate on the owner-default release 83bdd85bb482 (2026-11-13, plan stage 6f), n = 3 CRM + 3 ttt + +Jobs `e2e-codex-ttt-and-crm-release-83bdd85bb482-route-tail-skip-7-experimental-lel-r{1,2,3}` and `-report` (stubs `scripts/e2e/codex/prefill/e2e-release/`, evidence `/data/leleka-e2e/prefill-latency/runs/e2e-codex-ttt-and-crm-release-83bdd85bb482-route-tail-skip-7-experimental/`). Tarball sha256 3837a32b..., PROVENANCE git_commit 83bdd85bb482, `LELEKA_ROUTE_TAIL_SKIP=7`, `..._MAX_CACHED=100` exported in the job shell (the profile key allow-list has no `LELEKA_ROUTE_` prefix); the engine log of all three blocks has `EXPERIMENTAL route tail skip is ON (... 49.9% of the experts in VRAM)`. Baseline = the stored owner-default series of the same release (CRM rounds 62/43/74, decode 184.2, wall 539.1; ttt rounds 27/24/13, decode 181.7, wall 170.5), vanilla cells not re-run (VANL 202.1 / 462 s, VAN 221.4 / 434 s; ttt VANL 202, VAN 226). + +| cell set | tail skip 7 | owner default | change | +| --- | --- | --- | --- | +| CRM decode tok/s | 211.1 / 212.4 / 209.5 = 211.0 | 184.2 | +14.5 % (VAN 221.4, VANL 202.1) | +| CRM rounds | 56 / 48 / 55 = 53.0 | 59.7 | -11 % | +| CRM wall s | 499 / 493 / 385 = 458.8 | 539.1 | -15 % | +| CRM tool calls | 56 / 51 / 64 | 66 / 47 / 79 | | +| CRM accepted, RELAXED (gate) | 56/56, 56/56, 55/56 (r3: only the literal `/api/` check) | 55/56 (same check), 56/56, 56/56 | 2 of 3 in both | +| CRM accepted, STRICT | 56/56, 55/56, 54/56 | 54/56, 55/56, 55/56 | 1 of 3 vs 0 of 3 | +| ttt decode tok/s | 196.4 / 203.9 / 207.4 = 202.6 | 181.7 | +11.5 % (VAN 226, VANL 202) | +| ttt rounds | 49 / 16 / 24 = 29.7 | 21.3 | +39 % (median 24 vs 24) | +| ttt wall s | 327 / 127 / 203 = 218.9 | 170.5 | +28 % | +| ttt checks | 14/14 x 3 (static; no browser) | 14/14 x 3 | | + +Owner criterion (rounds growth <= decode gain in %): CRM passes (-11 % against +14.5 %); ttt fails on the point estimate (+39 % against +11.5 %), driven by one 49-round session (r1: the agent wrote its own test harness and fixed two bugs; the median equals the baseline). n = 3 per arm with a CV of 20-30 % cannot separate these; the earlier n = 7 series on release 17e372944279 had CRM rounds +31 % (not significant). Both acceptance versions were applied to every cell (`cmp_accept_both.py`, relaxed `reaccept-1` is the gate): CRM 56/56 is NOT reached in 3 of 3 under either, but neither is the stored owner default without tail skip (2 of 3 relaxed). The logit gate stays failed (60 argmax flips = 3.6 % against the 2.8 % envelope, `spd-l7id`). Verdict: the speed gain is real and large (CRM 184 -> 211 tok/s, 4.7 % below VAN), the quality gate is not shown to pass; not enabled by default, decision with the owner (more repetitions or an explicit opt-in flag). diff --git a/docs/experiments/plan-faster-than-strata.md b/docs/experiments/plan-faster-than-strata.md index 965796a4..1b62e64d 100644 --- a/docs/experiments/plan-faster-than-strata.md +++ b/docs/experiments/plan-faster-than-strata.md @@ -34,7 +34,7 @@ | 6c | Decode: хост між графами (4,3 мс, GPU стоїть 1,95 мс): PLE-staging, ланцюг драфту на пристрої, scan у граф, swap-чекання тиру (політика), commit | агент host-round | відкрито (запис 2026-11-12) | | 6d | Decode: токенів на раунд (accept) і драфтер: порівняти з ванільою та з upstream DFlash2 per-device (Blackwell cc 12.0: conf 0,35→0,55, window 6→8), що дає tok/round | агент acceptance | аналіз зроблено (`acceptance-knobs-5090.md`: accept у нас 3,19 проти 2,96 у vanilla, DFlash2-пер-девайс не стосується 5090 32 ГБ, 12-рядкове вікно ≤ +2 %); виміри ручок у черзі GPU | | 6e | Decode: CPU-ядро експерта IQ3_S/IQ4_NL (було ≈3× повільніше за Original; фікс 0c48c823e у main, A/B на 243k іде), далі prefetch 2048 Б і multi512 | агент cpu-kernel | у роботі | -| 6f | Lossy tail skip (+10..12 %): гейт якості (CRM за строгим і м'яким acceptance, ttt, ріст раундів ≤ приросту швидкості) | агент tail-gate | гейт у черзі (запис 2026-11-12) | +| 6f | Lossy tail skip (+10..12 %): гейт якості (CRM за строгим і м'яким acceptance, ttt, ріст раундів ≤ приросту швидкості) | агент tail-gate | n=3 виконано 2026-11-13 на 83bdd85bb482: CRM decode 211 (+14,5 %), раунди −11 %, relaxed 56/56 у 2 з 3 (як у дефолту); ttt decode +11,5 %, раунди +39 % (один сеанс 49 раундів), логіт-гейт 3,6 % flips > 2,8 %; не доведено, за замовчуванням не вмикати, рішення за власником (`codex-compare-speed-gap.md`, кінець) | | 6g | Конкурентні запити агентів (multiplexing сесій) і телеметрія: сукупна пропускна здатність при N одночасних сесіях Codex проти N послідовних; ідея власника 2026-11-12 («у Strata цього нема»). Спершу перевірка здійсненності й кошту (без GPU), потім вимір. Метрики: сукупний ток/с, ток/с на сесію, TTFT, VRAM/RAM. Це НЕ збільшує швидкість однієї сесії (метрики етапу 7), окрема вісь | агент multiplex-feasibility | аналіз зроблено (`multiplexing-feasibility.md`: перемикання сесій 0,07–0,3 с, одночасний decode 1,0–1,3× при N=2 за моделлю, переписування життєвого циклу запиту). Додано 2026-11-12 за словом власника: (а) у режимі оркестратора Codex з сабагентами паралельні запити гарантовані, тому записаних сесій без перетинів замало, потрібен бенчмарк «Codex знає, що він оркестратор, працює кількома сабагентами»; (б) асинхронне стиснення запаркованих блоків сесій у хост-RAM (економія місця й часу перемикання; вимога точності префікс-кешу: лише lossless або вимір відхилення)). АНАЛІЗ 2026-11-12 (`async-park-compression-and-orchestrator-bench.md`): lossless-стиснення блоків E 1,06–1,29× (центр 1,17×), час перемикання не скорочує (копія це memcpy хоста 13–14 ГБ/с, не PCIe), +0–1 сесія RAM: спершу вимір T8, ймовірно NO-GO; бенчмарк оркестратора ≈3–3,5 GPU-год, очікуваний виграш черги 0,97–1,18× (центр 1,03–1,08×) | | 7 | Груповий e2e: CRM×3 і ttt×3 проти бази | обидва | після етапів 2–6; 2026-11-12 перший валідний прогін на 02c784249a7e: кандидат quota=no+PCIe 0,65 CRM 179/505 с, ttt 180/156 с (дефолт власника від 2026-11-12) | | 8 | Рішення власника: tail skip (+10…12 %, не пройшов гейт CRM) | власник | відкрито |