diff --git a/docs/experiments/codex-compare-speed-gap.md b/docs/experiments/codex-compare-speed-gap.md index 6ea95153..d890fd37 100644 --- a/docs/experiments/codex-compare-speed-gap.md +++ b/docs/experiments/codex-compare-speed-gap.md @@ -204,3 +204,31 @@ Queued next: lever 6 (`spd-l6a`, `spd-l6b`: D = adaptive window at floor 0.5 aga * The board is present in all three (a column per stage over the five stages, read in the sources), so the static failure was the checker artifact, not a model defect. * r3: the failing test is the agent's OWN `deals.e2e-spec.ts:176` ("searches deals by title ... combines with stage"): it expects one deal for `?stage=won&q=software`, but its own fixture creates two won deals with "software" in the title ("Alpha software" and "Beta software"), so the API correctly returns two. Deterministic (3 of 3 reruns), a wrong assertion written by the model, not environment noise, and not a defect of the service. It still fails the acceptance rule "the agent's tests pass". The baselines have 0 such cases in 9 sessions; 1 in 3 with tail skip is a small-n signal, not proof (an own-test slip of this kind can occur without tail skip, and greedy sessions are not reproducible). * Gate re-assessed: rounds growth below the speed gain (yes, +1.9 % / +1.7 % against +12 %); game playable (ttt 3/3, 14/14); CRM 56/56: **2 of 3** (r3 55/56 through its own wrong test). Not passed in full; with n = 3 per arm I do not call it a quality regression either. Tail skip stays experimental and off. To settle it, run 3 more repetitions of `nestng-crm` with the fixed `accept.py` (and the first three re-run under it); needs the owner's go on the cost (about 8 GPU-min each). + +### Lever 7, owner gate on n = 7 CRM and 5 ttt (`spd-g1..3` re-accepted + `spd-g4..g9`, fixed `accept.py` b2e6c690, 2026-11-08): NOT passed on rounds + +Real Codex CLI 0.163.0, release package `17e372944279` with `LELEKA_ROUTE_TAIL_SKIP=7`, `..._MAX_CACHED=100`. Baseline = shipped LEL of `codex-compare/runs/main` (n = 3, same fixed accept.py). New cells in `/data/leleka-e2e/spd-gap/runs/codex-tail2` (job copy `tools/cmp_codex_job_fixed.sh`: `TASKS_ROOT=reaccept-1/tasks`, manifest-checked). + +| nestng-crm | tail skip n = 7 | shipped LEL n = 3 | difference | +| --- | --- | --- | --- | +| accepted (fixed accept.py) | 6 of 7 (r3: own e2e test wrong) | 3 of 3 | | +| rounds (requests), each | 75, 43, 47, 98, 94, 87, 52 | 47, 62, 53 | | +| rounds mean +- sd | 70.9 +- 23.3 | 54.0 +- 7.5 | **+31 %** (Welch t = 1.7, df 7.9: not significant) | +| wall s mean +- sd | 539.0 +- 118.5 | 488.4 +- 59.4 | **+10 %** (t = 0.9) | +| decode tok/s | 179.4 +- 5.1 | 163.1 +- 1.3 | **+10.0 %** (t = 7.8) | + +Against the pooled nine shipped baselines of the three arms (LEL, VAN, VANL: rounds 62.4 +- 15.7, wall 461 s) the tail-skip rounds are +13.5 % and wall +16.8 %. The four new cells are the long ones (98, 94, 87 requests at 1.9-2.2 requests per tool call, against about 1.0 before); the early sessions (r1-r3) were short, so the order of runs, not only the mode, differs between the groups. + +`ttt` (static 14/14; the six-click browser check is not available on the server or in this work folder, so it is NOT done): 5 of 5 accepted, rounds 17.6 against 17.7 (-0.4 %), wall 161.5 s against 177.9 s, decode 178.5 against 164.3 tok/s (+8.6 %). + +Owner criterion "rounds growth must not exceed the speed gain in %": the point estimate fails on CRM (+31 % rounds, and wall time +10 % longer, against +10 % decode speed); the difference is within the noise of n = 3 against n = 7 (t = 1.7), so it is neither proven nor refuted. Game playable: statically yes, in a browser unchecked. CRM works: 6 of 7. Verdict: **not passed**, tail skip stays experimental and off. + +Teacher-forced logit check (`spd-l7id`, `rt-c10`, 5 requests of `night5-long-256k`, 240 forced tokens each): the A/A floor in the reference process is bit-identical (2057 of 2057 rows). Tail skip against the reference: 1687 common top-16 rows, 0 identical, **60 argmax flips = 3.6 %** (the Original's envelope in `q_tail_gate` is flips <= 2.8 %), and the draft traces differ in every line (1036 compared, 0 identical). `q_tail_gate` itself prints PASS only for the in-process arm pair (A/A), not for this cross-process comparison. + +### Lever 6 (adaptive window floor), result: no gain (`spd-l6a`, `spd-l6b`, 10 pairs, 2026-11-08) + +D (adaptive window with `spec_min_p` floor 0.5, `leleka reconfigure`) against shipped A (floor 0), same replay, 27 requests per block after warm-up: decode tok/s A 185.77, D 185.25, **-0.28 % (95 % CI -1.13..+0.57 %)**; end-to-end -0.13 % (-0.96..+0.70 %); tokens/round +2.72 % (-0.74..+6.19 %); ms/round 19.48 against 20.07 (+3.0 %, CI +0.18..+5.86 %). The extra tokens per round cost as much in round time. No default change; the shipped adaptive policy stays. + +### Lever 3 (fewer misses), plan (2026-11-08) + +`docs/experiments/vram-footprint-5090.md` already holds the footprint work (dense slab default on; decode reserve 130 MiB and the prompt-embedding alias are opt-in, about +250 slots together, against vanilla's 12,575; our 12,192 now). Free VRAM at idle after load is about 1,040 MiB. The paired test queued here (`spd-l3a`, `spd-l3b`, variant `G` = `leleka up --gpu-budget-gib 31`, +0.43 GiB, about +190 slots, free VRAM after load about 600 MiB against vanilla's 389) measures the upper bound of what ~+200 slots are worth without any code change. If the gain is under 1 % the slot route is closed except for the larger prompt-buffer carve-out (+250..450 slots, needs code). diff --git a/scripts/e2e/codex/speed/spd_ab_job.sh b/scripts/e2e/codex/speed/spd_ab_job.sh index b1d2b20e..0b2bdb5c 100644 --- a/scripts/e2e/codex/speed/spd_ab_job.sh +++ b/scripts/e2e/codex/speed/spd_ab_job.sh @@ -20,6 +20,7 @@ # L shipped (lossless, tail skip OFF) + sm_120 ATTN_DAILY + GU_SWIGLU (lever 1: byte-identical expected, gate = every out_sha equal to A) # FA frozen placement: tier swaps off (LELEKA_ORIGINAL_SERVE_ADAPT_EVERY=0) and the fixed Original window (LELEKA_SPEC_ADAPTIVE=off LELEKA_SPEC=4, floor 0), nothing else; the identity-gate base # FL as FA + sm_120 ATTN_DAILY + GU_SWIGLU. The gate is FA.1 vs FA.2 (A/A floor, must be identical) and FA.n vs FL.n (every out_sha equal) +# G shipped with a larger GPU budget: `leleka up --gpu-budget-gib 31` (the profile has 30.57 GiB; +0.43 GiB = about +190 expert slots, free VRAM after load about 600 MiB): the upper bound of what ~+200 slots (lever 3) are worth; placement class # E shipped + our EXPERIMENTAL route tail skip (LELEKA_ROUTE_TAIL_SKIP=7 and no cached-share cut-off: LELEKA_ROUTE_TAIL_SKIP_MAX_CACHED=100), lossy set -uo pipefail CMP=/data/leleka-e2e/codex-compare @@ -54,7 +55,7 @@ for v in $VARS; do D=$RUN/$v; mkdir -p "$D"; vb=${v%%.*} [ -f "$D/replay.jsonl" ] && { log "variant $v already done: skipped"; continue; } unset LELEKA_ORIGINAL_SERVE_ADAPT_EVERY LELEKA_SM120_ATTN_DAILY LELEKA_SM120_GU_SWIGLU LELEKA_SM120_SIDE_MIXER LELEKA_ORIGINAL_SERVE_PCIE_FRAC LELEKA_SERVE_PROFILE STRATA_VERIFY_PROFILE LELEKA_ROUTE_TAIL_SKIP LELEKA_ROUTE_TAIL_SKIP_MAX_CACHED LELEKA_SPEC LELEKA_SPEC_ADAPTIVE LELEKA_SPEC_FLOOR_CEILING LELEKA_SPEC_STATS - FLOOR="" + FLOOR=""; UPX="" case $vb in A) ;; L) export LELEKA_SM120_ATTN_DAILY=1 LELEKA_SM120_GU_SWIGLU=1;; @@ -63,6 +64,7 @@ for v in $VARS; do B) export LELEKA_SPEC_ADAPTIVE=off LELEKA_SPEC=4; FLOOR=0.5;; C) export LELEKA_SPEC_ADAPTIVE=off LELEKA_SPEC=4;; D) FLOOR=0.5;; + G) UPX="--gpu-budget-gib 31";; P) export LELEKA_SERVE_PROFILE=1 STRATA_VERIFY_PROFILE=1;; S) export LELEKA_ROUTE_TAIL_SKIP=7 LELEKA_ROUTE_TAIL_SKIP_MAX_CACHED=100;; T*) export LELEKA_ROUTE_TAIL_SKIP=7 LELEKA_ROUTE_TAIL_SKIP_MAX_CACHED=100; p=${vb#T}; p=${p%[a-z]}; [ "$p" != 45 ] && export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=0.$p;; @@ -77,7 +79,7 @@ for v in $VARS; do nvidia-smi --query-gpu=timestamp,temperature.gpu,clocks.sm,clocks.mem,power.draw,utilization.gpu --format=csv -l 10 >"$D/mon.csv" 2>/dev/null & MON_PID=$! log "variant $v: leleka up --foreground (floor ${FLOOR:-profile})" t0=$(date +%s) - setsid "$BIN/leleka" up --foreground $COMMON --timeout-s 1800 >"$D/up-foreground.txt" 2>&1 & + setsid "$BIN/leleka" up --foreground $COMMON $UPX --timeout-s 1800 >"$D/up-foreground.txt" 2>&1 & SUP_PID=$! ready=0 for _ in $(seq 1 700); do "$PFX/bin/leleka" status --state-dir "$ST" >/dev/null 2>&1 && { ready=1; break; }; kill -0 "$SUP_PID" 2>/dev/null || break; sleep 3; done