AI & Computational Science

Output-Aware Rotation for INT2 KV-Cache Quantization

How the science connects

Attention mechanismModel compressionQuantization

AI Insight

This paper introduces OptR, a new method for compressing the key-value cache in large language models down to 2-bit integers while minimizing accuracy loss. Unlike existing approaches that optimize intermediate statistics, OptR minimizes the error in the final attention output by learning per-head orthogonal corrections through the complete quantization and attention pathway. The method shows consistent improvements over existing rotation-based quantization techniques across multiple models and benchmarks, particularly in long-context reasoning and retrieval tasks.


As large language models process increasingly long contexts, the memory required to store their key-value cache has become a critical bottleneck for deployment. This technique could significantly reduce memory usage and bandwidth requirements for serving these models, making them more practical and cost-effective for real-world applications.


Understand the Science

Attention mechanism 6 articles Explore Concept → Model compression Concept coming soon Quantization Concept coming soon

⚠️ Preprint – Noch nicht peer-reviewed

Dieser Artikel wurde noch nicht von unabhängigen Experten begutachtet. Die Ergebnisse sind vorläufig und sollten mit Vorsicht interpretiert werden.

Abstract: The key-value (KV) cache has become a major memory and bandwidth bottleneck in long-context large language model inference, making ultra-low-bit quantization increasingly important. However, existing rotation-based INT2 methods optimize cache statistics or proxy errors before the complete attention readout, even though the model is ultimately affected by the error propagated through attention and the output projection $W_O$. To address this mismatch, we propose textit{OptR}, an output-aware rotation method that minimizes post-$W_O$ attention-output error. OptR decomposes the post-$W_O$ attention-output error into key- and value-induced terms and learns per-head orthogonal corrections through the full INT2 quantization and attention path. OptR further applies an attention-equivalent key reparameterization to reduce large channel-wise offsets without changing the softmax distribution. Across three models and five reasoning and coding benchmarks, OptR consistently improves both QuaRot and OSCAR and strengthens long-context retrieval, while preserving the paged KV-cache format with negligible inference overhead.

Source: Output-Aware Rotation for INT2 KV-Cache Quantization