按层动态设定稀疏率,让大模型在极致压缩下仍保持高性能。
Towards Extreme Pruning of LLMs with Plug-and-Play Mixed Sparsity
- 基于FIM迹值量化各层敏感度,指导不同层采用不同稀疏率。
- 75%极端压缩时,困惑度比现有方法低一个数量级。
- 可插即用,适配现有剪枝流程,提升效率与效果。
N:M结构化剪枝对大型语言模型至关重要,能移除次要权重以降低内存与计算开销。现有方法多聚焦于设计重要性度量来指导剪枝。我们观察到不同网络层对性能变化的敏感度存在差异,因此提出基于费雪信息矩阵(FIM)迹值的方法,定量衡量并验证层间敏感度差异。在此基础上,提出混合稀疏度剪枝(MSP),利用剪枝导向的进化算法(EA)确定各层最优稀疏率。为确保快速收敛并取得优异性能,采用受FIM启发的逐层敏感度初始化EA种群。此外,MSP可作为即插即用模块,无缝集成至现有剪枝方法中。在LLaMA和LLaMA-2上的大量实验表明,该方法在语言建模与零样本任务中表现卓越。尤其在75%极端剪枝比例下,困惑度(PPL)显著优于现有方法,性能提升达数量级(图1)。
原文摘要 · Abstract (English)
N:M structured pruning is essential for large language models (LLMs) because it can remove less important network weights and reduce the memory and computation requirements. Existing pruning methods mainly focus on designing metrics to measure the importance of network components to guide pruning. Apart from the impact of these metrics, we observe that different layers have different sensitivities over the network performance. Thus, we propose an efficient method based on the trace of Fisher Information Matrix (FIM) to quantitatively measure and verify the different sensitivities across layers. Based on this, we propose Mixed Sparsity Pruning (MSP) which uses a pruning-oriented evolutionary algorithm (EA) to determine the optimal sparsity levels for different layers. To guarantee fast convergence and achieve promising performance, we utilize efficient FIM-inspired layer-wise sensitivity to initialize the population of EA. In addition, our MSP can work as a plug-and-play module, ready to be integrated into existing pruning methods. Extensive experiments on LLaMA and LLaMA-2 on language modeling and zero-shot tasks demonstrate our superior performance. In particular, in extreme pruning ratio (e.g. 75%), our method significantly outperforms existing methods in terms of perplexity (PPL) by orders of magnitude (Figure 1).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。