Esperimenti #30
Plain matmul-softmax-matmul for Gemma 4's head-dim-512 attention (overlay...
done
Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.
Cosa è stato provato
Plain matmul-softmax-matmul for Gemma 4's head-dim-512 The step where each token looks back at the earlier tokens to decide what matters. Approfondisci (overlay `docs/experiments/2026-10-29-mac-d512-attention/overlay/sitecustomize.py`, PATCHED mlx-vlm 0.7.10): MLX's fused kernel takes 1.78 ms for MTP's 7-token verify over 8k keys, the plain ops 0.44 ms (max abs difference 0.00098); paired The writing phase: the model produces the reply one token at a time. Approfondisci against `vlm_optiq_mtp` on the 50 sessions
Modello e configurazione
gemma-4-26b-a4b OptiQ-4bit + MTP assistant
Guadagno atteso
+8 to +15% decode (**guess**: 5 layers x 1.34 ms per verify step)
Da dove viene l'idea
rows 27, 28
Esito
done 2026-10-29: A valid experiment that did not beat the best score by more than the noise., +4.2% decode (interval +2.3 to +5.0, threshold 5%); SUSPICIOUS: reply +0.5% because the overlay also took Prefill: the model reading the whole prompt before it can write the first token. Approfondisci chunks; row 30b limits it to queries of 16 The unit of text a model reads and writes: roughly a short word or a piece of a longer one. or fewer: An experiment that beat the best score by more than the measured noise. +5.8% (interval +4.9 to +6.5), replicated +5.7%, reply -1.0 to -1.5%; meaning read owed; row 31 tries the variable on the 1-user The unmodified setup's score, the line every experiment must beat. mlx-serve, running since 15:35 (`docs/experiments/2026-10-29-mac-d512-attention/`)
Lezione
route a kernel swap only to the query lengths it was measured on: the plain path helped decode queries but slowed prefill chunks.
Adottato
no (no gain)