arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2303.08302cs.LGcs.AIcs.CL
收藏

ZeroQuant-V2:从综合研究到低秩补偿探索大语言模型中的训练后量化

ZeroQuant-V2: Exploring Post-training Quantization in LLMs from Comprehensive Study to Low Rank Compensation

Microsoft(微软)

Zhewei Yao, Xiaoxia Wu, Cheng Li, Stephen Youn, Yuxiong He

AI总结:

本文系统研究了LLM训练后量化中不同方案、模型家族和比特精度的影响,发现现有方法在INT4权重量化下均无法保持原始模型质量,并提出低秩补偿方法LoRC以极小模型尺寸代价改善质量恢复。

摘要:

训练后量化(PTQ)已成为缓解大语言模型(LLM)内存消耗和计算成本的一种有前景的技术。然而,文献中一直缺乏对各种量化方案、模型家族和量化比特精度的系统性研究。在本文中,我们通过研究PTQ对仅权重量化、仅激活量化以及权重与激活同时量化的影响,并使用最近邻取整(RTN)、GPTQ、ZeroQuant及其变体等多种方法,对这些因素进行了全面分析。我们将这些方法应用于两个不同的模型家族,参数规模从125M到176B不等。我们的贡献包括:(1)敏感性分析表明,激活量化通常比权重量化更敏感,且就激活量化而言,较小的模型往往优于较大的模型;(2)对现有PTQ方法进行评估和比较,以在最小化精度影响的同时优化模型尺寸缩减,结果表明,当前没有任何方法能够在INT4权重或INT4权重加INT8激活的量化设置下达到原始模型的质量;(3)基于这些发现,我们提出了一种名为低秩补偿(LoRC)的优化方法,该方法利用低秩矩阵以最小的模型尺寸增加来提升模型质量恢复能力。

英文摘要:

Post-training quantization (PTQ) has emerged as a promising technique for mitigating memory consumption and computational costs in large language models (LLMs). However, a systematic examination of various quantization schemes, model families, and quantization bit precision has been absent from the literature. In this paper, we conduct a comprehensive analysis of these factors by investigating the effects of PTQ on weight-only, activation-only, and weight-and-activation quantization using diverse methods such as round-to-nearest (RTN), GPTQ, ZeroQuant, and their variants. We apply these methods to two distinct model families with parameters ranging from 125M to 176B. Our contributions include: (1) a sensitivity analysis revealing that activation quantization is generally more susceptible to weight quantization, with smaller models often outperforming larger models in terms of activation quantization; (2) an evaluation and comparison of existing PTQ methods to optimize model size reduction while minimizing the impact on accuracy, revealing that none of the current methods can achieve the original model quality for quantization with either INT4-weight or INT4-weight-and-INT8-activation; (3) based on these insights, we propose an optimized method called Low-Rank Compensation (LoRC), which employs low-rank matrices to enhance model quality recovery with a minimal increase in model size.

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

↑