arXiv:2503.18377cs.LGcs.AI2025-03被引 2

提出按冗余度分层剪枝的新方法,让大模型更省资源且不掉性能。

Maximum Redundancy Pruning: A Principle-Driven Layerwise Sparsity Allocation for LLMs

  • 根据每层冗余度高低,优先剪掉最没用的层。
  • 在多个大模型上剪枝后仍保持高精度,优于传统方法。
  • 适合追求高效部署的大模型应用开发者。

大语言模型(LLMs)虽能力强大,但其庞大体量给实际部署带来挑战。为解决此问题,研究者尝试对模型进行剪枝。剪枝中关键难题在于如何为各层分配稀疏度。现有方法多依赖启发式或搜索,常导致性能不佳。本文通过大量实验发现:(1)不同层对剪枝的敏感性差异显著;(2)剪枝指标会影响敏感性表现;(3)稀疏模型的性能与各层冗余水平的均匀性正相关。据此提出三大原则:非均匀性、剪枝指标依赖性、剪枝后层间冗余均匀。为此提出最大冗余剪枝(MRP),迭代地剪掉冗余率最高的层(即非异常值比例最高层)。该方法生成的稀疏度分布符合上述原则。我们在公开的大模型如LLaMA2和OPT上进行了广泛实验,涵盖多种基准测试。结果验证了MRP的有效性,其性能优于已有方法。

原文摘要 · Abstract (English)

Large language models (LLMs) have demonstrated impressive capabilities, but their enormous size poses significant challenges for deployment in real-world applications. To address this issue, researchers have sought to apply network pruning techniques to LLMs. A critical challenge in pruning is allocation the sparsity for each layer. Recent sparsity allocation methods is often based on heuristics or search that can easily lead to suboptimal performance. In this paper, we conducted an extensive investigation into various LLMs and revealed three significant discoveries: (1) the layerwise pruning sensitivity (LPS) of LLMs is highly non-uniform, (2) the choice of pruning metric affects LPS, and (3) the performance of a sparse model is related to the uniformity of its layerwise redundancy level. Based on these observations, we propose that the layerwise sparsity of LLMs should adhere to three principles: \emph{non-uniformity}, \emph{pruning metric dependency}, and \emph{uniform layerwise redundancy level} in the pruned model. To this end, we proposed Maximum Redundancy Pruning (MRP), an iterative pruning algorithm that prunes in the most redundant layers (\emph{i.e.}, those with the highest non-outlier ratio) at each iteration. The achieved layerwise sparsity aligns with the outlined principles. We conducted extensive experiments on publicly available LLMs, including the LLaMA2 and OPT, across various benchmarks. Experimental results validate the effectiveness of MRP, demonstrating its superiority over previous methods.

模型剪枝大模型稀疏性优化

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