Experiments #29
Component loss of the Mac best mlx-vlm + MTP (row 17 and 17r: first-turn TTFT 8.58 to 8.76 s, +2.1%, later...
obsolete
What was tested
Component loss of the Mac best mlx-vlm + MTP (row 17 and 17r: first-turn Time to first token: how long you wait before the first word of the reply appears. 8.58 to 8.76 s, +2.1%, later turns +2.5%): the cache buffering before the first The unit of text a model reads and writes: roughly a short word or a piece of a longer one. (`A speed trick where a small model guesses several tokens ahead and the big model checks them in one pass. Read more/mtp.py:560-584`) only rewraps the 25 sliding caches (about 200 MB, under 1 ms), so it does not explain 0.18 s; next suspect, every Prefill: the model reading the whole prompt before it can write the first token. Read more step runs with `return_hidden=True, return_shared_kv=True` (`generate/ar.py:353`, `:364-368`), which may keep every layer's hidden states and shared KV per chunk; timing-free first: one 8k prefill timed with and without those kwargs, and the arrays they return; then an overlay that requests them only on the last chunk
Model and setup
gemma-4-26b-a4b OptiQ-4bit + MTP assistant
Expected gain
up to -0.18 s TTFT per turn (**guess**)
Where the idea came from
rows 17, 17r
Outcome
obsolete 2026-11-02: targets mlx-vlm generate/ar.py