Abstract
Aggressive quantization of Large Language Models (LLMs) to 2-bit precision typically results in significant accuracy degradation. This failure stems from the high-rank nature of 2-bit quantization errors, which violates the low-rank assumptions of standard LoRA-based compensation methods. We present RILQ (Rank-Insensitive LoRA-based Quantization Error Compensation), a novel approach that utilizes a model-level discrepancy loss to enable cooperative error absorption across layers. By optimizing adapters globally, RILQ makes error compensation "rank-insensitive," significantly recovering accuracy for 2-bit models without increasing inference overhead.
Introduction
To deploy LLMs on resource-constrained hardware, weight quantization (e.g., to 4, 3, or 2 bits) is essential. While 4-bit and 3-bit quantization can often be mitigated using LoRA-based Quantization Error Compensation (LQEC), 2-bit quantization remains a major challenge. Existing LQEC methods, such as LoftQ, attempt to fix quantization errors locally at the weight or layer level. However, 2-bit quantization introduces errors that are inherently high-rank. Consequently, low-rank adapters lack the capacity to compensate for these errors locally, leading to a "rank jump" that causes catastrophic failure in standard compensation techniques.
Methodology: Rank-Insensitive Compensation
RILQ addresses the limitations of local compensation by shifting the optimization target from individual weights to the entire model.
Model-Level Optimization
Instead of minimizing local weight discrepancies, RILQ introduces Model-Loss, which minimizes the difference between the full-precision and quantized model's output activations at the final Transformer layer. This global perspective allows the model to distribute the "compensation workload" across all layers. If a specific module lacks the rank capacity to fix its own error, other modules can adjust their adapters to compensate.
Loss Functions
RILQ combines two primary objectives:
- Model-Loss: Aligns the final layer activations of the quantized model with the original full-precision model.
- GT-Loss: Incorporates a ground-truth causal language modeling loss to ensure the model maintains linguistic coherence and contextual relevance.
Once optimized, these LoRA adapters can be merged back into the quantized weights, ensuring zero additional latency during inference.
Key Insights
The effectiveness of RILQ stems from two main observations:
- Scope Dictates Rank Sensitivity: As the scope of error compensation broadens (from weight to layer to model), the sensitivity to the adapter's rank decreases. Global optimization allows for high-quality recovery even with very low-rank adapters.
- Cooperative Compensation: RILQ enables "rank-redundant" modules (e.g., Q-Proj) to assist "rank-critical" modules (e.g., FFN1). This collective behavior allows the network to "heal" itself more effectively than isolated local fixes.
Results and Evaluation
RILQ was evaluated across various LLM families, including LLaMA-2 (7B, 13B, 70B) and LLaMA-3-8B, using benchmarks such as WikiText-2, C4, and common-sense QA tasks.
Accuracy Recovery
Standard weight-level compensation methods like LoftQ lose over 19% average accuracy at 2-bit. RILQ significantly outperforms these baselines. Notably, RILQ with a rank of 16 outperforms standard SVD-based methods using a rank of 256, demonstrating its superior efficiency and "rank-insensitive" nature.
Efficiency and Scalability
RILQ is highly practical, with the compensation process for a LLaMA-2-7B model converging in under 40 minutes using only 256 calibration samples. It consistently improves perplexity across different model sizes and architectures, proving robust even for sensitive models like LLaMA-3.
Conclusion
RILQ provides a powerful solution for the 2-bit quantization bottleneck in LLMs. By moving beyond local error correction to a global, rank-insensitive optimization strategy, RILQ enables high-accuracy 2-bit inference on consumer-grade hardware. Future work may explore applying these principles to even lower precision levels or other parameter-efficient fine-tuning methods.
Summary updated