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

DecDEC:推进低比特 LLM 量化的系统方法

DecDEC: A Systems Approach to Advancing Low-Bit LLM Quantization

Seoul National University(首尔国立大学)

Yeonhong Park, Jake Hyun, Hojoon Kim, Jae W. Lee

AI总结:

本文提出 DecDEC 推理方案,通过将残差矩阵存于 CPU 并动态获取显著通道残差以纠正量化误差,在几乎不增加 GPU 内存和延迟开销的情况下,显著提升了低比特 LLM 的模型质量。

摘要:

大型语言模型(LLMs)的量化近期获得了广泛关注,特别是在硬件资源有限的设备端场景中。尽管高效,量化不可避免地会降低模型质量,尤其是在 3 比特和 4 比特精度等激进的低比特设置中。在本文中,我们提出了 DecDEC,这是一种推理方案,旨在提高低比特 LLM 的质量,同时保留量化的关键优势:GPU 内存节省和延迟降低。DecDEC 将残差矩阵——即全精度权重与量化权重之间的差值——存储在 CPU 中,并仅为小部分权重动态获取残差。这部分权重对应于由激活异常值标记的显著通道,获取的残差有助于纠正这些通道中的量化误差。显著通道在每个解码步骤通过分析输入激活动态识别——这使得模型能够适应激活分布的动态特性,从而最大化误差补偿的有效性。我们通过增强最先进的量化方法来证明 DecDEC 的有效性。例如,DecDEC 将 3 比特 Llama-3-8B-Instruct 模型的困惑度从 10.15 降低至 9.12——优于其 3.5 比特的对应模型——同时在 NVIDIA RTX 4050 Mobile 上仅增加了不到 0.0003% 的 GPU 内存使用量,并仅导致 1.7% 的推理减速。

英文摘要:

Quantization of Large Language Models (LLMs) has recently gained popularity, particularly for on-device settings with limited hardware resources. While efficient, quantization inevitably degrades model quality, especially in aggressive low-bit settings such as 3-bit and 4-bit precision. In this paper, we propose DecDEC, an inference scheme that improves the quality of low-bit LLMs while preserving the key benefits of quantization: GPU memory savings and latency reduction. DecDEC stores the residual matrix -- the difference between full-precision and quantized weights -- in CPU, and dynamically fetches the residuals for only a small portion of the weights. This portion corresponds to the salient channels, marked by activation outliers, with the fetched residuals helping to correct quantization errors in these channels. Salient channels are identified dynamically at each decoding step by analyzing the input activations -- this enables adaptation to the dynamic nature of activation distribution, thus maximizing the effectiveness of error compensation. We demonstrate the effectiveness of DecDEC by augmenting state-of-the-art quantization methods. For example, DecDEC reduces the perplexity of a 3-bit Llama-3-8B-Instruct model from 10.15 to 9.12 -- outperforming its 3.5-bit counterpart -- while adding less than 0.0003\% to GPU memory usage and incurring only a 1.7\% inference slowdown on NVIDIA RTX 4050 Mobile.

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

↑