NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Gradient-Based Post-Training Quantization: Challenging the Status Quo

Edouard Yvinec, Arnaud Dapogny, Kevin BaillyarXiv 2023 · DOI

Introduction

As neural networks continue to expand in scale, the necessity for efficient deployment on edge devices has driven the development of quantization techniques. Converting 32-bit floating-point weights into low-bit fixed-point integers (e.g., 4-bit) is essential for reducing memory footprint and latency. While Quantization-Aware Training (QAT) offers high accuracy, its computational cost is often prohibitive for Large Language Models (LLMs). Gradient-Based Post-Training Quantization (GPTQ) has emerged as a compelling middle ground, utilizing a small calibration dataset to optimize weight rounding. However, many design choices in GPTQ have historically relied on heuristics. This paper provides a systematic evaluation of these choices, challenging the status quo and establishing new best practices.

Methodology and Best Practices

The authors conduct extensive ablation studies across architectures such as ResNet, MobileNet, and Vision Transformers (ViT) to identify the drivers of quantization performance. Key methodological shifts include:

  • Optimizer Selection: Replacing the standard Adam optimizer with AdaMax. The authors find that AdaMax's use of the $L_\infty$ norm provides better stability against the noisy gradients inherent in rounding operations.
  • Loss Formulation: Evaluating various loss functions ($l_1, l_2$, KL divergence). Results indicate that sensitivity to the loss function varies by architecture, with KL divergence showing significant promise for certain models.
  • Importance-Based Mixed-Precision: A novel scheme that utilizes first and second-order gradient statistics to determine neuron sensitivity. This allows for assigning higher bit-widths to critical neurons while maintaining a target average bit-width, achieving performance gains with minimal computational overhead.

Data Robustness and Distribution Shifts

A central finding of this research is the surprising robustness of GPTQ to the choice of calibration data. Conventional wisdom suggests that calibration data must closely match the target distribution. However, the authors demonstrate that GPTQ methods like AdaRound and BrecQ maintain high performance even when calibrated on out-of-distribution (OOD) data, adversarial examples, or even white noise.

Table 1: Performance of AdaRound and BrecQ across various calibration datasets, demonstrating robustness to distribution shifts.

As shown in the results above, even extreme shifts—such as using white noise for a model trained on ImageNet—result in relatively minor accuracy degradations compared to the baseline. This suggests that the optimization process is learning fundamental rounding properties rather than overfitting to specific data features.

Key Results

Implementing the proposed best practices leads to substantial accuracy improvements:

  • Vision Transformers (ViT): 4-bit quantization accuracy improved from 31.2% to 38.0% (+6.8 points).
  • ResNet-50: Accuracy increased by +3.7 points.
  • MobileNet V2: Despite being notoriously difficult to quantize, the model saw a +3.0 point improvement.

Furthermore, the importance-based mixed-precision scheme allows AdaRound to achieve competitive results with more complex methods like BrecQ, while only increasing processing time by approximately 3.2%.

Limitations and Computational Overhead

Despite these advancements, challenges remain regarding the scalability of gradient-based optimization. As model size increases, the time required for calibration grows significantly.

Figure 1: Optimization duration across different architectures, highlighting the increased computational cost for large-scale models like ViT-H.

For instance, the optimization duration for large-scale Vision Transformers (e.g., ViT-H) can exceed 10 hours, as illustrated in the scaling trends. Future research is needed to streamline these optimization processes for the next generation of massive models. Additionally, while weight quantization has seen significant progress, activation quantization remains a critical hurdle due to the sensitivity of activations to outliers.

Conclusion

This work provides a rigorous "sanity check" for GPTQ, debunking myths regarding data dependency and identifying superior optimization strategies. By adopting AdaMax and importance-based mixed-precision, practitioners can achieve high-accuracy 4-bit models that are robust to real-world data variations.

Summary updated

BibTeX
@misc{yvinec2023gradient,
  author = {Edouard Yvinec and Arnaud Dapogny and Kevin Bailly},
  title = {{Gradient-Based Post-Training Quantization: Challenging the Status Quo}},
  year = {2023},
  eprint = {2308.07662},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.07662},
}
Figure