改进大模型低比特量化精度,通过两阶段优化分组尺度
Two-Stage Grid Optimization for Group-wise Quantization of LLMs
- 先用输入统计初始化分组尺度,再结合前层误差精调
- 在不增加计算开销下,显著降低层间重构误差
- 适合追求高精度低比特部署的模型压缩研究者
分组量化是缓解大语言模型低比特量化精度下降的有效策略。现有方法中,GPTQ 因效率高被广泛采用,但其忽略输入统计与组间相关性,导致分组尺度与最小化层重构误差的目标不一致。本文提出一种两阶段分组尺度优化框架,显式最小化层重构误差。第一阶段在 GPTQ 前进行,将每组尺度初始化为最小化组内重构误差,融入输入统计信息;第二阶段冻结 GPTQ 得到的整数权重,利用坐标下降算法与闭式更新规则,对分组尺度进行高效精调,避免数值优化开销。特别地,推导中引入前层量化误差,防止误差累积。实验表明,该方法持续提升分组量化性能,在几乎无额外开销下实现更高精度。
原文摘要 · Abstract (English)
Group-wise quantization is an effective strategy for mitigating accuracy degradation in low-bit quantization of large language models (LLMs). Among existing methods, GPTQ has been widely adopted due to its efficiency; however, it neglects input statistics and inter-group correlations when determining group scales, leading to a mismatch with its goal of minimizing layer-wise reconstruction loss. In this work, we propose a two-stage optimization framework for group scales that explicitly minimizes the layer-wise reconstruction loss. In the first stage, performed prior to GPTQ, we initialize each group scale to minimize the group-wise reconstruction loss, thereby incorporating input statistics. In the second stage, we freeze the integer weights obtained via GPTQ and refine the group scales to minimize the layer-wise reconstruction loss. To this end, we employ the coordinate descent algorithm and derive a closed-form update rule, which enables efficient refinement without costly numerical optimization. Notably, our derivation incorporates the quantization errors from preceding layers to prevent error accumulation. Experimental results demonstrate that our method consistently enhances group-wise quantization, achieving higher accuracy with negligible overhead.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。