arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.05003cs.LG
收藏

QuEST:使用1比特权重和激活值稳定训练LLM

QuEST: Stable Training of LLMs with 1-Bit Weights and Activations

Andrei Panferov, Jiale Chen, Soroush Tabesh, Roberto L. Castro, Mahdi Nikdan, Dan Alistarh

AI总结:

针对LLM低比特QAT难以稳定收敛的问题,本文提出QuEST,通过Hadamard归一化、MSE最优量化和信任梯度估计,实现4比特最优及1比特权重激活稳定训练。

摘要:

降低大型语言模型(LLM)高昂成本的一种方法,是在训练或部署中使用量化或稀疏表示。尽管训练后压缩方法非常流行,但如何通过直接在此类表示上训练(即量化感知训练,QAT)来获得更准确的压缩模型,仍是一个开放问题:例如,最近一项研究(arXiv:2411.04330)认为,在使用QAT训练模型并保持与标准FP16/BF16精度相当的准确率时,“最优”比特宽度为8比特权重和激活值。我们通过一种名为QuEST的新方法推进了这一最先进水平,并证明其在4比特下具有最优性,且在低至1比特权重和激活值时仍能稳定收敛。QuEST通过改进QAT方法的两个关键方面实现这一点:(1)借助Hadamard归一化和MSE最优拟合,对权重与激活值的(连续)分布进行准确且快速的量化;(2)提出一种新的信任梯度估计器,其思想是显式最小化在量化状态上计算的含噪梯度与“真实”(但未知的)全精度梯度之间的误差。在Llama型架构上的实验表明,QuEST在硬件支持的整个精度范围内产生稳定的缩放定律,并且可以扩展到稀疏表示。我们提供了GPU内核支持,表明QuEST生成的模型能够高效执行。代码可在https://github.com/IST-DASLab/QuEST获取。

英文摘要:

One approach to reducing the massive costs of large language models (LLMs) is the use of quantized or sparse representations for training or deployment. While post-training compression methods are very popular, the question of obtaining even more accurate compressed models by directly training over such representations, i.e., Quantization-Aware Training (QAT), is still open: for example, a recent study (arXiv:2411.04330) put the "optimal" bit-width at which models can be trained using QAT, while staying accuracy-competitive with standard FP16/BF16 precision, at 8-bits weights and activations. We advance this state-of-the-art via a new method called QuEST, for which we demonstrate optimality at 4-bits and stable convergence as low as 1-bit weights and activations. QuEST achieves this by improving two key aspects of QAT methods: (1) accurate and fast quantization of the (continuous) distributions of weights and activations via Hadamard normalization and MSE-optimal fitting; (2) a new trust gradient estimator based on the idea of explicitly minimizing the error between the noisy gradient computed over quantized states and the "true" (but unknown) full-precision gradient. Experiments on Llama-type architectures show that QuEST induces stable scaling laws across the entire range of hardware-supported precisions, and can be extended to sparse representations. We provide GPU kernel support showing that models produced by QuEST can be executed efficiently. Our code is available at https://github.com/IST-DASLab/QuEST.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑