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

是什么让大型语言模型的量化变得困难?一项来自扰动视角的实证研究

What Makes Quantization for Large Language Models Hard? An Empirical Study from the Lens of Perturbation

Peking University(北京大学);Meituan(美团);Renmin University of China(中国人民大学)

Zhuocheng Gong, Jiahao Liu, Jingang Wang, Xunliang Cai, Dongyan Zhao, Rui Yan

AI总结:

本文从“扰动”视角实证分析量化对 LLM 权重与激活值的影响,揭示均匀量化失效原因,并提出简单非均匀量化方法,在 4 比特与 8 比特设置下仅造成极小性能下降。

摘要:

量化已成为提升大型语言模型(LLM)内存与计算效率的一种有前景的技术。尽管性能与效率之间的权衡已广为人知,但关于量化与 LLM 性能之间的关系,仍有许多内容有待认识。为阐明这一关系,我们提出了一种看待量化的新视角,将其视为添加到 LLM 权重和激活值上的扰动。我们将这种方法称为“扰动之镜”。借助这一视角,我们使用各种人工扰动开展实验,以探究它们对 LLM 性能的影响。我们的发现揭示了扰动性质与 LLM 性能之间的若干联系,为均匀量化的失败案例提供了洞见,并提出了提升 LLM 量化鲁棒性的潜在解决方案。为证明这些发现的重要性,我们基于所得洞见实现了一种简单的非均匀量化方法。实验表明,该方法在 4 比特权重量化以及权重和激活值的 8 比特量化中均实现了极小的性能下降。这些结果验证了我们方法的正确性,并凸显了其在不牺牲性能的情况下提升 LLM 效率的潜力。

英文摘要:

Quantization has emerged as a promising technique for improving the memory and computational efficiency of large language models (LLMs). Though the trade-off between performance and efficiency is well-known, there is still much to be learned about the relationship between quantization and LLM performance. To shed light on this relationship, we propose a new perspective on quantization, viewing it as perturbations added to the weights and activations of LLMs. We call this approach "the lens of perturbation". Using this lens, we conduct experiments with various artificial perturbations to explore their impact on LLM performance. Our findings reveal several connections between the properties of perturbations and LLM performance, providing insights into the failure cases of uniform quantization and suggesting potential solutions to improve the robustness of LLM quantization. To demonstrate the significance of our findings, we implement a simple non-uniform quantization approach based on our insights. Our experiments show that this approach achieves minimal performance degradation on both 4-bit weight quantization and 8-bit quantization for weights and activations. These results validate the correctness of our approach and highlight its potential to improve the efficiency of LLMs without sacrificing performance.

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

↑