Paper 2605.17757

OSCAR: Offline Spectral Covariance-Aware Rotation for 2-bit KV Cache Quantization

Published
May 2026
Research lab
Together AI
Citations
2
GitHub
555 stars

01 In brief

Summary

OSCAR is an INT2 KV-cache quantization method that uses attention-aware covariance structures, estimated offline, to derive fixed rotations and clipping thresholds, aligning quantization with downstream attention.

It composes rotations as R = U · H_Had · P_br, where U is the eigenbasis of query-aware (Q^T Q) or score-aware (V^T S^T S V) covariance, H_Had is a Hadamard transform, and P_br is a bit-reversal permutation.

The system integrates into SGLang with a custom INT2 attention kernel, keeping sink and recent tokens in BF16 while quantizing history tokens.

Evaluations on Qwen3-4B-Thinking-2507, Qwen3-8B, Qwen3-32B, and GLM-4.7-FP8 (358B) show OSCAR reduces the BF16 accuracy gap to 3.78 and 1.42 points on the first two models, while naive INT2 collapses.

On RULER-NIAH up to 128K, OSCAR remains robust, unlike QuaRot-INT2.

System-wise, OSCAR reduces KV-cache memory by ~8x, improves throughput by up to 7x at large batch sizes, and accelerates batch-size-1 decoding by up to 3x over BF16.

Ablations confirm the importance of attention-aware targets, Hadamard, and bit-reversal, with optimal sink/recent windows at (64, 256).

02 From the paper

Abstract

INT2 KV-cache quantization is attractive for long-context LLM serving, but it remains difficult to make both accurate and deployable. Simple rotations such as Hadamard transforms reduce outliers, but still degrade at INT2 because they are not aligned with downstream attention. We propose OSCAR, an Ultra-low-bit KV Cache quantization method that estimates attention-aware covariance structures offline and uses them to derive fixed rotations and clipping thresholds for quantization. In this way, it aligns KV quantization with the covariance structures that attention actually consumes. More importantly, we not only provide theoretical justification but also develop a fully deployable OSCAR system with a custom INT2 attention kernel that remains compatible with paged KV-cache serving and fused kernel pipelines, enabling seamless integration into modern LLM serving frameworks such as SGLang and vLLM. We evaluate our methods on recent reasoning models with reasoning traces of up to 32k tokens across 5 tasks. On Qwen3-4B-Thinking-2507 and Qwen3-8B, OSCAR reduces the BF16 accuracy gap to 3.78 and 1.42 points, respectively, while naive rotation INT2 collapses to nearly zero. We further scale OSCAR to Qwen3-32B and GLM-4.7 (358B params), where it remains effectively on par with BF16. On long context - RULER-NIAH up to 128K, OSCAR remains robust on both Qwen3 models, while naive rotation INT2 collapses. System-wise, OSCAR reduces KV-cache memory by approximately 8x, improves throughput by up to 7x at large batch sizes under the same memory budget, and accelerates batch-size-1 decoding by up to 3x over BF16 due to reduced memory bandwidth overhead.