WUSH-KV:基于数据自适应变换的KV缓存量化

·

研究论文 · 2026/10/01

KV缓存的内存和带宽开销随上下文长度和批量大小增长,限制了高效的长上下文推理。为此,我们提出WUSH-KV用于低位KV缓存量化。它采用WUSH方法,利用矩阵乘积中两个因子的二阶统计量构建数据感知变换,以降低量化误差。WUSH-KV使用校准数据分别构建键和值的变换,其中值变换折叠进模型权重,键变换在RoPE之后应用。这些变换可与裁剪量化器配合使用。对于其中一种量化器QuEST INT,我们证明在温和假设下,WUSH变换接近最优。使用该量化器,WUSH-KV降低了逐层重建误差,并在其他测试变换中实现了最低的端到端困惑度。在端到端评估中,我们将WUSH-KV集成到SGLang中,使用OSCAR风格的分位数裁剪仿射量化。在2比特下,WUSH-KV在所有评估的模型和下游任务中表现与OSCAR变换相当或更优。

该工作通过数据自适应变换显著降低了KV缓存量化误差,在2比特下达到与OSCAR相当或更优的性能,为长上下文推理提供了高效的内存和带宽优化方案。

KV cache memory and bandwidth costs grow with context length and batch size, which limits efficient long-context inference. To address this bottleneck, we introduce WUSH-KV for low-bit KV-cache quantization. It adapts WUSH, which constructs a data-aware transform from the second-order statistics of both factors in a matrix product to reduce quantization error. WUSH-KV uses calibration data to construct separate key and value transforms, with the value transform folded into the model weights and the key transform applied after RoPE. The transforms can be paired with clipped quantizers. For one such quantizer, QuEST INT, we show that, under mild assumptions, the WUSH transform is near-optimal. With this quantizer, WUSH-KV reduces layerwise reconstruction error and achieves the lowest end-to-end perplexity among other tested transforms. For end-to-end evaluation, we integrate WUSH-KV into SGLang using OSCAR-style percentile-clipped affine quantization. At 2-bit, WUSH-KV performs comparably to or outperforms the OSCAR transform across all evaluated models and downstream tasks.

阅读原文

参与讨论