arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.20835cs.LGcs.AIcs.CL
收藏

离群值与校准集对现代大语言模型量化的影响正在减弱

Outliers and Calibration Sets have Diminishing Effect on Quantization of Modern LLMs

University College London(伦敦大学学院);Cohere(Cohere公司)

Davide Paglieri, Saurabh Dash, Tim Rocktäschel, Jack Parker-Holder

AI总结:

本文通过分析校准集对不同开源LLMs隐藏激活和离群值的影响,发现现代模型对量化中的离群值具有较强鲁棒性,建议PTQ策略应从保留离群值转向优化推理速度。

摘要:

训练后量化(PTQ)通过降低内存占用实现更快的运行速度和对更易获取硬件的兼容性,从而提升大语言模型(LLMs)的效率,代价是较小的性能下降。我们探究了校准集在PTQ中的作用,特别是它们对多个知名开源LLMs中隐藏激活的影响。校准集对于评估激活幅值和识别离群值至关重要,而离群值可能扭曲量化范围并对性能产生负面影响。我们的分析揭示了不同模型之间量化效果的显著差异。较老的OPT模型——大量量化文献以此为基础——在不同校准集下表现出明显的性能恶化和对离群值的高度敏感性。相比之下,Llama-2 7B、Llama-3 8B、Command-R 35B和Mistral 7B等较新模型展现出很强的鲁棒性,其中Mistral 7B几乎对离群值免疫且激活稳定。这些发现表明PTQ策略可能需要转变。随着预训练方法的进步降低了离群值的相关性,重新评估当前量化文献的基本假设的需求正在显现。重点应转向优化推理速度,而不是主要关注离群值保留,以契合最先进LLMs不断演化的特性。

英文摘要:

Post-Training Quantization (PTQ) enhances the efficiency of Large Language Models (LLMs) by enabling faster operation and compatibility with more accessible hardware through reduced memory usage, at the cost of small performance drops. We explore the role of calibration sets in PTQ, specifically their effect on hidden activations in various notable open-source LLMs. Calibration sets are crucial for evaluating activation magnitudes and identifying outliers, which can distort the quantization range and negatively impact performance. Our analysis reveals a marked contrast in quantization effectiveness across models. The older OPT model, upon which much of the quantization literature is based, shows significant performance deterioration and high susceptibility to outliers with varying calibration sets. In contrast, newer models like Llama-2 7B, Llama-3 8B, Command-R 35B, and Mistral 7B demonstrate strong robustness, with Mistral 7B showing near-immunity to outliers and stable activations. These findings suggest a shift in PTQ strategies might be needed. As advancements in pre-training methods reduce the relevance of outliers, there is an emerging need to reassess the fundamentals of current quantization literature. The emphasis should pivot towards optimizing inference speed, rather than primarily focusing on outlier preservation, to align with the evolving characteristics of state-of-the-art LLMs.

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

↑