Verba/Rapida

Esperimenti #73

Fewer Metal command buffers per decode step: the best with `MLX_MAX_OPS_PER_BUFFER=1000` and...

done

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

Cosa è stato provato

Fewer Metal command buffers per step: the best with `MLX_MAX_OPS_PER_BUFFER=1000` and `MLX_MAX_MB_PER_BUFFER=2048` (M4 Pro defaults 40 ops / 40 MB; MLX issue 4521: +5% to +13.7% on , bit-identical): race on the 50 sessions plus a hash check

Modello e configurazione

the best

Guadagno atteso

about +6% decode (**inferred** from about 20 us per boundary)

Da dove viene l'idea

sweep 2026-10-30 mac-bytes, row 68

Esito

done 2026-10-30: loss, decode 32.9 against 67.2 at 1000 ops / 2048 MB (race stopped after 68 rows); sweep of moderate limits in row 73b

Lezione

raising MLX's command-buffer limits to one buffer per decode step halved mlx-serve's decode on the M4 Pro (32.9 against 67.2 tok/s), the opposite of the +5% to +14% reported on Ultra and Max MoE: a setting measured on other chips is a hypothesis, and the cost of losing CPU and overlap can dwarf the per-buffer saving.

Adottato

no (decode -51%)

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