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.


翻译:量化感知训练(QAT)对于在严格的内存和延迟约束下部署大型模型至关重要,然而在超低位宽下实现稳定且鲁棒的优化仍然具有挑战性。基于直通估计器(STE)或软量化器的常见方法通常存在梯度失配、不稳定性或高计算开销等问题。为此,我们提出了StableQAT,一个统一且高效的QAT框架。该框架通过对舍入算子进行离散傅里叶分析,推导出一种新颖、轻量且理论依据充分的替代反向传播方法,从而稳定了超低位设置下的训练。StableQAT严格地将STE推广为一种特例,属于我们更具表达力的替代函数族,其产生的梯度平滑、有界且计算成本低,从而在各种超参数选择下提升了QAT的训练性能和稳定性。在实验中,StableQAT在2-4位量化区间内展现出稳定高效的QAT性能,相比标准QAT技术,在训练开销可忽略不计的情况下,表现出更高的训练稳定性、鲁棒性以及更优的性能。我们的代码可在 https://github.com/microsoft/StableQAT 获取。

0
下载
关闭预览

相关内容

【ACL2024】语言模型对齐的不确定性感知学习
专知会员服务
25+阅读 · 2024年6月10日
【Google】平滑对抗训练,Smooth Adversarial Training
专知会员服务
49+阅读 · 2020年7月4日
可解释强化学习,Explainable Reinforcement Learning: A Survey
专知会员服务
132+阅读 · 2020年5月14日
【学界】虚拟对抗训练:一种新颖的半监督学习正则化方法
GAN生成式对抗网络
10+阅读 · 2019年6月9日
超全总结:神经网络加速之量化模型 | 附带代码
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
【ACL2024】语言模型对齐的不确定性感知学习
专知会员服务
25+阅读 · 2024年6月10日
【Google】平滑对抗训练,Smooth Adversarial Training
专知会员服务
49+阅读 · 2020年7月4日
可解释强化学习,Explainable Reinforcement Learning: A Survey
专知会员服务
132+阅读 · 2020年5月14日
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员