提出1比特训练大模型新方法,实现稳定高效压缩。
QuEST: Stable Training of LLMs with 1-Bit Weights and Activations
- 用哈达玛归一化与最小均方误差拟合实现精准快速量化
- 1比特权重和激活下仍保持模型稳定收敛且精度接近全精度
- 适合追求极致模型压缩的工程师与硬件部署研究者
降低大语言模型(LLM)计算成本的一种方法是使用量化或稀疏表示进行训练或部署。尽管后训练压缩广受欢迎,但如何通过量化感知训练(QAT)直接在低精度表示上训练出更优压缩模型的问题仍未解决。此前研究(arXiv:2411.04330)认为,在保持与标准FP16/BF16精度竞争的准确率前提下,最佳位宽为8比特。本文提出新方法QuEST,将最优位宽推进至4比特,并在1比特权重和激活下实现稳定收敛。该方法改进两个关键点:(1) 通过哈达玛归一化与最小均方误差最优拟合,实现对权重和激活连续分布的精确快速量化;(2) 提出一种新的信任梯度估计器,显式最小化量化状态下的噪声梯度与真实全精度梯度之间的误差。在Llama类架构上的实验表明,QuEST在整个支持的硬件精度范围内诱导出稳定的缩放规律,并可扩展至稀疏表示。我们提供了GPU内核支持,证明由QuEST生成的模型可高效执行。代码已开源:https://github.com/IST-DASLab/QuEST。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。