inference/research
draftmedium · 0.80updated 2026-10-03

mlx-lm PR #1584: RotatingQuantizedKVCache / BatchRotatingQuantizedKVCache

repo
This record is a draft. Not yet verified. Provisional. Treat every number on this page as provisional.

Fields

id
sources/mdl2-mlxlm-pr1584-rotating-quantized-kv
Publisher
ml-explore
Kind
repo
Accessed
2026-10-03
notes
Read 2026-10-03 via gotcha-mlx-kv-bits-crashes-on-first-request-for-hybrid-attention (noncuda-mlxlm-1573-rotating-kv-quant-nyi), which reports the fix as landed in this PR and verified by a reporter on mlx-lm 0.31.3/main and on mlx 0.32.0 for the Gemma 4 26B-A4B case. The architectural fact this PR establishes: a sliding-window layer in mlx-lm uses RotatingKVCache, a DIFFERENT CACHE CLASS from the full-attention QuantizedKVCache, and only the latter had a quantized implementation. So in this engine the choice of attention layer class (local vs global) determines the KV cache CLASS, and a feature that exists for one class silently raises NotImplementedError for the other. Same class of problem as the FlashMLA KV-format finding, in a different engine.

Notes

Read 2026-10-03 via gotcha-mlx-kv-bits-crashes-on-first-request-for-hybrid-attention (noncuda-mlxlm-1573-rotating-kv-quant-nyi), which reports the fix as landed in this PR and verified by a reporter on mlx-lm 0.31.3/main and on mlx 0.32.0 for the Gemma 4 26B-A4B case. The architectural fact this PR establishes: a sliding-window layer in mlx-lm uses RotatingKVCache, a DIFFERENT CACHE CLASS from the full-attention QuantizedKVCache, and only the latter had a quantized implementation. So in this engine the choice of attention layer class (local vs global) determines the KV cache CLASS, and a feature that exists for one class silently raises NotImplementedError for the other. Same class of problem as the FlashMLA KV-format finding, in a different engine.

Cross-references

This record references no other records.