Experiments #159v
Why row 159's prompt-tail fold slows decode, and a fix (on `row/159s67`, the 159s stack rebased on the new...
done
What was tested
Why row 159's prompt-tail fold slows The writing phase: the model produces the reply one token at a time. Read more, and a fix (on `row/159s67`, the 159s stack rebased on the new best `best-2026-11-14-67c`; a pair's A is `lesto_r67c`): time the first and second one-token forwards after a Reading a long prompt in slices instead of in one go, so other requests are not blocked. on `lesto_r159soff` and `lesto_r159s` with `MLX_SERVE_STEP_TRACE` (what is built, allocated or compiled at B's first one-token call that A built during its prompt-tail forward), read that code at LESTO `row/159s` 1cbcca92, then patch it (for example, Cold means the server has never seen this prompt start; warm means part of it is already remembered from before. the one-token path once at the fold) and check the step costs vanish with the same diag159u The numbered revision of the quality-check procedure; results are only comparable within one version.
Model and setup
the best
Expected gain
none (fix; a fold without its 0.07% decode cost would make the 159s stack's -0.38% reply adoptable)
Where the idea came from
row 159u (`2026-11-13-mac-engine-audit/README.md` § Result, row 159u)
Outcome
done 2026-11-14 08:31 (closed in the The ranked list of experiments waiting to be run. 2026-11-27, engine-rows): the fold's first-step cost is the shim's host build before step 0's submit; its fixes, rows 159y and 159z, both ended A valid experiment that did not beat the best score by more than the noise. on 2026-11-19. step 2b done 2026-11-14 08:31: step 0's submit tracks the host time before it (1.0 to 1.6 ms per ms); the fold adds 0.13 ms there (the shim's build), which accounts for its first-step cost; the fix is row 159y. step 2 done 2026-11-14 08:18: no KV grow, no empty pool; the cost is +0.13 ms of host build for the shim's one-token forward and +0.29 ms in step 0's submit; step 2b (host gap before submit, `diag159x_job.sh`) running. Step 1 done 2026-11-14 06:15: the fold's first-step cost is all in step 0's submit, +0.35 ms [0.26, 0.46], flat in context; step 2 (KV grows and MLX pool per step, LESTO 4d603ba, `diag159w_job.sh`) queued after diag162n (`2026-11-13-mac-engine-audit/README.md` § Row 159v step 1 result)