GSRQ:面向子1-bit KV缓存的方向保持残差量化

GSRQ: Gain-Shape Residual Quantization for Sub-1-bit KV Cache

精选理由

这篇论文搞了个GSRQ新量化方法,1-bit下比VQLLM准22个点,专门解决KV缓存压缩时的方向丢失问题。

AI 摘要

GSRQ提出Gain-Shape K-means (GSKM)替代传统K-means,解决高维中欧氏质心收缩导致的方向偏差问题。在LLaMA-3-8B上,1-bit量化时LongBench平均准确率从11.34提升至33.54,比VQLLM提高22.20个百分点。该方法在保持向量方向的同时实现子1-bit压缩。

原文 · arXiv cs.LG

GSRQ: Gain-Shape Residual Quantization for Sub-1-bit KV Cache

The deployment of Large Language Models (LLMs) with extended context windows is increasingly constrained by the linear growth of Key-Value (KV) cache memory. Vector Quantization (VQ), particularly Residual Quantization (RQ), is a promising approach for pushing KV cache storage toward the sub-1-bit regime by progressively encoding residuals with small codebooks. However, most VQ methods still rely on standard $\ell_2$ $K$-means as the core codebook-learning primitive. We identify a subtle high-dimensional issue of this primitive: Euclidean centroid averaging can induce centroid shrinkage, which weakens the angular alignment term in the $\ell_2$ distortion and makes directional preservation harder. To address this issue, we propose Gain-Shape $K$-means (GSKM), a drop-in replacement for $K$-means that improves directional fidelity while matching, and in some regimes improving, $\ell_2$ distortion. We then build Gain-Shape Residual Quantization (GSRQ) by incorporating a weighted extension of GSKM into an RQ pipeline. On LLaMA-3-8B, GSRQ substantially improves over strong KV cache quantization baselines across bit rates. At 1-bit, it improves the average accuracy across LongBench tasks from 11.34 to 33.54, a gain of 22.20 percentage points over VQLLM.