TL;DR
RaanA is a new post-training quantization (PTQ) framework that compresses Large Language Models (LLMs) down to ultra-low bit-widths (< 3 bits) in a matter of minutes, largely running on standard CPUs. By combining a hardware-efficient randomized vector quantization technique (RaBitQ-H) with an optimized mixed-precision bit allocation algorithm (AllocateBits), RaanA achieves state-of-the-art accuracy while requiring little to no real-world calibration data.
What Problem Does This Paper Address?
As Large Language Models grow, deploying them becomes a massive headache due to strict memory and computational constraints. Post-Training Quantization (PTQ) helps by converting high-precision floating-point weights into lower-bit representations (like 3-bit or 4-bit integers) without retraining the model from scratch.
However, dominant PTQ methods—mostly built on the Optimal Brain Quantizer (OBQ) framework—suffer from three major flaws:
- Data Hunger: They require large amounts of calibration data to accurately estimate layer-wise feature interactions (the Hessian matrix).
- Rigid Bit Allocation: They typically treat all layers equally, ignoring the fact that some layers are far more sensitive to quantization noise than others.
- Heavy Compute Costs: They often require hours or days of heavy GPU computation to compress large models.
RaanA addresses these challenges by rethinking both how weights are quantized and how bits are distributed across the model's architecture.
Methods
RaanA introduces a unified framework consisting of two novel components:
1. AllocateBits (Mixed-Precision Bit Allocation)
Instead of forcing every layer to use the exact same bit-width, AllocateBits treats quantization as a resource allocation problem. It estimates the error sensitivity ($\alpha_k$) of each layer based on the input norm and the Jacobian of the model's output. It then formulates bit allocation as a non-linear integer programming problem to minimize overall model error under a strict total bit budget.
To solve this NP-complete problem efficiently, the authors introduce a clever divide-by-GCD trick. Because LLM hidden dimensions are typically powers of 2, the greatest common divisor (GCD) of the layer sizes is very large. Dividing the budget and layer sizes by this GCD reduces the problem scale dramatically, allowing a dynamic programming algorithm to find the global optimum in just a few seconds on a CPU.
2. RaBitQ-H (Randomized Hadamard Vector Quantization)
RaanA adapts RaBitQ, a state-of-the-art vector quantization method originally designed for approximate nearest neighbor search. Standard RaBitQ applies a full random rotation to vectors to control error bounds, which requires an expensive $O(d^2)$ matrix multiplication—prohibitive for LLM weight matrices.
RaBitQ-H replaces this full random rotation with a Randomized Hadamard Transformation (RHT). RHT mimics random rotation but drops the computational complexity to $O(d \log d)$ and requires minimal storage. RaanA also incorporates optional preprocessing tricks like feature centralization and outlier exclusion (keeping the top 0.3% of extreme rows/columns at higher precision) to further stabilize accuracy.
Datasets
The authors evaluated RaanA on standard language modeling benchmarks:
- Wikitext2
- C4 (using a subset of 500 validation samples)
The framework was tested across the LLaMA and LLaMA2 families (ranging from 7B to 70B parameters) as well as the Qwen3 model family.
Key Insights and Ideas
- Zero-Shot Calibration is Viable: Because RaanA relies on the Jacobian of the model output rather than the layer-wise Hessian, its error estimation is incredibly stable. The authors found they could calibrate the model using zero real data—instead using a single synthetic sentence ("The curious fox leaped over the quiet stream...") repeated 100 times. This zero-shot approach performs nearly as well as using actual training data.
- Embracing Structural Flexibility: Traditional PTQ strictly rounds individual matrix entries. RaanA shows that by embracing vector quantization and allowing lightweight operations (like RHT) during the inference stage, you can achieve much tighter error bounds at ultra-low bit-widths.
- Hardware Independence: By shifting the bottleneck away from heavy matrix inversions to fast structural transforms, the bulk of RaanA’s quantization process can run efficiently on CPUs rather than expensive GPU clusters.
Key Results
RaanA delivers competitive perplexity scores compared to heavyweight baselines like GPTQ, AWQ, OmniQuant, and Quip#, particularly excelling in the ultra-low bit-width (< 3 bits) regime where other methods break down.
- Extreme Speed: RaanA quantized a massive LLaMA2-70B model in just 55 minutes (3293 seconds), whereas alternative high-quality methods can take up to 10 hours.
- Data Efficiency: As shown below, the performance gap between using 5 real data samples (few-shot) and a single synthetic sentence (zero-shot) is remarkably small, proving RaanA's resilience to data absence.
Limitations and Future Work
- CPU Bottleneck: Currently, the core RaBitQ step is executed on the CPU. Developing a dedicated GPU implementation for this component would accelerate the quantization process even further.
- Coarse Bit Allocation: RaanA currently allocates bits at a layer-by-layer granularity. The authors note that moving to a finer-grained allocation strategy—such as column-wise or entry-wise mixed precision—could yield even better accuracy-efficiency trade-offs.
Summary updated