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 The memory where the model keeps what it has already read, so it does not recompute it for every new token. Read more through mlx-serve's own `--kv-quant` (and its `--kv-attn-mode` fused read) on the best: halves SDPA's KV bytes (The numbered revision of the quality-check procedure; results are only comparable within one version. 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% The writing phase: the model produces the reply one token at a time. Read more at 8k (inferred)
Where the idea came from
row 88p
Outcome
done 2026-11-01: invalid, smoke stopped the pair: Gemma 4's The step where each token looks back at the earlier tokens to decide what matters. Read more (`gemma4MoeAttnWith`) never calls mlx-serve's fused Storing the model's numbers with fewer bits to make it smaller and faster, at some risk to quality. Read more 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)