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

CFSP:一种利用由粗到细激活信息的高效 LLM 结构化剪枝框架

CFSP: An Efficient Structured Pruning Framework for LLMs with Coarse-to-Fine Activation Information

Harbin Institute of Technology(哈尔滨工业大学);Du Xiaoman Science Technology Co., Ltd(度小满科技有限公司)

Yuxin Wang, Minghua Ma, Zekun Wang, Jingchang Chen, Huiming Fan, Liping Shan, Qing Yang, Dongliang Xu, Ming Liu, Bing Qin

AI总结:

本文提出 CFSP 结构化剪枝框架,利用块间与块内激活信息,仅需一次前向传播即可分配稀疏预算并保留重要权重,结合自适应恢复微调,在多种 LLM 和稀疏率下取得优于现有方法的性能。

摘要:

大型语言模型(LLM)庞大的参数量和计算开销对其现实应用构成挑战。网络剪枝通过移除冗余参数来实现非结构化或结构化稀疏,近期已被探索用于 LLM 加速。现有 LLM 剪枝工作主要关注非结构化剪枝,这类方法通常需要特殊硬件支持才能获得实际加速。相比之下,结构化剪枝能够降低通用设备上的延迟。然而,如何高效执行结构化剪枝并保持性能,尤其是在高稀疏率下,仍然是一项挑战。为此,我们提出了一个名为 CFSP 的高效结构化剪枝框架,它同时利用粗粒度(块间)和细粒度(块内)激活信息作为重要性准则来指导剪枝。该剪枝过程非常高效,因为只需一次前向传播即可计算特征激活。具体而言,我们首先根据各块的重要性在块之间分配稀疏预算,然后在每个块内保留重要权重。此外,我们提出一种恢复微调策略,根据粗粒度重要性自适应分配训练开销,以进一步提升性能。实验结果表明,在不同稀疏预算下,CFSP 在多种模型上均优于现有方法。我们的代码将在 https://github.com/wyxscir/CFSP 提供。

英文摘要:

The colossal parameters and computational overhead of Large Language Models (LLMs) challenge their real-world applications. Network pruning, which targets unstructured or structured sparsity by removing redundant parameters, has recently been explored for LLM acceleration. Existing LLM pruning works focus on unstructured pruning, which typically requires special hardware support for a practical speed-up. In contrast, structured pruning can reduce latency on general devices. However, it remains a challenge to perform structured pruning efficiently and maintain performance, especially at high sparsity ratios. To this end, we introduce an efficient structured pruning framework named CFSP, which leverages both Coarse (interblock) and Fine-grained (intrablock) activation information as an importance criterion to guide pruning. The pruning is highly efficient, as it only requires one forward pass to compute feature activations. Specifically, we first allocate the sparsity budget across blocks based on their importance and then retain important weights within each block. In addition, we introduce a recovery fine-tuning strategy that adaptively allocates training overhead based on coarse-grained importance to further improve performance. Experimental results demonstrate that CFSP outperforms existing methods on diverse models across various sparsity budgets. Our code will be available at https://github.com/wyxscir/CFSP.

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

↑