← Latest papers
🤖 machine learning

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

HARP introduces a learnable, structured two-sided orthogonal processor that adapts the quantization basis to specific layers and calibration data, significantly improving the accuracy of extreme low-bit (2-4 bit) LLM quantization over fixed Hadamard methods while maintaining deployment efficiency.

Original authors: Artur Zagitov, Gleb Molodtsov, Aleksandr Beznosikov

Published 2026-05-29
📖 4 min read☕ Coffee break read

Original authors: Artur Zagitov, Gleb Molodtsov, Aleksandr Beznosikov

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a massive, incredibly detailed library (a Large Language Model) that you want to carry in your pocket. The problem is, the books are too heavy and the shelves are too wide to fit in a small bag. To make it portable, you decide to shrink the books down to tiny, compressed notes. This is called quantization.

However, when you shrink these books too much (to just 2 or 3 bits of information), a few pages get crumpled or lost. These "crumpled pages" are called outliers—extremely important numbers that are much bigger than the rest. If you try to compress the whole book using a standard method, these outliers ruin the compression, making the notes hard to read.

The Old Way: The "Random Shuffle"

Previously, scientists used a trick called RHT (Randomized Hadamard Transform). Think of this as taking all the pages of your book, shuffling them randomly, and then compressing them.

  • The Good: It's fast and spreads out the crumpled pages so they don't all get crushed in one spot.
  • The Bad: It's a fixed shuffle. It's like using the same random shuffle pattern for every single book, regardless of whether the book is a cookbook, a novel, or a dictionary. It doesn't adapt to the specific story inside.

The New Way: HARP (The "Smart Tailor")

The authors of this paper introduce HARP (Hadamard-preconditioned Adaptive Rotation Processor). Think of HARP as a smart tailor who doesn't just use a generic shuffle.

  1. It Learns the Fit: Instead of a random shuffle, HARP looks at the specific "shape" of the data in each layer of the model (like looking at the specific fabric of a shirt). It learns the perfect way to rearrange the numbers so they fit into the tiny compressed space without losing important details.
  2. It's a Drop-in Upgrade: The best part is that HARP starts out looking exactly like the old "Random Shuffle" (RHT). It's like a suit that starts as a standard off-the-rack size but has hidden zippers and adjustable seams. Once you put it on, the tailor (the calibration process) quickly adjusts the fit to be perfect for you. This means you can swap the old method for HARP without rebuilding the whole system.
  3. It's Structured and Fast: HARP doesn't just do a messy, complex rearrangement. It uses a "butterfly" pattern (a specific, efficient way of mixing things) that is mathematically guaranteed to be reversible and fast. It's like organizing a library not by randomly throwing books everywhere, but by using a highly efficient, pre-planned sorting system that takes seconds.

What Happens When You Use It?

The paper tested this on models ranging from small (1 billion parameters) to huge (70 billion parameters).

  • Better Quality: When they compressed the models to extreme sizes (2 to 4 bits), HARP made the models "smarter" (lower perplexity, higher accuracy) than the old random shuffle method. It was especially good at saving the "crumpled pages" (outliers) that usually get lost.
  • Still Fast: Even though HARP learns a custom fit, it doesn't slow down the model. In fact, the compressed models with HARP were still much faster (128 tokens per second) than the original, uncompressed models (61 tokens per second).
  • Versatile: They showed that HARP works not just with one specific compression tool, but can be swapped into different compression systems (like QTIP) and still improve them.

The Bottom Line

HARP is a tool that takes the "one-size-fits-all" random shuffle used in AI compression and turns it into a custom-tailored fit. It learns from a small sample of data to find the perfect way to rearrange the numbers before squashing them down. The result is a smaller, faster AI model that reads better and makes fewer mistakes, all without needing to retrain the entire model from scratch.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →