Verba/Rapida

Experiments #159

The prompt's last token inside the last prefill chunk: every prompt ends with its own decode-shaped forward...

runnable

What was tested

The 's last inside the last chunk: every prompt ends with its own decode-shaped forward (`src/generate.zig:1730`, `:1742-1745`, `:1946-1974`), about 10 ms (one step, row 149), where one more row in the chunk costs about 1.3 ms (the fit, row 155); with row 154's mechanism layer 29's tail runs on the last row only and the head reads that row; rounding-class (the first reply token's logits come from prefill kernels), so the Mac quality before a race (`2026-11-13-mac-engine-audit/README.md` F4)

Model and setup

the best

Expected gain

about -8 to -9 ms a turn on all 150 turns, per-turn paired reply -0.3% to -0.4% (inferred)

Where the idea came from

engine audit 2026-11-13

Outcome

runnable 2026-11-13: first check met the bar (warm first token -9.3 ms, 20 of 20 turns faster; 7 of 30 replies identical, rounding class); read passed (row 159r); pair done 2026-11-13 18:28 (`mac/159/1`): pre-registered reply -1.7% [-2.6, -0.8], line met, scorer `` (rounding pair, 32 of 150 identical); length-adjusted -0.48%, warm first token -8.2 ms at level ; adoption on the coordinator (`2026-11-13-mac-engine-audit/README.md` ยง Result, row 159)

Lesson

folding the prompt's last token into the last prefill chunk, stacked on row 154, cuts the warm first token by 8.2 ms (95 of 100 turns) and cold by 0.36 s at level decode, -0.48% of length-adjusted; the raw per-turn median reads -1.7% only because rounding changes reply lengths, so a rounding-class reply pair is pre-registered on the length-adjusted reply (`score_race.py --metric reply_len`, added 2026-11-13).

Adopted

no (rounding-class reply line met on raw median, which the length change inflates 3x; length-adjusted -0.48% measured post hoc, so it decides nothing; row 159 stays a stack component)

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