TORQUE: Optimizing What (not) to Quantize Before and After Rotation

Ran Ben Basat, Michael Mitzenmacher, Shay VargaftikarXiv 2026

TL;DR

TORQUE is a new quantization framework that significantly reduces reconstruction error by jointly optimizing the retention of high-precision "outlier" coordinates both before and after applying random rotations. By strategically shielding extreme values from being "smeared" across a vector during rotation and handling post-rotation spikes, TORQUE achieves up to an 86% reduction in mean squared error compared to state-of-the-art rotation-based quantizers.

What Problem Does This Paper Address?

Quantizing high-dimensional vectors—like activations or KV caches in Large Language Models (LLMs)—is essential for reducing memory and computation costs. A common technique is to apply a uniform random rotation (often via a fast Hadamard transform) before quantization. This rotation regularizes the data, making it look approximately Gaussian, which allows researchers to use pre-optimized, input-independent codebooks.

However, rotations have a major drawback: they spread the energy of large-magnitude "outlier" coordinates across the entire vector. If a vector has one massive value, the rotation "smears" that value, increasing the variance of every other coordinate and making the whole vector harder to quantize accurately. Conversely, even after rotation, the resulting distribution can still produce outliers that benefit from high-precision storage. Previous methods handled these two types of outliers in isolation; TORQUE addresses the challenge of how to jointly allocate a fixed bit budget between pre-rotation retention, post-rotation retention, and the quantization of the remaining "inlier" values.

Methods

The authors introduce TORQUE (Two-stage Outlier-retention Rotated QUantization FramEwork), which follows a specific pipeline illustrated in Figure 1:

  1. Pre-rotation Retention: The encoder identifies the $k$ largest-magnitude coordinates and stores them at high precision. These positions are zeroed out in the original vector.
  2. Rotation: The remaining vector is normalized and rotated (e.g., using a randomized Hadamard transform).
  3. Post-rotation Retention: In the rotated space, coordinates exceeding a threshold $c$ are also stored at high precision.
  4. Inlier Quantization: The remaining values are quantized using an offline-optimized codebook $Q_{c,s}$ designed for truncated Gaussian distributions.
Figure 1: Illustration of the TORQUE framework. Given an input vector x ∈Rd and a total budget of db bits, the joint optimization selects the number k of largest-magnitude coordinates to retain at high precision before rotation, the retention threshold c after rotation, and the bit budget s with a matching offline precomputed codebook Qc,s for quantizing the remaining entries.

The core innovation is a joint optimizer that selects the parameters $(k, c, s)$—where $s$ is the bit budget for inliers—to minimize a derived upper bound on the Normalized Mean Squared Error (NMSE). The authors prove that for any fixed $k$, simply picking the $k$ largest-magnitude coordinates is optimal for minimizing this error bound, which simplifies the search space significantly.

Datasets

The authors evaluated TORQUE across several machine learning workloads:

  • LLM Activations and KV-Caches: Evaluated using the Qwen2.5-0.5B model on the WikiText-2 test split.
  • Nearest-Neighbor Retrieval: Tested on the GloVe-200 index (1.18 million vectors) and the GIST-960 dataset (1 million vectors).
  • Synthetic Models: Numerical evaluations were performed using standard Gaussian and Student-$t_3$ (heavy-tailed) distributions to analyze theoretical performance.

Key Insights and Ideas

  • The "Searing" Effect of Rotations: The paper highlights that while rotations make distributions predictable, they can destroy useful structure. By keeping the largest values before rotation, TORQUE prevents a few "heavy" coordinates from inflating the quantization noise for the entire vector.
  • Complementary Stages: The two stages of retention serve different purposes. Pre-rotation retention is most effective when the input data is highly skewed (a few very large values), while post-rotation retention helps when the data is heavy-tailed (many moderately large values).
  • Efficiency through Precomputation: By using offline-optimized codebooks for truncated Gaussians, the online overhead is kept low. The parameter selection process is $O(d \log d)$, which matches the asymptotic complexity of the fast Hadamard transform itself.
  • Fractional Bit Budgets: TORQUE excels at non-integer bit budgets. It can use "leftover" bits (e.g., the 0.5 bits in a 4.5-bit budget) to store a few more high-precision outliers, leading to a much smoother accuracy-to-cost tradeoff.

Key Results

TORQUE consistently improves upon baseline quantizers like EDEN, RaBitQ, and TurboQuant:

  • Activations: Reduced NMSE by 30.8–86.2% across different baselines for the Qwen2.5 model (see Figure 2).
  • KV-Caches: Key cache NMSE decreased by up to 94.7% for RaBitQ.
  • Retrieval: On GloVe-200, TORQUE improved Recall@1 by up to 1.5 percentage points at the same bit budget.
  • Speed: While encoding time increases (roughly 1.8x to 4.3x on GPU due to the optimization step), decoding time is barely affected (only 1.1x to 1.3x increase), making it highly suitable for inference-heavy applications.
Figure 2: Qwen2.5-0.5B TORQUE improvement: (a) activations; (b) key caches; (c) value caches.

Limitations and Future Work

The primary limitation is the additional encoding latency required for online parameter optimization. While $O(d \log d)$ is theoretically efficient, the constant factors involved in sorting and evaluating candidates make the encoder slower than simple rotation-based schemes.

The authors suggest that future work could reduce this cost by:

  1. Exploiting Temporal Correlation: In training, gradients change slowly, so parameters optimized for one round might work for the next.
  2. Subsampling: Optimizing parameters based on a small sample of chunks from a large vector rather than the whole thing.
  3. Hardware Acceleration: Further fusing the kernels for sorting, rotation, and quantization to minimize memory passes.

Summary updated

BibTeX
@misc{basat2026torque,
  author = {Ran Ben Basat and Michael Mitzenmacher and Shay Vargaftik},
  title = {{TORQUE: Optimizing What (not) to Quantize Before and After Rotation}},
  year = {2026},
  eprint = {2609.36032},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.36032},
}
Figure