HARP: Hadamard-Preconditioned Adaptive Rotation Processor for Extreme LLM Quantization

Artur Zagitov, Gleb Molodtsov, Aleksandr BeznosikovarXiv 2026

TL;DR

This paper introduces HARP, a novel adaptive rotation processor that significantly improves the performance of extreme low-bit quantization for Large Language Models (LLMs). By learning layer-specific orthogonal transformations, HARP achieves better accuracy and efficiency compared to existing fixed methods, while remaining compatible with popular quantization pipelines.

What Problem Does This Paper Address?

Deploying LLMs efficiently, especially on resource-constrained devices, is a major challenge. Quantization, which reduces the precision of model weights and activations, is a key technique to address this. However, extreme low-bit quantization (2-4 bits) is highly sensitive to outliers and the complex curvature of model weights. Existing methods like Randomized Hadamard Transforms (RHTs) offer a generic solution by applying fixed orthogonal transformations, but they fail to adapt to the specific characteristics of each layer, the calibration data, or the downstream quantizer. This leads to suboptimal performance, particularly at very low bitwidths. HARP aims to bridge this gap by introducing an adaptive, learnable orthogonal transformation that preserves the efficiency of RHTs while significantly boosting quantization quality.

Methods

HARP introduces a "Hadamard-preconditioned Adaptive Rotation Processor" (HARP) that acts as a learnable, structured, two-sided orthogonal processor. Instead of fixed RHTs, HARP uses a product of sparse, "butterfly-like" block-orthogonal stages. This structure allows for efficient computation, similar to RHTs, while enabling adaptivity. Key aspects of HARP include:

  • Adaptive Rotations: HARP learns orthogonal transformations (U and V matrices) for each layer, adapting to the layer's specific weight and curvature properties.
  • Structured Parameterization: The learned rotations are decomposed into a sequence of smaller, structured orthogonal blocks, making them computationally feasible for LLM dimensions. This is achieved using a Mixed-Radix schedule.
  • Hadamard Preconditioning: HARP is initialized to recover the RHT processor. This provides a strong baseline and makes fitting easier by allowing HARP to learn a refinement around a good initial transformation.
  • Layerwise Fitting: HARP is trained using only calibration data, optimizing a surrogate loss function that aligns with the downstream quantizer's objective. This avoids the need for full model retraining.
  • Drop-in Replacement: HARP is designed to be a drop-in replacement for fixed RHT preprocessing within existing quantization pipelines like QuIP#.

Datasets

The paper uses the following datasets for evaluation:

  • Wikitext2: A standard benchmark for language modeling perplexity.
  • C4: Another large-scale dataset for language modeling perplexity.
  • ARC-Challenge, ARC-Easy, PIQA, WinoGrande: Datasets used for evaluating zero-shot accuracy on various tasks.

The calibration data used for fitting HARP is derived from the RedPajama 1T dataset.

Key Insights and Ideas

  • Adaptivity is Crucial for Extreme Quantization: The paper strongly suggests that fixed, generic transformations like RHTs are insufficient for achieving optimal performance at very low bitwidths. Learning layer-specific rotations is key to mitigating the impact of outliers and weight anisotropy.
  • Orthogonal Transformations Preserve Model Integrity: By using strictly orthogonal transformations, HARP ensures that the full-precision model's behavior is preserved, which is a significant advantage over non-orthogonal methods that can alter the model's function.
  • Structured Rotations Balance Expressivity and Efficiency: Decomposing learned rotations into structured stages (like butterfly operations) allows HARP to be expressive enough to adapt to layer characteristics while maintaining computational efficiency comparable to RHTs.
  • Initialization Matters: Preconditioning HARP with RHT provides a strong starting point, making the learning process more stable and effective, especially in challenging low-bit scenarios.

Key Results

  • Perplexity Improvements: HARP consistently improves perplexity over fixed RHT across various LLMs (Llama 3.2, Llama 2) and bitwidths (2-4 bits), with the largest gains observed at 2 bits. For example, on Llama 2 7B at 2-bit, HARP reduces perplexity from 7.61 to 7.23 on C4.
  • Zero-Shot Accuracy Gains: HARP also leads to improvements in zero-shot accuracy on tasks like ARC-Challenge, indicating that the learned rotations benefit downstream model capabilities.
  • Efficiency Preservation: HARP preserves most of the throughput advantage of RHT. For instance, FP16 achieves 128 tok/s, while HARP at 2-bit achieves 128 tok/s compared to RHT's 142 tok/s.
  • Compact Storage: HARP parameters can be stored compactly using int8 quantization with minimal impact on perplexity.
  • Backend Portability: HARP demonstrates compatibility with other quantization pipelines like QTIP, showing its potential as a general-purpose incoherence processor.

Limitations and Future Work

  • Calibration Cost: HARP introduces a one-time calibration cost that is larger than applying a fixed RHT. While refreshing the target less frequently can reduce this overhead, improving calibration efficiency remains an open direction.
  • Weight-Only Focus: The current evaluation focuses on weight-only PTQ. Extending HARP to handle activation rotations within a weight-activation quantization framework is a promising avenue for future work.
  • Integration with Fine-tuning: While HARP is shown to be compatible with fine-tuning stages, further exploration of optimal fine-tuning schedules in conjunction with HARP could yield additional gains.

Summary updated

BibTeX
@misc{zagitov2026harp,
  author = {Artur Zagitov and Gleb Molodtsov and Aleksandr Beznosikov},
  title = {{HARP: Hadamard-Preconditioned Adaptive Rotation Processor for Extreme LLM Quantization}},
  year = {2026},
  eprint = {2605.29843},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.29843},
}
Figure