用低秩梯度估算权重重要性,实现高效剪枝。
Resource-Efficient Pruning for Transformer via Low-Rank Importance Estimation

- 通过低秩矩阵梯度估算重要性,避免全梯度计算
- 在LLaMA-7B和Mistral-7B上保持竞争力性能
- 适合资源受限场景下的模型压缩与部署
随着基于Transformer的大规模预训练语言模型快速发展,其高计算和内存开销已成为资源受限环境部署的主要障碍。传统剪枝方法通常依赖全梯度重要性估计,需先进行微调以获得良好性能,但该过程资源消耗巨大。本文提出REP-LIE,一种在微调过程中实现资源高效的剪枝方法。该方法利用LoRA低秩矩阵的梯度来估算权重重要性,无需全梯度计算。为应对重要性估计中的固有随机性,引入稳定性评分,作为迭代剪枝的基础。剪枝后的模型通过轻量级更新进一步微调,避免了全参数优化。在中等规模编码器模型及大规模生成模型(LLaMA-7B和Mistral-7B)上的大量实验表明,REP-LIE相较于现有方法仍能保持竞争性性能。
原文摘要 · Abstract (English)
With the rapid development of large-scale pre-trained language models based on Transformer architectures, their high computational and memory costs have become a major obstacle to deployment, especially in resource-constrained environments. Traditional pruning methods typically depend on full gradient-based importance estimation, and they necessitate prior finetuning of the model to achieve satisfactory performance. This process often results in intolerable resource consumption. This paper proposes REP-LIE, a new approach to enable resource-efficient pruning during the process of finetuning. REP-LIE leverages the gradients of LoRA low-rank matrices to estimate the importance of weights without requiring full gradient computation. To address the inherent randomness in importance estimation, a stability score is introduced, serving as the basis for iterative pruning of unimportant model parameters. The pruned model is further finetuned through lightweight updates, eliminating the need for full-parameter optimization in the process of finetuning. Extensive experiments on both medium-scale encoder models and large-scale generative models (LLaMA-7B and Mistral-7B) demonstrate that REP-LIE still achieves competitive performance compared to existing approaches.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。