Experiments #45
Row 44's map on mlx-serve with the KV cache at 8-bit (`--kv-quant 8`): speed pair against the same map...
done
What was tested
Row 44's map on mlx-serve with the The memory where the model keeps what it has already read, so it does not recompute it for every new token. Read more at 8-bit (`--kv-quant 8`): speed pair against the same map, then the A number measuring how different two probability distributions are; 0 means identical. The numbered revision of the quality-check procedure; results are only comparable within one version. through each server's API
Model and setup
gemma-4-26b-a4b mixed 4/8, KV 8-bit
Expected gain
+2% to +8% The writing phase: the model produces the reply one token at a time. Read more (**guess**: KV bytes at 8k)
Where the idea came from
row 44
Outcome
done 2026-10-30: decode -23.8% (interval -24.4 to -23.4), KL unchanged (API probe -0.0008 against its control); mlx-serve 26.10.3 dequantizes the whole cache per layer per step because its fused quantized-KV kernel never engaged; not adopted
Lesson
a Storing the model's numbers with fewer bits to make it smaller and faster, at some risk to quality. Read more KV cache saves bytes only where The step where each token looks back at the earlier tokens to decide what matters. Read more reads it packed: mlx-serve 26.10.3 dequantizes the whole cache per layer per step unless its fused kernel engages, which it never did on Gemma 4 at 8k (-23.8% decode); check the engine's attention path, and its log line for the packed read, before pricing a KV lever.
Adopted
no (decode -23.8%; the lever needs a packed-read attention kernel this engine does not run here)