Esperimenti #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
Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.
Cosa è stato provato
Cold means the server has never seen this prompt start; warm means part of it is already remembered from before. first The unit of text a model reads and writes: roughly a short word or a piece of a longer one.'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 The text you send to the model before it starts answering.'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 The numbered revision of the quality-check procedure; results are only comparable within one version. build, 10 sessions; diagnostic, timing-free (`2026-11-13-mac-engine-audit/README.md` F3)
Modello e configurazione
the best
Guadagno atteso
sizes up to about -2% per-turn paired The middle value when results are sorted: half the requests were faster, half slower. reply (a 60 ms cut is 3% of a warm reply), G about +1%
Da dove viene l'idea
engine audit 2026-11-13
Esito
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 Prefill: the model reading the whole prompt before it can write the first token. Approfondisci 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)
Lezione
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.
Adottato
no (a diagnostic; fix row 155c queued)