Introduction
Large Language Models (LLMs) are notoriously resource-hungry. For instance, Llama 3 70B requires roughly 140GB of VRAM just for standard inference. Quantization—reducing the precision of weights from 16-bit to 3 or 4 bits—is essential for practical deployment, but it inevitably introduces output errors.
Current state-of-the-art quantization methods like GPTQ and GPTAQ rely on "weight compensation." As they quantize weights column-by-column, they adjust the remaining unquantized weights to minimize the output error. However, a subtle mathematical oversight exists in this process: during the iterative compensation, these methods align the quantized output with the output of the compensated weights rather than the original full-precision weights.
This creates a "moving target" problem. The calibration baseline itself drifts as weights are updated, resulting in sub-optimal model performance, particularly at aggressive low bit-widths (e.g., 2-bit or 3-bit). By introducing a new "compensation-aware error" term that strictly aligns quantized outputs with the original full-precision model, this new approach achieves significant accuracy boosts across various LLM families with negligible computational overhead.
Rethinking the Calibration Objective
To solve the moving target problem, the authors propose a refined calibration objective that ensures the quantized model's output strictly matches the original full-precision model's output at every step.
They achieve this by decomposing the total residual error into two distinct components:
- Inter-layer error ($r1$): The error propagated from previous quantized layers. This is the primary focus of existing methods like GPTAQ.
- Compensation-aware error ($r2$): A novel term introduced in this work. It represents the discrepancy between the original full-precision weights and the compensated weights within the current layer.
Calculating these errors for every weight column in a massive model is typically computationally expensive. To bypass this, the authors leverage a neuron decomposition technique. This allows them to precompute the necessary error terms in a single pass, making the enhancement a highly efficient, "plug-and-play" module for existing frameworks. The method integrates seamlessly into both GPTQ and GPTAQ (referred to as GPTQ+Ours and GPTAQ+Ours), requiring only minimal modifications to the underlying algorithms.
Experimental Setup
The researchers evaluated their method across a broad range of models and benchmarks:
- Models: Llama 2 (7B, 13B), Llama 3 (8B, 70B), Llama 3.1 (8B), Llama 3.2 (1B), and the Qwen3 series (4B to 14B). They also tested Vision Transformers (DeiT).
- Evaluation Metrics: Perplexity on WikiText-2 and C4 datasets (lower is better).
- Zero-shot Tasks: Six downstream tasks including PiQA, ARC (Easy/Challenge), HellaSwag, Winogrande, and BoolQ (higher is better).
- Calibration: Standard 128 samples from the C4 or WikiText-2 datasets.
Key Results
The improvements are consistent and often dramatic, particularly for smaller models or lower bit-precisions. The "compensation-aware error" acts as a complementary technique; it doesn't replace the inter-layer error correction of GPTAQ, but rather adds a missing piece regarding intra-layer weight shifts.
Highlights from the results include:
- Perplexity Gains: On Llama 2-7B (3-bit), the C4 perplexity dropped significantly from 13.60 (GPTQ) to 8.34 (GPTQ+Ours).
- Accuracy Boosts: For Llama 3.1-8B-Instruct, the average zero-shot accuracy improved from 70.3% to 72.3%.
- Extreme Quantization: In challenging 2-bit settings (using rotation techniques like QuaRot), the method significantly outperformed baselines. For Llama 2-13B, it improved average accuracy from 55.8% to 58.2%.
- Generalizability: The method showed similar success on Vision Transformers, improving DeiT-Base W2A4 accuracy from 61.3% to 62.1%.
Crucially, the authors managed to implement this mathematically rigorous alignment with only a ~5% increase in quantization time and zero increase in inference time, as the changes only affect the offline calibration phase.
Limitations and Future Work
While highly effective, the method does introduce a slight memory overhead. It requires storing the original full-precision weights and an additional precomputed matrix during the calibration process. This increases peak GPU memory usage during the offline phase (e.g., from ~10GB to ~11GB for Llama 2-7B), which may be a constraint for users calibrating on very limited hardware.
Additionally, the authors noted that some rotation-based methods (like SpinQuant) can suffer from catastrophic failure at 2-bit quantization. While their proposed method mitigates this issue, it does not entirely solve it, suggesting an important avenue for future research into better rotation-weight alignment.
Summary updated