Verba/Rapida

Experiments #90

8-bit KV cache through mlx-serve's own `--kv-quant` (and its `--kv-attn-mode` fused read) on the best...

done

What was tested

8-bit through mlx-serve's own `--kv-quant` (and its `--kv-attn-mode` fused read) on the best: halves SDPA's KV bytes ( 88p: 1.05 ms per step at 1k, 1.71 at 8k); a rounding change, so the anchored meaning read (row 71c) decides

Model and setup

the best

Expected gain

+4 to +7% at 8k (inferred)

Where the idea came from

row 88p

Outcome

done 2026-11-01: invalid, smoke stopped the pair: Gemma 4's (`gemma4MoeAttnWith`) never calls mlx-serve's fused read, so `--kv-quant 8` only dequantizes; row 90b ports the read

Lesson

an engine flag is a speed lever only on the code path the model actually runs; mlx-serve's `--kv-quant` fused read serves other model families' attention, while Gemma 4's own attention reads a dequantized dense view. Before pre-registering a flag row, find the model's call site of the feature in the engine source.

Adopted

no (invalid: the path under test never ran on Gemma 4; row 90b queued for the engine port)

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