Verba/Rapida

Esperimenti #48

Screen of mlx-serve decode switches on the Mac best, aimed at the 5 ms of non-byte step time (rows 46, 47...

done

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

Cosa è stato provato

Screen of mlx-serve switches on the Mac best, aimed at the 5 ms of non-byte step time (rows 46, 47; code read: Gemma 4's single-token decode is closed to every fast expert arm because they require SiLU, so it runs three stock `gather_qmm`, which the source says run serialized at decode width, `src/transformer.zig:38933-38935`, `34167-34170`, `39032-39042`): `MLX_SERVE_MOE_BATCHED_DECODE=1` (take plus batched `quantized_matmul`, not bit-identical), `MLX_SERVE_DECODE_ASYNC_LADDER` 4 and 2 (bit-identical), `MLX_SERVE_STEP_TRACE=1` (build, submit, resolve per step), 10 English 8k first turns each, before and after; a switch beyond 2% of both baselines gets a paired race

Modello e configurazione

gemma-4-26b-a4b mixed 4/8 (the best)

Guadagno atteso

0 to +10% decode (**code read**)

Da dove viene l'idea

rows 46, 47

Esito

done 2026-10-30: every switch within 0.3% of the baselines; step trace build 0.55 ms, submit 15.2 ms, resolve 0.004 ms: GPU-bound, the 5 ms is kernels below bandwidth; row 49 measures each kernel's bandwidth

Lezione

on the Mac best the host builds a step in 0.55 ms and then waits 15 ms for the : decode is GPU-bound, and the switches mlx-serve exposes (batched experts, async ladder) do not move it; the next lever is the kernels' achieved bandwidth (row 49 measures it per kernel).

Adottato

no (no switch moved decode)

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