arXiv:2506.08436cs.CLcs.LG2025-06ICML被引 6

不重训练就能高效剪枝大模型,保持精度还省资源。

Olica: Efficient Structured Pruning of Large Language Models without Retraining

  • 用PCA统一处理注意力层矩阵乘法,提取关键信息压缩模型
  • 剪枝后通过低秩矩阵修复前馈层残差误差,精度几乎不变
  • 无需重训练,节省数据、显存和时间,适合部署场景

现有大型语言模型(LLM)的结构化剪枝方法通常需要大量计算与数据进行重训练以恢复破坏的相关性,成本高昂。为此,我们提出一种名为正交分解与线性校准(Olica)的剪枝框架,无需重训练。核心观察是多头注意力(MHA)层依赖两类矩阵乘法,将其视为统一实体并应用主成分分析(PCA),可提取关键信息实现模型压缩而不损失精度或破坏原有结构。同时设计快速分解方法,将PCA复杂度降低为注意力头数平方分之一。为缓解前馈网络(FFN)剪枝导致的误差累积问题,引入线性校准方法,利用最小二乘解的奇异值分解(SVD)获得低秩矩阵重构残差误差,无需重训练。大量实验表明,Olica在数据使用、GPU内存和运行时间上均高效,且在多个基准测试中表现优异。

原文摘要 · Abstract (English)

Most existing structured pruning methods for Large Language Models (LLMs) require substantial computational and data resources for retraining to reestablish the corrupted correlations, making them prohibitively expensive. To address this, we propose a pruning framework for LLMs called Orthogonal decomposition and Linear Calibration (Olica), which eliminates the need for retraining. A key observation is that the multi-head attention (MHA) layer depends on two types of matrix products. By treating these matrix products as unified entities and applying principal component analysis (PCA), we extract the most important information to compress LLMs without sacrificing accuracy or disrupting their original structure. Consequently, retraining becomes unnecessary. A fast decomposition method is devised, reducing the complexity of PCA by a factor of the square of the number of attention heads. Additionally, to mitigate error accumulation problem caused by pruning the feed-forward network (FFN) layer, we introduce a linear calibration method to reconstruct the residual errors of pruned layers using low-rank matrices. By leveraging singular value decomposition (SVD) on the solution of the least-squares problem, these matrices are obtained without requiring retraining. Extensive experiments show that the proposed Olica is efficient in terms of data usage, GPU memory, and running time, while delivering superior performance across multiple benchmarks.

模型剪枝大模型优化无重训练注意力机制

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