Verba/Rapida

Experiments #149v

Per-kernel GPU time of the best's decode step by label, not position: the probe names each command buffer...

done

What was tested

Per-kernel time of the best's step by label, not position: the names each command buffer after the kernels it encodes (`MTLCommandBuffer` label), so the Metal trace carries the name; one primitive per buffer as row 149, plus an empty-kernel calibration of the per-buffer start cost; 1k and 8k

Model and setup

the best

Expected gain

ranks every kernel for the next engine rows; settles row 149's SUSPICIOUS attribution

Where the idea came from

row 149

Outcome

done 2026-11-12: by label, half the step is the 121 dense matvecs (5.2 ms), all of 8k's extra 0.83 ms is the 5 global layers' (235 us at 1k, 1,018 us at 8k, about 157 GB/s); rows 149g and 149q (`2026-11-12-mac-decode-profile-r147`)

Lesson

labelled command buffers attribute the best's decode step without guesswork: half of it is the 121 dense quantized matvecs (5.2 ms), a third the kernels, and all of 8k's extra 0.83 ms is the 5 global layers' attention (235 us at 1k, 1,018 us at 8k), which reads its KV at about 157 GB/s, well under the bandwidth ceiling.

Adopted

no (a diagnostic)

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