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 The writing phase: the model produces the reply one token at a time. Approfondisci 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 Mixture of experts: a model made of many specialist sub-networks where only a few run per token. Approfondisci, 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 How many tokens the model writes each second once it has started. 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 A graphics card, used here as the chip that does the heavy arithmetic for a model. overlap can dwarf the per-buffer saving.
Adottato
no (decode -51%)