Verba/Rapida

Experiments #105c

No mid-loop prefill eval cadence for forwards whose transients are small (a warm turn's few-hundred-token...

done

What was tested

No mid-loop eval cadence for forwards whose transients are small (a turn's few-hundred-token prefill), in `forwardMoeWith` (`src/transformer.zig:27665`, `PREFILL_EVAL_MIN_SEQ` and `prefillEvalCadenceFor`); lossless (same graph, fewer eval points: identical replies by hash); then the pair at the default limit, then with `MLX_MAX_MB_PER_BUFFER=100000` (row 105a's +2.3% without its warm loss)

Model and setup

the best

Expected gain

-1 to -3% (inferred: 0.026 to 0.038 s of host waits per warm turn at 50 MB, the 105a warm loss at 100000 MB)

Where the idea came from

row 105b

Outcome

done 2026-11-02: reply -1.1% [-1.4, -0.9], decode +0.3% [+0.2, +0.4] (`mac/105c/1`, on decode), 150 of 150 identical, LESTO bd2ebd17; not adopted, kept to stack; the 100000 MB variant needs the expansion bill first (+2.2 GB per 1000-token forward, check105c)

Lesson

removing a memory-bounding eval cadence from short forwards is lossless (150 of 150 replies) and costs no memory at MLX's default 50 MB command buffers, but at 100000 MB the same change keeps about 2.2 GB more alive per 1000-token forward, because a command buffer holds its inputs until it completes: an eval point is also a memory point, so a change that removes one is checked at every buffer limit it will run under.

Adopted

no (decode +0.3% under the 0.4% threshold; kept on Lesto `row/105c` to stack with the next lossless fixes)

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