Prune&Comp:通过迭代修剪与幅值补偿实现层级修剪大语言模型的免费加成
计算与语言
2025-07-25 v1
摘要
层级修剪已成为压缩大型语言模型(LLMs)以实现与修剪比例比例加速的有前景技术。本文识别到,移除任何层都会导致隐藏状态中显著的幅值间隙,从而引起显著的性能下降。为解决此问题,我们提出了 Prune&Comp,一种新型即插即用的层级修剪方案,利用幅值补偿来缓解此类间隙,以无训练的方式实现。具体而言,我们首先估计由层移除导致的幅值间隙,然后通过离线重新缩放剩余权重来消除此间隙,实现零运行时开销。我们进一步通过迭代修剪策略展示了 Prune&Comp 的优势。当集成到迭代修剪-补偿循环中时,Prune&Comp 一致地提升现有层级修剪指标。例如,当使用流行的块影响度量修剪 LLaMA-3-8B 的 5 层时,Prune&Comp 将困惑度几乎减半,并保留 93.19% 的原始模型问答性能,净净优于基线提升 4.01%。
引用
@article{arxiv.2507.18212,
title = {Prune&Comp: Free Lunch for Layer-Pruned LLMs via Iterative Pruning with Magnitude Compensation},
author = {Xinrui Chen and Hongxing Zhang and Fanyi Zeng and Yongxian Wei and Yizhi Wang and Xitong Ling and Guanghao Li and Chun Yuan},
journal= {arXiv preprint arXiv:2507.18212},
year = {2025}
}