Verba/Rapida

Esperimenti #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

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

Cosa è stato provato

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

Modello e configurazione

gemma-4-26b-a4b OptiQ-4bit + MTP assistant

Guadagno atteso

up to -0.18 s TTFT per turn (**guess**)

Da dove viene l'idea

rows 17, 17r

Esito

obsolete 2026-11-02: targets mlx-vlm generate/ar.py

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