改进大模型量化中块间交互,提升压缩效率
Interactions Across Blocks in Post-Training Quantization of Large Language Models
- 联合优化多个模型块的权重,捕捉块间相关性
- 利用下游块信息优化前块,减少量化误差
- 对部分模型效果显著,适合追求高效压缩的研究者
后训练量化广泛用于降低神经网络的计算开销。通常,通过微调对应权重来最小化各子结构(如层或层块)在预激活状态下的量化误差,实现局部优化。这一方法从全局任务损失最小化目标推导而来,依赖两个关键简化:假设子结构相互独立,且忽略后续子结构的知识及任务损失。本文评估了这些简化对大语言模型权重量化的影响,提出两种多块微调策略:第一种通过联合优化多个量化块来捕捉块间权重相关性;第二种通过最小化下游预激活误差,引入后续块的知识,而非仅关注当前量化块。实验表明,这些方法的效果因模型而异,在某些模型上无明显影响,但在其他模型上表现显著提升。
原文摘要 · Abstract (English)
Post-training quantization is widely employed to reduce the computational demands of neural networks. Typically, individual substructures, such as layers or blocks of layers, are quantized with the objective of minimizing quantization errors in their pre-activations by fine-tuning the corresponding weights. Deriving this local objective from the global objective of minimizing task loss involves two key simplifications: assuming substructures are mutually independent and ignoring the knowledge of subsequent substructures as well as the task loss. In this work, we assess the effects of these simplifications on weight-only quantization of large language models. We introduce two multi-block fine-tuning strategies and compare them against the baseline of fine-tuning single transformer blocks. The first captures correlations of weights across blocks by jointly optimizing multiple quantized blocks. The second incorporates knowledge of subsequent blocks by minimizing the error in downstream pre-activations rather than focusing solely on the quantized block. Our findings indicate that the effectiveness of these methods depends on the specific network model, with no impact on some models but demonstrating significant benefits for others.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。