Verba/Rapida

Experiments #62

Gemma 4's dense MLP in three extra slots of the fused affine-4 expert kernels (PATCHED, bit-exact replay of...

done

What was tested

Gemma 4's dense MLP in three extra slots of the fused affine-4 expert kernels (PATCHED, bit-exact replay of MLX's one-row qmv): 60 fewer serialized matmul reads

Model and setup

the best (row 61)

Expected gain

+1% to +2% (**inferred** from row 61)

Where the idea came from

row 61

Outcome

done 2026-10-30: bit-exact (1,200 layers) but forward +11.5% slower (15.62 to 17.42 ms): the dense branch already overlapped the expert chain; closed without a race (`docs/experiments/2026-10-30-mac-dispatch-fusion/`)

Lesson

fusing an independent branch into a serialized chain loses the overlap MLX already gets: on the Mac, fuse only reads that sit in series, never a branch that runs beside the critical path.

Adopted

no (11.5% slower per forward; closed without a race)

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