Files
leleka/docs/experiments/vanilla-decode-5090.md
T

108 lines
11 KiB
Markdown

# Vanilla Strata 0.2.6 per-round decode breakdown on the RTX 5090, 256k session (STRA-258, COMPONENT_TABLE)
> **Superseded numbers (2026-10-29).** Every number on this page was measured on the old corpus and is unpaired: ours and vanilla did not run the same workload in the same session, there is no A/A series, and the corpus has since been replaced by the frozen corpus `/data/leleka-e2e/decode/corpus/src/crates` with the ranked upstream expert profile. Do not cite these numbers as a gap or a gain. The paired replacement is the speed-train A/B (`scripts/e2e/decode/speedtrain-ab.sh`, results under `/data/leleka-e2e/runs/`). The page stays for its method and its component breakdown.
Date 2026-10-28/29. Leaf STRA-258 of STRA-245 (S1.1). Level of every number on this page: COMPONENT_TABLE (per-round component timings of one engine). Nothing here is
END_TO_END evidence and nothing here is used for the AC1/AC3 verdict. Machine: `rnr5090` (RTX 5090, driver 595.99, Ryzen 9 9950X3D), vanilla launcher 0.1.51 (`562a0c2e`),
engine 0.1.50 (`strata` sha256 `ae49d5da...4776`), model digest mapping and launch command of `docs/experiments/2026-10-28-s0-7b-runbook.md` sections 5 and 10.
Raw logs stay on the server (not in Git).
## 1. What was run
Session: `long_session.py --turns 5 --target-tokens 245000 --max-output 300` (sha256 `6d7017ea...2863d`, source snapshot of runbook 4.2), one engine per run, `--access local`.
Largest prompt of the session: **242,843 tokens** (default run) / 242,921 (DT-only run) / 243,221 (no-skip run); turn 1 = 45,766 tokens. Greedy-like reply content is empty in all runs
(`reply_sha256 e3b0c442...`, the model stays in its reasoning part), so replies do not differ between arms; the history is the same.
| Run (server dir) | Variant | Instrumentation | Windows used |
| --- | --- | --- | --- |
| `vanilla-timing` (job of 2026-10-28 00:35, validated here, not re-run) | shipped defaults, route tail skip ON (rank 7) | `STRATA_DECODE_TIMING=1 STRATA_VERIFY_PROFILE=1` | 5 requests, 800 windows |
| `s1-decode/v-def-t` (2026-10-28 23:17Z) | shipped defaults, tail skip ON | `STRATA_DECODE_TIMING=1` only | 5 requests, 873 windows |
| `s1-decode/v-nsk-prof` (2026-10-28 22:41Z) | lossy path off: `STRATA_ROUTE_TAIL_SKIP=0` | `STRATA_DECODE_TIMING=1 STRATA_VERIFY_PROFILE=1` | 3 requests, 502 windows (see the caveat in section 5) |
The row (b) environment is the single variable of S0.7 (`STRATA_ROUTE_TAIL_SKIP=0`). The `vanilla_cpu_family` block: vanilla prints no `cpu:` line (S0.7 page, section 3); the engine log
of these runs contains no `cpu:` line either (grep-checked on `engine.log`).
**Perturbation, stated.** `STRATA_DECODE_TIMING` takes clock reads around the window phases; `STRATA_VERIFY_PROFILE` adds GPU stage events. The earlier untimed run
(`vanilla-long-256k`, 2026-10-27, no flags) decoded at 121.7 / 144.2 / 147.7 / 164.4 / 194.3 tok/s (mean 154.5) on the same text, i.e. a per-window cost of about 12.3 ms at the observed
1.9 tokens per window. The timed default runs below decode at 109.7 to 136.7 tok/s: timing inflates the default variant by roughly 20 percent (the `stage` column, section 3, is the visible part).
The numbers on this page are therefore per-round COMPONENT shapes under timing, not the untimed speed.
## 2. Component partition used by STRA-258/259/260
Only four parts of vanilla's `ms/window` are additive: `verify + commit/emit + draft + adapt (wait + join) = ms/window` (checked: 14.57 + 0.01 + 0.92 + 0.25 = 15.75 against 15.76 printed).
The sub-parts that vanilla prints inside `verify` (`GPU-reach wait`, `per-layer host`, `stage`) overlap in time and do NOT sum to `verify` (8.59 + 5.38 + 4.56 = 18.53 against 14.57),
so they are listed as descriptors, never added.
| Component | Vanilla source (engine log field) | Additive |
| --- | --- | --- |
| verify window | `verify` | yes |
| commit/emit | `commit/emit` | yes |
| draft (MTP) | `draft` | yes |
| adaptive tier | `adapt wait` + `join` | yes |
| GPU-reach wait (descriptor) | `GPU-reach wait` | no |
| per-layer host (descriptor) | `per-layer host [plan actq jobs CPU]` | no |
| stage (descriptor) | `stage` | no |
| tokens per window | `tokens/window` | n/a |
| expert tier work (descriptors) | `CPU experts`, `VRAM hits`, `PCIe` per layer-window, `swaps/window`, hit rate line | n/a |
## 3. Table A: vanilla shipped defaults (tail skip ON), run `vanilla-timing` (DECODE_TIMING + VERIFY_PROFILE)
All times ms per window (one window = one verify round). Hit rate = VRAM hits / lookups of the request, as vanilla prints it (PCIe-read experts are in neither count).
| Prompt tokens | windows | tok/window | ms/window | verify | commit | draft | adapt wait | GPU-reach wait | per-layer host | stage | CPU exp/layer-window | VRAM hits/layer-window | swaps/window | hit % | decode tok/s |
| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 45,766 | 165 | 1.82 | 15.76 | 14.57 | 0.01 | 0.92 | 0.25 | 8.59 | 5.38 | 4.56 | 0.37 | 22.39 | 8.5 | 98.0 | 115.4 |
| 95,697 | 154 | 1.95 | 15.93 | 14.72 | 0.01 | 0.96 | 0.24 | 8.97 | 5.26 | 4.37 | 0.40 | 26.67 | 7.8 | 98.2 | 122.3 |
| 151,635 | 152 | 1.97 | 14.44 | 13.35 | 0.01 | 0.89 | 0.18 | 8.98 | 3.88 | 3.22 | 0.30 | 24.47 | 6.2 | 98.6 | 136.7 |
| 197,902 | 164 | 1.83 | 15.04 | 13.95 | 0.01 | 0.94 | 0.13 | 9.28 | 4.18 | 3.65 | 0.23 | 25.61 | 4.7 | 99.0 | 121.7 |
| 242,843 | 165 | 1.82 | 14.96 | 13.93 | 0.01 | 0.94 | 0.08 | 9.28 | 4.16 | 3.73 | 0.18 | 24.37 | 3.4 | 99.2 | 121.6 |
| **window-weighted mean (800)** | 800 | 1.875 | **15.23** | 14.11 | 0.01 | 0.93 | 0.18 | 9.02 | 4.57 | 3.91 | 0.30 | 24.7 | 6.1 | 98.6 | 123 |
Comparison with the item's range: the item reports 10.3-15.7 ms per round for vanilla; the measured per-turn totals under timing are 14.44-15.93 ms (mean 15.23), inside the upper end of that
range. The lower end (10.3-12.3 ms) is the untimed speed (the 154.5 tok/s run above at 1.9 tokens per window = 12.3 ms), which this timed run cannot reproduce: the difference is the timing overhead.
## 4. Table B: the same variant with DECODE_TIMING only, run `v-def-t`
| Prompt tokens | windows | tok/window | ms/window | verify | commit | draft | adapt wait | GPU-reach wait | per-layer host | stage | CPU exp/layer-window | VRAM hits/layer-window | swaps/window | hit % | decode tok/s |
| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 45,766 | 153 | 1.96 | 17.13 | 15.65 | 0.01 | 1.15 | 0.31 | 7.73 | 6.24 | 5.34 | 0.41 | 24.49 | 10.3 | 97.9 | 114.5 |
| 95,753 | 176 | 1.70 | 13.40 | 12.37 | 0.01 | 0.87 | 0.14 | 7.54 | 4.37 | 3.63 | 0.33 | 21.63 | 5.3 | 98.3 | 127.2 |
| 151,699 | 170 | 1.76 | 13.76 | 12.70 | 0.01 | 0.93 | 0.11 | 7.91 | 4.33 | 3.76 | 0.25 | 23.88 | 4.7 | 98.8 | 128.3 |
| 197,973 | 180 | 1.67 | 12.95 | 12.02 | 0.01 | 0.82 | 0.09 | 7.73 | 3.84 | 3.41 | 0.17 | 20.33 | 3.1 | 99.0 | 128.7 |
| 242,921 | 194 | 1.55 | 14.09 | 13.19 | 0.00 | 0.83 | 0.06 | 7.92 | 4.82 | 4.48 | 0.14 | 20.91 | 2.6 | 99.2 | 109.7 |
| **window-weighted mean (873)** | 873 | 1.72 | **14.18** | 13.12 | 0.01 | 0.91 | 0.14 | 7.77 | 4.68 | 4.10 | 0.25 | 22.1 | 5.0 | 98.8 | 121 |
The `VERIFY_PROFILE` flag is not what creates the `stage` column: Table B has no profile and shows the same 3.4-5.3 ms (Table A: 3.2-4.6 ms).
## 5. Table C: lossy path off (`STRATA_ROUTE_TAIL_SKIP=0`), run `v-nsk-prof`
Caveat that applies to every row of this table: the server was under memory pressure (about 20 GB of swap in use, the holder's 52 GB sealed memfd resident); the prefill of the first two
requests of this run took 22.7 s and 383.6 s (a request failed once and was retried), so the session text was not the same as in Tables A and B (prompt sizes 152,043 / 198,299 / 243,221
with 0 / 152,038 / 198,294 reused tokens). The decode windows themselves ran after the prefill finished; they are shown because they are the only skip-off measurement so far, and
they are NOT a paired comparison with Tables A and B (different instrumentation: DECODE_TIMING + VERIFY_PROFILE; different time; thrashing host). A clean pair (`v-nsk-t`) was queued
and not run because the server became unreachable (section 7).
| Prompt tokens | windows | tok/window | ms/window | verify | commit | draft | adapt wait | GPU-reach wait | per-layer host | stage | CPU exp/layer-window | VRAM hits/layer-window | swaps/window | hit % | decode tok/s |
| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 152,043 | 175 | 1.71 | 11.85 | 10.70 | 0.01 | 0.87 | 0.27 | 8.54 | 1.48 | 0.06 | 0.69 | 21.24 | 8.1 | 96.4 | 144.6 |
| 198,299 | 177 | 1.69 | 11.67 | 10.53 | 0.04 | 0.93 | 0.16 | 8.72 | 1.31 | 0.04 | 0.58 | 23.48 | 5.3 | 97.5 | 145.2 |
| 243,221 | 150 | 2.00 | 11.92 | 10.72 | 0.04 | 1.01 | 0.10 | 8.99 | 1.24 | 0.05 | 0.52 | 25.52 | 4.2 | 97.9 | 167.8 |
| **window-weighted mean (502)** | 502 | 1.79 | **11.81** | 10.65 | 0.03 | 0.93 | 0.18 | 8.75 | 1.34 | 0.05 | 0.59 | 23.4 | 5.9 | 97.2 | 152 |
## 6. Reading
- The additive parts, per token (ms/window divided by tokens/window): default (Table A) verify 7.53 + draft 0.50 + adapt 0.10 = 8.1 ms/token (123 tok/s under timing); skip-off (Table C) verify 5.95 + draft 0.52 + adapt 0.11 = 6.6 ms/token (152 tok/s).
- The default variant under timing carries a `stage` of 3.2-5.3 ms per window and a `per-layer host` of 3.8-6.2 ms; the skip-off run shows `stage` 0.04-0.06 and `per-layer host` 1.2-1.5 ms. The untimed default
(154.5 tok/s = 6.5 ms/token) is as fast as the timed skip-off run (6.6 ms/token). So the timed default numbers contain a timing cost that the skip-off run does not show; this page does not explain why
(open: whether the skip decision path forces a host stage only while timing is on). Consequence for the gap analysis: the like-for-like vanilla row is ~6.5-6.6 ms/token, not 8.1.
- Expert-cache hit rate of vanilla stays at 96.4-99.2 percent from the first long request on, with 12,575 slots (23.87 GiB, global profile order, "PROFILE, ranked by routing frequency, no eviction")
and 3-10 adaptive swaps per window, in both variants. The skip-off run does not lose hit rate (96.4-97.9 percent).
## 7. Not done / not verified
- No COMPONENT record was produced for `validate_component.py` / `capture_vanilla.py` (STRA-315): the per-round arrays are on the server, which became unreachable at about 2026-10-28 23:25Z
(ssh timeout, host unreachable from the laptop). The tables above are the engine's own per-request averages, so there is no distribution over rounds, only a per-request mean and the window count.
- `v-nsk-t` (clean skip-off pair), CUPTI traces of vanilla (the kernel/SASS agent holds `claude/decode-sass`), and a repeat of Table A with the replay driver were queued and not run.
- Both vanilla variants were run once per row; there is no A/A series, so every row of the gap table (`docs/experiments/decode-gap-5090.md`) is INCONCLUSIVE in the S0.10b sense.