Verba/Rapida

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 8.58 to 8.76 s, +2.1%, later turns +2.5%): the cache buffering before the first (`/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 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

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