Verba/Rapida

Experiments #155c

Split the warm prefill chunk forward's fixed 93.9 ms (row 155: the KV eval at `src/generate.zig:2011` on...

done

What was tested

Split the chunk forward's fixed 93.9 ms (row 155: the KV eval at `src/generate.zig:2011` on /155 0abd5601 is the whole chunk forward, intercept 93.9 ms plus 1.31 ms a new over 100 warm turns): a Metal counter trace of one warm chunk at about 64, 300 and 1,000 new tokens on the best, weight bytes read and kernel time per layer kind ( experts, dense, ), to tell a weight-read floor (a ~300-token chunk routing to most experts) from per-dispatch overhead; a fix row is designed only from that split

Model and setup

the warm prefill forward

Expected gain

sizes up to about -2% per-turn reply if half the fixed part goes (inferred)

Where the idea came from

row 155

Outcome

done 2026-11-23 (read-rows): line not read as pre-registered (the plain chunk eval wall fit 213.0 ms, outside 60 to 130): chunks of 1,024 new tokens or more keep the MoE prefill's every-4-layer blocking eval inside the build (`src/transformer.zig:8566-8570` on ad92eae5), so their eval wall held only the forward's tail; read after the numbers, the 12 warm chunks under 1,024 fit about 70 ms of time, 4 ms host-exposed, MoE expert matmuls about 43 ms; row 155d tests that (`2026-11-21-mac-r155c-prefill-forward-split/README.md` ยง Result)

Lesson

a stamp pair that brackets a blocking eval measures the forward only when nothing inside the forward blocks; on Lesto's MoE prefill a chunk of 1,024 tokens or more evals every 4 layers inside the build, so a fit over chunk lengths must use the chunk's start to its eval (the span), or keep every point under 1,024. On warm chunks under 1,024 the fixed part read after the fact is about 70 ms of GPU time with 4 ms host-exposed, MoE expert matmuls the largest part (row 155d tests it).

Adopted

no (a diagnostic; its pre-registered line was not read; row 155d queued)

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