arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.10799cs.CLcs.AIcs.LG
收藏

面向基于混合粒度权重重要性评估的自适应大语言模型结构剪枝

Toward Adaptive Large Language Models Structured Pruning via Hybrid-grained Weight Importance Assessment

Jun Liu, Zhenglun Kong, Pu Zhao, Changdi Yang, Hao Tang, Xuan Shen, Geng Yuan, Wei Niu, Wenbin Zhang, Xue Lin, Dong Huang, Yanzhi Wang

AI总结:

提出HyWIA方法,通过混合粒度权重重要性评估提升大语言模型剪枝效果,实现更优的性能保留和结构优化。

摘要:

针对大语言模型(LLM)的结构剪枝,由于其能够通过消除冗余权重组在粗粒度层面实现高效压缩和加速而受到学术界的广泛关注。当前LLM的结构剪枝方法通常依赖单一粒度来评估权重重要性,导致在下游任务中出现显著的性能下降。有趣的是,我们的实证研究发现,使用无结构剪枝,即通过在更细粒度层面(即单个权重)进行剪枝,能够保留更好的性能,从而在与结构剪枝相比较时产生显著不同的稀疏LLM结构。这表明,对权重重要性的整体和个体评估是LLM剪枝所必需的。基于这一见解,我们引入了混合粒度权重重要性评估(HyWIA),一种新的方法,它将权重重要性的细粒度和粗粒度评估相结合,用于LLM的剪枝。利用注意力机制,HyWIA能够以端到端的方式自适应地确定权重重要性评估的最佳混合粒度。在LLaMA-V1/V2、Vicuna、Baichuan和Bloom等模型上进行的大量实验展示了HyWIA在剪枝LLM方面的有效性。例如,当对LLaMA-7B进行50%剪枝时,HyWIA在七个下游任务上的准确率平均比最先进的LLM-Pruner高出2.82%。代码:https://github.com/azuryl/LLM-HWIA

英文摘要:

Structured pruning for large language models (LLMs) has garnered significant academic interest due to its ability to efficiently compress and accelerate LLMs by eliminating redundant weight groups at a coarse-grained granularity. Current structured pruning methods for LLMs typically depend on a singular granularity for assessing weight importance, resulting in notable performance degradation in downstream tasks. Intriguingly, our empirical investigations reveal that utilizing unstructured pruning, which achieves better performance retention by pruning weights at a finer granularity, \emph{i.e.}, individual weights, yields significantly varied sparse LLM structures when juxtaposed to structured pruning. This suggests that evaluating both holistic and individual assessment for weight importance is essential for LLM pruning. Building on this insight, we introduce the Hybrid-grained Weight Importance Assessment (HyWIA), a novel method that merges fine-grained and coarse-grained evaluations of weight importance for the pruning of LLMs. Leveraging an attention mechanism, HyWIA adaptively determines the optimal blend of granularity in weight importance assessments in an end-to-end pruning manner. Extensive experiments on LLaMA-V1/V2, Vicuna, Baichuan, and Bloom across various benchmarks demonstrate the effectiveness of HyWIA in pruning LLMs. For example, HyWIA surpasses the cutting-edge LLM-Pruner by an average margin of 2.82% in accuracy across seven downstream tasks when pruning LLaMA-7B by 50%. Code:https://github.com/azuryl/LLM-HWIA

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑