Verba/Rapida

Esperimenti #96

The tree's MLX from 0.32.3 to 0.32.5 or main with the lab's patches re-applied: PR 4596 (TK=4 unroll in the...

screen

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

Cosa è stato provato

The tree's MLX from 0.32.3 to 0.32.5 or main with the lab's patches re-applied: PR 4596 (TK=4 unroll in the 2-pass vector SDPA, 1.04x to 1.06x at GQA 2 reported) and PR 4734 (native sliding-window SDPA, no dense mask read past the window); screen identical replies (rounding expected in SDPA)

Modello e configurazione

the best

Guadagno atteso

+1 to +3% at 8k (inferred)

Da dove viene l'idea

sweep 2026-10-31

Esito

screen done 2026-10-31 (96): ; MLX main regresses 7% / 32% / 44% at 1k / 8k / 16k through PR 4596's TK=4 at head dim 512 (TK=1 restores r102's speed); replies change for an unidentified upstream reason; not adopted

Lezione

a upstream SDPA speedup measured on other shapes (TK=4, PR 4596) costs Gemma 4 up to 44% at 16k on its head-dim-512 layers: re-screen every MLX upgrade on all of the model's head dims and context lengths before adopting it.

Adottato

no (no gain with the regression fixed; replies change for an unidentified upstream reason).

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