2025-02-10 · 专家 · 自然语言处理 · 机器学习

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

QuEST是一种新的量化感知训练方法,能够在低比特精度(甚至1比特)下稳定训练大型语言模型,同时保持高精度和高效的推理性能。

更新于 2025-02-10。作者:Andrei Panferov、Jiale Chen、Soroush Tabesh、Roberto L. Castro、Mahdi Nikdan、Dan Alistarh。

中文摘要

一种降低大型语言模型(LLMs)巨大成本的方法是使用量化或稀疏表示进行训练或部署。虽然训练后压缩方法非常流行,但通过直接在这些表示上训练以获得更精确的压缩模型的问题,即量化感知训练(QAT),仍然悬而未决:例如,最近的一项研究(arXiv:2411.04330v2)将使用QAT在保持与标准FP16/BF16精度准确度相当的情况下,模型可以训练的“最优”位宽定在8位权重和激活。我们通过一种名为QuEST的新方法推进了这一领域的最新研究,它与FP16具有Pareto竞争性,即它能够在更小的模型尺寸上提供更好的准确度,同时在权重和激活中使用4位或更少的位数进行模型训练。此外,QuEST允许使用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.04330v2) 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, which is Pareto-competitive with FP16, i.e., it provides better accuracy at lower model size, while training models with weights and activations in 4-bits or less. Moreover, QuEST allows stable training with 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.

解读

一句话总结

QuEST是一种新的量化感知训练方法,能够在低比特精度(甚至1比特)下稳定训练大型语言模型,同时保持高精度和高效的推理性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源