arXiv:2506.05664cs.LGcs.CL2025-06被引 2

根据权重敏感度动态分配比特数,显著降低大模型量化误差。

BAQ: Efficient Bit Allocation Quantization for Large Language Models

  • 基于海森代理构建敏感度指标,实现非均匀比特分配
  • 在125M到30B参数模型上,相同比特下困惑度降低最多56倍
  • 可无缝集成至现有量化流程,计算开销极低

训练后模型量化是降低大语言模型内存与计算成本的常用方法。然而,现有方法多采用均匀或启发式比特分配,未能考虑权重对量化噪声的非均匀敏感性。本文提出一种新框架,基于海森代理推导的敏感度指标进行比特分配。通过关键假设,将层/组件级损失函数表达为比特数的显式函数,从而将比特分配问题转化为凸优化任务,获得闭式解,自适应调整精度以最小化逐层量化损失。分析解得结果揭示了等损失结构等洞见,并据此设计了提出的 extbf{BAQ}(Bit Allocation Quantization)算法。该算法在损失最小化与复杂度间取得良好平衡,且可无缝集成至标准量化流程,开销极小。实验表明,BAQ在125M至30B参数的大模型上持续优于GPTQ,相同比特下困惑度降低最高达56倍。同时,基于求解最优比特分配问题的解析结果,我们提供了观测增益的理论解释。论文代码已开源:https://github.com/CSU-ModelCompression/BAQ。

原文摘要 · Abstract (English)

Post-training model quantization is a widely adopted technique for reducing the memory and computational costs of large language models (LLMs). However, most existing methods rely on uniform or heuristic bitwidth assignments, failing to account for the nonuniform sensitivity of weights to quantization noise. In this paper, we propose a novel framework for allocating quantization bitwidths based on sensitivity metrics derived from a Hessian proxy. We make key assumptions, which allow the layer/component-wise loss function to be expressed as an explicit function of the bitwidths. This enables a neat formulation of the bit allocation problem as a convex optimization task, whose closed-form solution adapts precision across weights to minimize the layer-wise quantization loss. Inspecting the solution provides several insights (such as the equal-loss structure), which are then exploited to design the proposed \textbf{BAQ} (Bit Allocation Quantization) algorithm. The proposed algorithm achieves a good trade-off between loss minimization and complexity and allows BAQ to be integrated into standard quantization pipelines with minimal overhead. Experimental results show that BAQ consistently outperforms GPTQ, achieving up to 56$\times$ lower perplexity at the same bitwidth on large language models ranging from 125M to 30B parameters. Leveraging our analytical results derived from solving the optimal bit allocation problem, we also provide a theoretical explanation for the observed gains. All codes of this paper are available at https://github.com/CSU-ModelCompression/BAQ.

量化大模型优化

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