StableQAT: Stable Quantization-Aware Training at Ultra-Low Bitwidths

Tianyi Chen, Sihan Chen, Xiaoyi Qu, Dan Zhao, Ruomei Yan, Lei Xu, Luming Liang, Pashmina Cameron

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.

Introduction

To deploy Large Language Models (LLMs) and Vision Transformers (ViTs) under strict memory and compute constraints, developers often quantize them—converting high-precision weights (like 16-bit floats) into low-precision integers (like 4-bit or 2-bit). While Post-Training Quantization (PTQ) works well down to 4 bits, it typically fails at 2-3 bits. To reach these ultra-low bitwidths, models require Quantization-Aware Training (QAT), where the model is trained to adapt to the noise introduced by quantization.

However, QAT suffers from a fundamental "forward-backward mismatch." The core operation of quantization is rounding, a non-differentiable staircase function. Because rounding is flat almost everywhere and has sudden jumps, its gradient is either zero or undefined, making standard gradient-based backpropagation impossible. Historically, researchers have used two flawed workarounds: the Straight-Through Estimator (STE), which creates massive gradient mismatch, and Soft Quantizers (e.g., DSQ), which suffer from exploding gradient variance and high computational overhead.

Methodology: The Rotated Damped Fourier Surrogate

StableQAT introduces a novel way to calculate gradients during the backward pass called the Rotated Damped Fourier Surrogate (RDFS). Instead of relying on naive identity functions or expensive exponentials, RDFS uses a geometric transformation to approximate the rounding function:

  1. Coordinate Rotation: By rotating the staircase rounding function by 45 degrees, it transforms into a continuous, periodic triangle wave.
  2. Fourier Approximation: This periodic wave is approximated using a simple Fourier series. In practice, StableQAT uses only the first-order Fourier term, meaning the backward pass requires just a single, efficient cos (cosine) operation.
  3. Damping: A tunable damping amplitude ($A$) is applied to prevent the surrogate from becoming too sharp, ensuring gradients remain bounded.
StableQAT maintains bounded gradient variance even as surrogate fidelity increases, unlike previous soft quantizers (e.g., DSQ) which suffer from exploding variance.

Mathematically, STE is a special case of StableQAT where the amplitude $A$ is set to 0. By using a non-zero amplitude, StableQAT provides a provably closer $L^2$ approximation to the true rounding function. Furthermore, while traditional soft quantizers see gradient variance shoot to infinity as they sharpen to mimic hard rounding, StableQAT guarantees bounded variance, maintaining optimization stability.

Results and Performance

StableQAT was evaluated on LLaMA-3-1B and LLaMA-3-3B models across 2, 3, and 4-bit settings using datasets like SlimPajama and FineWeb-Edu.

Training Stability and Robustness

StableQAT exhibits significantly higher stability than previous methods. As shown in training logs, the framework maintains a lower and more consistent gradient norm throughout the optimization process. This stability translates to tighter performance error bars across multiple random seeds and learning rates, proving resistance to the optimization noise that typically plagues low-bit QAT.

StableQAT achieves a lower and more stable gradient norm during training compared to previous methods, leading to more robust optimization.

Efficiency and Accuracy

StableQAT matches the fast backward-pass latency of the naive STE approach while outperforming soft-quantization methods. Compared to DSQ, it achieves a 1.27x to 1.45x end-to-end training speedup because trigonometric functions like cos are more hardware-friendly on GPUs than the exp-based functions used in soft quantizers.

In terms of accuracy, StableQAT consistently outperformed both ParetoQ (state-of-the-art STE) and DSQ. At 3-bit quantization on LLaMA-3-1B, StableQAT improved average accuracy by 2.70% to 6.88% over baselines. At 4-bit, the performance even slightly surpassed the FP16 full-precision baseline in certain configurations.

Conclusion

StableQAT provides a unified and efficient framework for ultra-low bitwidth quantization. By replacing unstable approximations with a smooth, bounded, and computationally inexpensive Fourier surrogate, it enables state-of-the-art performance for LLMs and ViTs without the massive training overhead of previous methods. Future work may explore dynamic amplitude evolution to further refine optimization at the extreme 2-bit level.

Summary updated

BibTeX
@misc{chen2026stableqat,
  author = {Tianyi Chen and Sihan Chen and Xiaoyi Qu and Dan Zhao and Ruomei Yan and Lei Xu and Luming Liang and Pashmina Cameron},
  title = {{StableQAT: Stable Quantization-Aware Training at Ultra-Low Bitwidths}},
  year = {2026},
  eprint = {2601.19320},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.19320},
}
Figure