Verba/Rapida

Experiments #90d

Fused 8-bit KV cache write: one kernel a layer that quantizes the new K and V and writes values, scales and...

done

What was tested

Fused 8-bit write: one kernel a layer that quantizes the new K and V and writes values, scales and biases into the cache, in place of `affine_quantize` plus six copies each (14 dispatches a layer, 420 a step, row 90c's trace); a Lesto row branch, bit-identical to the current write; then 8-bit against dense on the 50 sessions, lossy (row 90c's read passed)

Model and setup

the best with `--kv-quant 8`

Expected gain

write path 3.9 ms at 1k and 5.3 at 8k a step today; 8-bit KV's bytes about 116 MB at 1k and 186 MB at 8k (arithmetic, row 90c)

Where the idea came from

row 90c

Outcome

done 2026-11-12: , -0.40% [-0.44, -0.37] 8-bit against 8-bit, 150 of 150 identical (`mac/90d/1`); the write is not 8-bit's cost on the sessions (61.5 against the dense best's 88.0 ); row 90e profiles it (`2026-11-07-mac-reopened-rows`)

Lesson

a fused 8-bit KV write that removes 13 of 14 write dispatches a layer is bit-identical (150 of 150) and changes decode by -0.4%: on the sessions, 8-bit KV's 30% decode cost against the dense best is not the cache write, so row 90c's split misattributed it.

Adopted

no (no gain on the pre-registered rule; neither arm is the best; row 90e profiles where the 8-bit step's time goes)

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