StableQAT: Stable Quantization-Aware Training at Ultra-Low Bitwidths
Tianyi Chen, Sihan Chen, Xiaoyi Qu, Dan Zhao, Ruomei Yan, Jongwoo Ko, Luming Liang, Pashmina Cameron
TL;DR
This work tackles forward–backward mismatch in quantization-aware training (QAT) at ultra-low bitwidths by introducing StableQAT, which uses a Rotated Damped Fourier Surrogate (RDFS) to model the rounding operator. By rotating the coordinate system and applying a truncated Fourier series with a tunable amplitude, RDFS yields smooth, bounded gradients that generalize STE and improve training stability without extra computational overhead. The authors provide theoretical results showing that the surrogate achieves smaller $L^2$ approximation error than STE and bounded gradient variance compared to DSQ, with an asymptotic variance limit of about $0.077$ for maximal sharpness. Empirically, StableQAT delivers stable and improved performance on large language models (LLaMA-3 series) at 2–4 bits, often surpassing FP16 baselines, while maintaining efficiency and fusion-friendliness. The approach offers a practical, scalable solution for deploying ultra-low-bit quantized models with strong stability and accuracy gains.
Abstract
Quantization-aware training (QAT) is essential for deploying large models under strict memory and latency constraints, yet achieving stable and robust optimization at ultra-low bitwidths remains challenging. Common approaches based on the straight-through estimator (STE) or soft quantizers often suffer from gradient mismatch, instability, or high computational overhead. As such, we propose StableQAT, a unified and efficient QAT framework that stabilizes training in ultra low-bit settings via a novel, lightweight, and theoretically grounded surrogate for backpropagation derived from a discrete Fourier analysis of the rounding operator. StableQAT strictly generalizes STE as the latter arises as a special case of our more expressive surrogate family, yielding smooth, bounded, and inexpensive gradients that improve QAT training performance and stability across various hyperparameter choices. In experiments, StableQAT exhibits stable and efficient QAT at 2-4 bit regimes, demonstrating improved training stability, robustness, and superior performance with negligible training overhead against standard QAT techniques. Our code is available at https://github.com/microsoft/StableQAT.
