中文

2SSP:用于 LLM 结构化剪枝的两阶段框架

计算与语言 2025-08-19 v2 人工智能 机器学习

摘要

我们提出了一种 novel 两阶段框架用于结构化剪枝(\textsc{2SSP}),用于 pruning 大型语言模型(LLM),该方法结合了两种不同的剪枝策略,即 Width 和 Depth Pruning。第一个阶段(Width Pruning)删除 entire neurons,从而删除其对应的行和列,旨在保留 intermediate state 中每个 Transformer block 中的 Feed-Forward Networks 中被剪枝结构之间的 connectivity。这通过一种衡量每个神经元对输出 magnitude 影响的 importance score 来实现。第二个阶段(Depth Pruning)则删除 entire Attention submodules。这是通过应用一种迭代过程来实现的,该过程删除对给定感兴趣度量(我们的情况下为 perplexity)影响最小的 Attention。我们还提出了一种 novel 机制来平衡两个阶段的稀疏率,以适应 desired global sparsity。我们在四个 LLM 家族和三个稀疏率(25%、37.5% 和 50%)上测试了 \textsc{2SSP},测量结果在三个 language modeling 数据集上的 perplexity 以及在六个 downstream 任务上的性能。我们的方法在三个 language modeling 和六个 downstream 任务上 consistently优于五个 state-of-the-art 竞争者,就 pruning time 而言,提升了最高可达两个数量级。代码可在 https://github.com/FabrizioSandri/2SSP 获取。

关键词

引用

@article{arxiv.2501.17771,
  title  = {2SSP: A Two-Stage Framework for Structured Pruning of LLMs},
  author = {Fabrizio Sandri and Elia Cunegatti and Giovanni Iacca},
  journal= {arXiv preprint arXiv:2501.17771},
  year   = {2025}
}

备注

Published in Transactions on Machine Learning Research (TMLR)