Verba/Rapida

Experiments #155

Warm first token's fixed cost: over the best's 100 warm turns first token = 0.121 s + 1.306 ms per new...

done

What was tested

first 's fixed cost: over the best's 100 warm turns first token = 0.121 s + 1.306 ms per new token (residual sd 0.027 s, `2026-11-12-mac-remeasure-r147s/raw/remeasure147s_rows.jsonl`; row 138's arms 0.144 and 0.145 s), 6% of a 2.02 s warm reply; render and tokenize (10 to 15 ms), the 's last-token forward (about 10 ms) and `mlx_clear_cache` (3 to 6 ms) leave 80 to 95 ms unexplained. Stamp each phase from request read to the first SSE write (hot-cache lookup and restore `src/scheduler.zig:5270-5316`, admission and eviction `:5326-5360`, the chunk's KV eval and clear `src/generate.zig:1847-1861`, the final forward `:1946-1974`, the first draw) on a build, 10 sessions; diagnostic, timing-free (`2026-11-13-mac-engine-audit/README.md` F3)

Model and setup

the best

Expected gain

sizes up to about -2% per-turn paired reply (a 60 ms cut is 3% of a warm reply), G about +1%

Where the idea came from

engine audit 2026-11-13

Outcome

done 2026-11-21: the warm first token's fixed 0.115 s (server span 114.8 ms + 1.32 ms a new token, 100 warm turns) is the chunk's own forward: its blocking KV eval has a 93.9 ms intercept, the only phase over the 30 ms line; render 6.1 ms, first wait 11.9 ms, everything else under 0.2 ms; fix row 155c (`2026-11-20-mac-r155-first-token-phases/README.md` ยง Result)

Lesson

a warm turn's fixed first token (0.115 s of a 0.47 s median at 296 new tokens) is the prefill chunk's own forward (a 93.9 ms intercept, found by stamping its blocking eval), not request handling, restore or admission (each under 0.2 ms) nor render (6.1 ms); the next cut must come from inside the chunk forward.

Adopted

no (a diagnostic; fix row 155c queued)

Want to see what these experiments produced? Lesto, the Gemma 4 inference engine for Apple silicon Macs, is on lestoengine.com

Made by Federico Andrioli, @fedeandri on X A research lab's own measurements, generated from its files. Data built