Verba/Rapida

Experiments #51

Gemma 4's experts on mlx-serve's fused affine-4 decode kernels (PATCHED: the SiLU-only epilogue gets a...

done

What was tested

Gemma 4's experts on mlx-serve's fused affine-4 kernels (PATCHED: the SiLU-only epilogue gets a GELU-tanh table flag, `src/moe_affine4.zig`), two dispatches per layer instead of three `gather_qmm` plus the activation and the sum; unit test, then an alternating A/B screen on the best, then a race

Model and setup

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

Expected gain

+3% to +6% decode (**code read**, row 49 kernel rates)

Where the idea came from

rows 49, 50

Outcome

done 2026-10-30: +3.5% decode [+3.4, +3.6] on the 50 sessions, API +0.0008; replication row 51r2 and the meaning read running

Lesson

mlx-serve's fused 4-bit kernels opened to Gemma 4's GELU-tanh give +3.5% decode on the 50 sessions at an API KL change of +0.0008: an engine's fast path closed to one activation is a cheap patch worth the build.

Adopted

no (meaning read pass; pending the flipped-order replication, row 51r2)

Want to see what these experiments produced? Lesto, the Gemma 4 inference engine for Apple silicon Macs, is on lestoengine.com

Made by Federico Andrioli, @fedeandri on X A research lab's own measurements, generated from its files. Data built