arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.05406cs.LGcs.CL
收藏

人人都现在剪枝:仅前向传递的LLM结构剪枝

Everybody Prune Now: Structured Pruning of LLMs with only Forward Passes

Carnegie Mellon University(卡内基梅隆大学);Google Research(谷歌研究)

Steven Kolawole, Lucio Dery, Jean-François Kagy, Virginia Smith, Graham Neubig, Ameet Talwalkar

AI总结:

Bonsai通过仅前向传递的扰动剪枝方法,实现了无需反向传播的高效结构化剪枝,显著降低内存和计算成本,同时提升模型压缩效率和性能。

摘要:

结构化剪枝是一种有前景的方法,用于创建更小、更快的大型语言模型。然而,现有方法通常依赖于通过反向传递计算梯度,这可能会增加内存需求和计算成本。在本工作中,我们介绍了Bonsai,一种无需反向传播的结构化剪枝方法,消除了对反向传播的依赖,显著降低了内存需求和计算成本,同时实现了最先进的剪枝性能。Bonsai使用仅前向传递的扰动剪枝,使能够在更广泛的硬件配置上高效压缩大型模型。与现有结构化剪枝方法不同,Bonsai不仅在较少资源下实现了更好的压缩,还产生了比半结构化剪枝生成的模型快两倍的模型。作为具体演示,我们使用Bonsai将7B和8B模型剪枝到50%的稀疏度,单个A6000 GPU上完成——对于依赖反向传播的方法来说,在内存受限的环境下是一项具有挑战性的任务,因为它们需要2-3倍的内存。我们的结果表明,去除对反向传播的要求不仅使在受限硬件上剪枝更大的模型成为可能,还可以导致最先进的效率和性能。

英文摘要:

Structured pruning is a promising approach to create smaller, faster large language models. However, existing methods typically rely on computing the gradient via backward passes, which can inflate memory requirements and compute costs. In this work we introduce Bonsai, a gradient-free structured pruning method that eliminates the need for backpropagation, significantly reducing memory requirements and compute costs while achieving state-of-the-art pruning performance. Bonsai uses forward-pass-only perturbative pruning to enable efficient compression of large models on a broader range of hardware configurations. Unlike existing structured pruning approaches, Bonsai not only achieves better compression with fewer resources but also produces models that are twice as fast as those generated by semi-structured pruning. As a concrete demonstration, we use Bonsai to prune 7B and 8B models to 50% sparsity on a single A6000 GPU -- a task challenging for backprop-based methods in memory-constrained settings, as they require 2-3x the memory. Our results show that removing backprop as a requirement not only enables pruning larger models on constrained hardware but can also lead to state-of-the-art efficiency and performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑