arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.01901cs.LGcs.AI
收藏

通过量化后积分识别敏感权重

Identifying Sensitive Weights via Post-quantization Integral

Tsinghua University(清华大学)

Yuezhou Hu, Weiyu Huang, Zichen Liang, Chang Chen, Jintao Zhang, Jun Zhu, Jianfei Chen

AI总结:

针对LLMs部署成本高及现有量化敏感度指标不准确的问题,提出量化后积分(PQI)准确估计后验敏感度,并基于此构建ReQuant框架,显著提升了最先进训练后量化方法的性能。

摘要:

部署大型语言模型(LLMs)成本高昂。然而,训练后权重量化可以通过压缩模型大小以适应有限内存,并节省带宽以加速推理,从而解决这一问题。由于并非所有权重维度都同等重要,这些方法通常依赖于敏感度指标,该指标表示权重对损失函数的逐元素影响,用于预处理原始权重以实现更好的量化。在这项工作中,我们对敏感度指标的准确性进行了实证研究,发现现有的基于梯度和Hessian矩阵的指标非常不准确:它们将量化对损失函数的影响低估了几个数量级,这主要是由于局部二阶近似的收敛半径较小,即Taylor公式中的梯度和Hessian项。为了解决这个问题,我们提出了量化后积分(PQI),这是一种以细粒度方式估计后验敏感度的准确指标。为了利用这一准确指标,我们进一步提出了ReQuant,一个简单但强大的框架,主要包含两个稠密与稀疏分离组件:自适应异常值选择和逐步显著权重分离。结果显示,ReQuant提升了最先进的训练后量化方法,在使用QTIP的Llama 3.2 1B上实现了2.66的困惑度提升。

英文摘要:

Serving Large Language Models (LLMs) is costly. However, post-training weight quantization can address this problem by both compressing their sizes for limited memory and saving bandwidth for acceleration. As not all weight dimensions are equally important, those methods typically rely on a sensitivity metric, which indicates the element-wise influence of weights on loss function and is used to preprocess original weights for better quantization. In this work, we conduct an empirical study on the accuracy of the sensitivity metric, and find that existing gradient and Hessian based metrics are very inaccurate: they underestimate quantization's impact on the loss function by orders of magnitude, mainly due to the small convergence radius of local 2nd order approximation, \ie, gradient and Hessian term in Taylor's formula. To tackle this problem, we propose Post-quantization Integral (PQI), an accurate metric to estimate posterior sensitivity in a fine-grained manner. To leverage this accurate metric, we further propose ReQuant, a simple yet powerful framework that mainly consists of two Dense-and-Sparse detach components: self-adaptive outlier selection and step-wise significant weights detach. Results show that ReQuant boosts state-of-the-art post-training quantization methods, with a pronounced improvement of 2.66 perplexity gain on Llama 3.2 1B with QTIP.

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

↑