SMAQ: Workload-Aware Vector Quantization for KV Cache Compression

KV-cache compression is increasingly constrained not only by storage budget but by how quantization error perturbs downstream attention logits. Existing preprocessing-based methods typically apply orthogonal transforms before quanti- zation, motivated by improved coordinate marginals. We show that this intuition breaks down for fully adaptive block vector quantizers: once the codebook is learned in the transformed space, orthogonal preprocessing alone does not improve the optimal distortion. We therefore study KV quantization through the down- stream logit objective and derive a query-aware metric from the calibration query covariance. While the induced Mahalanobis geometry is optimal in the high-rate limit, it becomes unstable at low bitrate because extreme eigenvalue spreads over- concentrate codebook capacity along a few dominant directions. We address this failure mode with Spectral Metric-Aware Quantization (SMAQ), which applies log-compressed spectral shaping to the query covariance before quantization, pre- serving task-relevant anisotropy while regularizing the effective condition number. On offline TinyLlama-1.1B KV traces with 8D blocks and 256 centroids, SMAQre- duces held-out logit MSE by 5.2%–14.1% across tested layers, with an 8.3% mean reduction over standard vector quantization, while orthogonal baselines yield no measurable gain under the same adaptive codec. We further validate SMAQ end- to-end on production-scale models via an MLX autoregressive caching framework: on Qwen3.5-9B with offline-calibrated Σq , folding the SMAQ metric into Turbo- Quant’s orthogonal codec achieves 10.81 perplexity (vs. 10.48 uncompressed) at 4.83×compression, closing the perplexity gap by 97% relative to prompt-time dynamic calibration. Cross-architecture validation on Gemma-4-E4B confirms stability across sliding-window and KV-shared attention topologies. Additional appendix experiments on synthetic condition-ratio sweeps, an expanded TinyL- lama layer study, and Qwen2.5-0.5B support the same qualitative conclusion. We position SMAQas a calibrated, workload-aware compression method particularly well suited to vertical deployments with stable query distributions.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-03-31
DOI
https://doi.org/10.5281/zenodo.19342143
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

SMAQ: Workload-Aware Vector Quantization for KV Cache Compression

GAURAV SAINI
Zenodo (CERN European Organization for Nuclear Research)
Parallel Computing and Optimization Techniques
article

SMAQ: Workload-Aware Vector Quantization for KV Cache Compression

GAURAV SAINI
article en

Abstract

KV-cache compression is increasingly constrained not only by storage budget but by how quantization error perturbs downstream attention logits. Existing preprocessing-based methods typically apply orthogonal transforms before quanti- zation, motivated by improved coordinate marginals. We show that this intuition breaks down for fully adaptive block vector quantizers: once the codebook is learned in the transformed space, orthogonal preprocessing alone does not improve the optimal distortion. We therefore study KV quantization through the down- stream logit objective and derive a query-aware metric from the calibration query covariance. While the induced Mahalanobis geometry is optimal in the high-rate limit, it becomes unstable at low bitrate because extreme eigenvalue spreads over- concentrate codebook capacity along a few dominant directions. We address this failure mode with Spectral Metric-Aware Quantization (SMAQ), which applies log-compressed spectral shaping to the query covariance before quantization, pre- serving task-relevant anisotropy while regularizing the effective condition number. On offline TinyLlama-1.1B KV traces with 8D blocks and 256 centroids, SMAQre- duces held-out logit MSE by 5.2%–14.1% across tested layers, with an 8.3% mean reduction over standard vector quantization, while orthogonal baselines yield no measurable gain under the same adaptive codec. We further validate SMAQ end- to-end on production-scale models via an MLX autoregressive caching framework: on Qwen3.5-9B with offline-calibrated Σq , folding the SMAQ metric into Turbo- Quant’s orthogonal codec achieves 10.81 perplexity (vs. 10.48 uncompressed) at 4.83×compression, closing the perplexity gap by 97% relative to prompt-time dynamic calibration. Cross-architecture validation on Gemma-4-E4B confirms stability across sliding-window and KV-shared attention topologies. Additional appendix experiments on synthetic condition-ratio sweeps, an expanded TinyL- lama layer study, and Qwen2.5-0.5B support the same qualitative conclusion. We position SMAQas a calibrated, workload-aware compression method particularly well suited to vertical deployments with stable query distributions.

Zenodo (CERN European Organization for Nuclear Research)
Decent work and economic growth
Openalex Percentile: Top 21%
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

SMAQ: Workload-Aware Vector Quantization for KV Cache Compression — GAURAV SAINI · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS