Verba/Rapida

Experiments #143fs

Row 143fr's fix: set `ctx.head_tail_answer` from the request's `answer_only` before its first forward...

done

What was tested

Row 143fr's fix: set `ctx.head_tail_answer` from the request's `answer_only` before its first forward (`src/generate.zig:2557` sets it only after a `sampleLazy` draw; default false at `src/transformer.zig:4798`), so a thinking-off request never prepares `suppress_mask` and the head tail's one-slot cache stays on `answer_mask` across requests; on `row/143fs` from `best-2026-11-19-stk1b`, a test that the flag is set before the first forward, the 150 identity count, then a pair on the first (`2026-11-07-mac-session-reads/README.md` ยง Result, row 143fr)

Model and setup

the best

Expected gain

warm first token about -0.86 ms (0.04% of a warm reply), lossless

Where the idea came from

row 143fr

Outcome

done 2026-11-19: line met, warm first token +0.93 ms [+0.64, +1.40] (floor 0.33), +0.02% not harmed, replies identical 150 of 150; merges into Lesto main with the next stack of small lossless rows

Lesson

a per-request choice that keys a one-slot cache must be set before the request's first forward. Here one assignment in `Generator.initWithOptions` removed both rebuilds of the head tail's prepared state per thinking-off request, and the 0.93 ms it saved on the warm first token matches the 0.86 ms the measured, with replies unchanged.

Adopted

no (the pre-registered line is met: the fix merges into Lesto `main` with the next stack of small lossless rows, and records no ledger row by itself, since it moves no adoption metric)

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