arXiv:2410.06040cs.LG2024-10中稿 · ICLR被引 20

提出量化误差重建的解析框架,提升低精度大模型性能。

QERA: an Analytical Framework for Quantization Error Reconstruction

  • 构建量化误差重建的闭式解框架,避免手动设计
  • 2比特罗伯塔在GLUE上比LoftQ高6.05%准确率
  • 适合低精度微调与推理场景,尤其关注性能优化者

大语言模型参数量和计算需求增长带来部署挑战。近期研究通过极低精度量化权重,并用低秩高精度误差重建项来补偿损失。此类方法结合量化与低秩近似,广泛应用于适配器型高效微调(如LoftQ)和低精度推理(如ZeroQuant-V2)。传统方法通常基于权重量化误差的奇异值分解(SVD),最小化权重量化误差的Frobenius范数和谱范数。而最新方法如LQ-LoRA和LQER则采用手工启发式策略,以最小化层输出(激活)误差,取得更好效果。但这些方法缺乏理论指导。本文重新审视该问题,提出解析框架QERA,给出闭式解。实验表明,QERA在2比特罗伯塔-基线模型上相比LoftQ提升6.05%微调准确率;在4比特Llama-3.1-70B上,平均比ZeroQuant-V2高2.97%准确率,且在WikiText2上比LQER低0.28的困惑度。

原文摘要 · Abstract (English)

The growing number of parameters and computational demands of large language models (LLMs) present significant challenges for their efficient deployment. Recently, there is an increasing interest in quantizing weights to extremely low precision while offsetting the resulting error with low-rank, high-precision error reconstruction terms. The combination of quantization and low-rank approximation is now popular in both adapter-based, parameter-efficient fine-tuning methods such as LoftQ and low-precision inference techniques including ZeroQuant-V2. Usually, the low-rank terms are calculated via the singular value decomposition (SVD) of the weight quantization error, minimizing the Frobenius and spectral norms of the weight approximation error. Recent methods like LQ-LoRA and LQER introduced hand-crafted heuristics to minimize errors in layer outputs (activations) rather than weights, resulting improved quantization results. However, these heuristic methods lack an analytical solution to guide the design of quantization error reconstruction terms. In this paper, we revisit this problem and formulate an analytical framework, named Quantization Error Reconstruction Analysis (QERA), and offer a closed-form solution to the problem. We show QERA benefits both existing low-precision fine-tuning and inference methods -- QERA achieves a fine-tuned accuracy gain of $Δ_{\text{acc}}$ = 6.05% of 2-bit RoBERTa-base on GLUE compared to LoftQ; and obtains $Δ_{\text{acc}}$ = 2.97% higher post-training quantization accuracy of 4-bit Llama-3.1-70B on average than ZeroQuant-V2 and $Δ_{\text{ppl}}$ = - 0.28 lower perplexity on WikiText2 than LQER.

量化大模型误差重建高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。