Experiments #90b
The fused 8-bit KV decode read ported to Gemma 4: `gemma4MoeAttnWith` (Lesto `src/transformer.zig:31148` at...
done
What was tested
The fused 8-bit KV The writing phase: the model produces the reply one token at a time. Read more read ported to Gemma 4: `gemma4MoeAttnWith` (Lesto `src/transformer.zig:31148` at `r102`) gains the `kvAttnFusedEligible` branch the other The step where each token looks back at the earlier tokens to decide what matters. Read more paths have, for decode width at head dims 256 and 512, on a Lesto branch `row/90b`; first timing-free step: check the fused kernel's head-dim support and bit The coaching-JSON score: how closely the small model's answer matches the reference model's, from 0 to 1. against the dequantized read on the M4
Model and setup
the best
Expected gain
+4 to +7% decode at 8k (inferred from The numbered revision of the quality-check procedure; results are only comparable within one version. 88p: half the KV bytes)
Where the idea came from
row 90
Outcome
done 2026-11-02 (screen, LESTO ade9afa5): the port works (parity tests, engaged lines) but `--kv-quant 8` itself costs 23% (1k) to 30% (8k) decode on Gemma 4, and the fused read recovers none of it; fusing the sliding layers costs 46%. Closed; lesson in the README
Lesson
halving KV bytes is a decode lever only where the Storing the model's numbers with fewer bits to make it smaller and faster, at some risk to quality. Read more cache's own per-step cost is below the bytes it saves: on Lesto's Gemma 4 path an 8-bit cache costs 23% at 1k, where it saves almost nothing, so screen the quantized path's fixed cost at a short context before porting a fused read for it.
Adopted
no (screen: the 8-bit cache loses 23 to 30% decode, the fused read recovers none of it)