arXiv:2505.22689cs.LG2025-05ICML被引 26

SlimLLM通过整体评估通道和注意力头重要性,实现大模型高效压缩。

SlimLLM: Accurate Structured Pruning for Large Language Models

  • 按模块整体评估重要性,更准确捕捉内部依赖关系。
  • 在LLaMA上压缩后仍保持高精度,性能优于现有方法。
  • 适合需要轻量化部署的大模型应用开发者。

大型语言模型(LLMs)在众多应用中展现出强大能力,但其巨大的计算开销限制了实际部署。结构化剪枝是压缩参数的有效方法,关键在于准确评估子模块重要性并最小化性能损失。本文提出一种高效快速的结构化剪枝方法SlimLLM。针对通道和注意力头剪枝,不基于单个元素的重要性累加,而是整体评估整个通道或头的重要性,从而更全面地考虑子模块内元素间的相互依赖。此外,设计简单线性回归策略对输出矩阵进行快速恢复,提升剪枝后性能。提出分层重要性比例,自适应确定每层剪枝率。在LLaMA基准测试中,SlimLLM表现优于其他方法,达到当前最优水平。

原文摘要 · Abstract (English)

Large language models(LLMs) have garnered significant attention and demonstrated impressive capabilities in a wide range of applications. However, due to their enormous computational costs, the deployment and application of LLMs are often severely limited. To address this issue, structured pruning is an effective solution to compress the parameters of LLMs. Determining the importance of each sub-module in LLMs and minimizing performance loss are critical issues that need to be carefully addressed in structured pruning. In this paper, we propose an effective and fast structured pruning method named SlimLLM for large language models. For channel and attention head pruning, we evaluate the importance based on the entire channel or head, rather than merely aggregating the importance of individual elements within a sub-module. This approach enables a more holistic consideration of the interdependence among elements within the sub-module. In addition, we design a simple linear regression strategy for the output matrix to quickly recover performance. We also propose layer-based importance ratio to determine the pruning ratio for each layer. Based on the LLaMA benchmark results, our SlimLLM outperforms other methods and achieves state-of-the-art performance.

大模型压缩结构化剪枝高效部署

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。