Verba/Rapida

Esperimenti #112

The `(thread T*)&w` pointer pun in mlx-serve's K staging replaced by an `as_type` unpack: on the M3 (macOS...

done

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

Cosa è stato provato

The `(thread T*)&w` pointer pun in mlx-serve's K staging replaced by an `as_type` unpack: on the M3 (macOS 14.4) it crashes Metal's backend compiler and forces the fused hd-256 kernel off (`MLX_SERVE_FUSED_256=0`); the bisect on the laptop (`tools/local_chat/metal14/bisect-m3-2026-10-31.txt`) builds with `k_astype` alone; a precompiled metallib crashes the same backend, so no route around it; bit-identical by construction

Modello e configurazione

the M3

Guadagno atteso

the fused prefill kernel back on the M3 (first-token time, inferred)

Da dove viene l'idea

metal14 bisect

Esito

done 2026-10-31: identical, level on the M4 (paired +0.47%), kernel loads on the M3 (+1.5% prefill); M3 build 2026-10-31-r112-m14-v1

Lezione

fixing the pointer pun brings the fused prefill kernel back on macOS 14 at no cost on the M4, but on the M3 it buys only about 1.5% of prefill (0.2 s per 8k first ), so the M3's first-token time is not in this kernel; the next M3 prefill gain has to come from elsewhere (rows 109 to 111).

Adottato

no (correctness fix for the M3 build; level on the M4).

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