From cb60ba8e498fc38d747b563b6fa399d4e18af0c8 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Wed, 11 Nov 2026 17:22:06 +0100 Subject: [PATCH] Ledger: H1/H4/H6/H7 from the hit share analysis, H4 correction (variant H was a real gain), 256k precondition for fewer reserves Co-Authored-By: Claude Sonnet 5.5 --- docs/experiments/step-ledger.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/experiments/step-ledger.md b/docs/experiments/step-ledger.md index 2023d075..ccf5d432 100644 --- a/docs/experiments/step-ledger.md +++ b/docs/experiments/step-ledger.md @@ -178,13 +178,13 @@ 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 | +| 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 (placement-class: needs the gate against the control placement) | +| 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) has to set the reserve threshold. 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`)) | | 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 | -| H7 | first rounds of a request see an unadapted tier | | | not isolated | gap doc | device | open | +| 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