通过模块内PCA压缩,实现大模型高效结构化剪枝。
IntraSlice: Towards High-Performance Structural Pruning with Block-Intra PCA for LLMs
- 在模块内部使用近似PCA进行压缩,无需额外参数。
- 在相同压缩率下,比现有方法在多个基准上表现更优。
- 适合追求高推理速度的大模型部署场景。
大语言模型(LLMs)在多种任务中表现优异,但因其规模庞大,部署困难。结构化剪枝虽能加速,却导致性能显著下降。近期基于PCA的剪枝方法通过保留关键激活成分缓解此问题,但仅适用于模块间,需融合变换矩阵,引入额外参数,并严重破坏激活分布。为此,我们提出IntraSlice框架,采用模块内块级PCA压缩剪枝。利用Transformer模块的结构特性,设计可完全融合进模型的近似PCA方法,无需额外参数。同时引入基于PCA的全局剪枝比例估计器,综合考虑压缩后激活分布,改进传统模块重要性评估。我们在Llama2、Llama3和Phi系列模型上验证方法,在多个语言基准测试中,结果表明该方法在相同压缩率或推理速度下,性能优于现有基线。
原文摘要 · Abstract (English)
Large Language Models (LLMs) achieve strong performance across diverse tasks but face deployment challenges due to their massive size. Structured pruning offers acceleration benefits but leads to significant performance degradation. Recent PCA-based pruning methods have alleviated this issue by retaining key activation components, but are only applied between modules in order to fuse the transformation matrix, which introduces extra parameters and severely disrupts activation distributions due to residual connections. To address these issues, we propose IntraSlice, a framework that applies block-wise module-intra PCA compression pruning. By leveraging the structural characteristics of Transformer modules, we design an approximate PCA method whose transformation matrices can be fully fused into the model without additional parameters. We also introduce a PCA-based global pruning ratio estimator that further considers the distribution of compressed activations, building on conventional module importance. We validate our method on Llama2, Llama3, and Phi series across various language benchmarks. Experimental results demonstrate that our approach achieves superior compression performance compared to recent baselines at the same compression ratio or inference speed.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。