Verba/Rapida

Esperimenti #143fs

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

done

Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.

Cosa è stato provato

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)

Modello e configurazione

the best

Guadagno atteso

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

Da dove viene l'idea

row 143fr

Esito

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

Lezione

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.

Adottato

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)

Vuoi vedere cosa hanno prodotto questi esperimenti? Lesto, il motore di inferenza per Gemma 4 sui Mac con Apple silicon, è su lestoengine.com

Creato da Federico Andrioli, @fedeandri su X Le misure di un laboratorio di ricerca, ricavate direttamente dai suoi file. Dati aggiornati al