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

重新思考训练后量化:引入一种统计预校准方法

Rethinking Post-Training Quantization: Introducing a Statistical Pre-Calibration Approach

McGill University(麦吉尔大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室)

Alireza Ghaffari, Sharareh Younesian, Boxing Chen, Vahid Partovi Nia, Masoud Asgharian

AI总结:

针对现有训练后量化校准方法跨领域效果不均的问题,提出一种权重自适应统计预校准PTQ方法,通过最小化权重KL散度保留分布与香农信息量,性能媲美主流校准类PTQ方法,可作为量化校准的前置步骤。

摘要:

随着大语言模型(LLM)的计算复杂度日益提升,开发量化这类高效部署策略变得至关重要。当前最先进的训练后量化(PTQ)技术通常依赖校准流程来维持这些模型的精度。然而,尽管这些校准技术能在特定领域提升性能,在其他领域的效果可能不尽如人意。本文旨在引起学界对可缓解此类问题的鲁棒统计方法的关注。我们提出了一种权重自适应PTQ方法,它可被视为基于校准的PTQ方法的前置步骤,通过最小化量化后权重与原始训练权重之间的Kullback-Leibler散度,引导量化过程保留权重分布。这种最小化操作确保量化后的模型能在很大程度上保留原始模型的香农信息量,保障其在众多任务上鲁棒且高效地部署。因此,我们提出的方法性能可与多数常见的基于校准的PTQ方法相当,为后续通过校准调整量化权重建立了全新的预校准步骤。我们的实验表明,该预校准结果在多种LLM上达到了与部分现有基于校准的PTQ方法相同的精度。

英文摘要:

As Large Language Models (LLMs) become increasingly computationally complex, developing efficient deployment strategies, such as quantization, becomes crucial. State-of-the-art Post-training Quantization (PTQ) techniques often rely on calibration processes to maintain the accuracy of these models. However, while these calibration techniques can enhance performance in certain domains, they may not be as effective in others. This paper aims to draw attention to robust statistical approaches that can mitigate such issues. We propose a weight-adaptive PTQ method that can be considered a precursor to calibration-based PTQ methods, guiding the quantization process to preserve the distribution of weights by minimizing the Kullback-Leibler divergence between the quantized weights and the originally trained weights. This minimization ensures that the quantized model retains the Shannon information content of the original model to a great extent, guaranteeing robust and efficient deployment across many tasks. As such, our proposed approach can perform on par with most common calibration-based PTQ methods, establishing a new pre-calibration step for further adjusting the quantized weights with calibration. We show that our pre-calibration results achieve the same accuracy as some existing calibration-based PTQ methods on various LLMs.

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

↑