Experiments #110
The existing fused expert reduce extended to Gemma 4's prefill shape (`transformer.zig:45185` engages only...
not
What was tested
The existing fused expert reduce extended to Gemma 4's Prefill: the model reading the whole prompt before it can write the first token. Read more shape (`transformer.zig:45185` engages only for two other models): bit-exact against take, multiply and sum
Model and setup
the best
Expected gain
at most about -0.2 s per 8k first The unit of text a model reads and writes: roughly a short word or a piece of a longer one. (-2%; traffic estimate inside row 109's 1.45 s Mixture of experts: a model made of many specialist sub-networks where only a few run per token. Read more gap, not additive if 109 fuses the reduce; row 106)
Where the idea came from
row 107
Outcome
not started; premise confirmed in Lesto 2026-11-02: `expertReduceApply` (`src/transformer.zig:43757` at strip-4) accepts only (top_k, hidden) = (10, 2560) or (8, 4096), so Gemma 4 A Gemma 4 mixture-of-experts model: 26 billion parameters in total, about 4 billion active per token.'s (8, 2816) declines and its prefill runs the unfused reduce; to be stacked with rows 109, 111 and 105c as one lossless prefill pair; code done 2026-11-02: LESTO row/110 `8a6a7dc` (from strip-4) admits (8, 2816) behind `MLX_SERVE_R110_OFF`, the config cache key now includes hidden (An independent check of the work by a different AI model, to catch mistakes the main one might share with itself.), and the bit-identity test passed on the M4 at four shapes up to an 8192-token chunk (row110build, 2/2 tests); waits for the stacked pair