arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.11983cs.CLcs.AI
收藏

面向大语言模型的基于波动的自适应结构化剪枝

Fluctuation-based Adaptive Structured Pruning for Large Language Models

Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);University of Chinese Academy of Sciences(中国科学院大学);Wuhan AI Research(武汉人工智能研究院);Objecteye Inc.(Objecteye公司)

Yongqi An, Xu Zhao, Tao Yu, Ming Tang, Jinqiao Wang

AI总结:

针对大语言模型免重训练剪枝多依赖非结构化方案、需特定硬件加速的问题,提出硬件友好的FLAP结构化剪枝框架,通过波动度量、自适应结构搜索与偏置补偿实现免重训练高效剪枝,性能优于现有最优方法。

摘要:

网络剪枝是解决大语言模型(Large Language Models, LLMs)部署与推理阶段海量计算资源需求的一种极具潜力的方法。无需重训练对LLMs剪枝方法而言至关重要,但现有几乎所有面向LLMs的免重训练剪枝方法都聚焦于非结构化剪枝,这类剪枝需要特定硬件支持才能实现加速。本文提出了一种面向LLMs的新型免重训练结构化剪枝框架,名为FLAP(基于波动的自适应结构化剪枝,FLuctuation-based Adaptive Structured Pruning),它通过有效降低存储开销、提升推理速度,具备硬件友好特性。为实现LLMs的高效结构化剪枝,我们明确了三个需重点关注的核心要素:构建结构化重要性度量指标、自适应搜索全局压缩模型、引入补偿机制以缓解性能损失。首先,FLAP基于波动剪枝度量指标,判断移除一列权重后输出特征图是否易于恢复;随后对重要性得分进行标准化处理,以自适应确定全局压缩模型的结构;最后,FLAP添加额外偏置项,利用基线值恢复输出特征图。我们在多种语言基准上对所提方法进行了全面评估,在无需任何重训练的条件下,该方法的性能显著优于当前最优方法,包括LLM-Pruner以及Wanda的结构化剪枝扩展版本。代码已发布于https://github.com/CASIA-IVA-Lab/FLAP。

英文摘要:

Network Pruning is a promising way to address the huge computing resource demands of the deployment and inference of Large Language Models (LLMs). Retraining-free is important for LLMs' pruning methods. However, almost all of the existing retraining-free pruning approaches for LLMs focus on unstructured pruning, which requires specific hardware support for acceleration. In this paper, we propose a novel retraining-free structured pruning framework for LLMs, named FLAP (FLuctuation-based Adaptive Structured Pruning). It is hardware-friendly by effectively reducing storage and enhancing inference speed. For effective structured pruning of LLMs, we highlight three critical elements that demand the utmost attention: formulating structured importance metrics, adaptively searching the global compressed model, and implementing compensation mechanisms to mitigate performance loss. First, FLAP determines whether the output feature map is easily recoverable when a column of weight is removed, based on the fluctuation pruning metric. Then it standardizes the importance scores to adaptively determine the global compressed model structure. At last, FLAP adds additional bias terms to recover the output feature maps using the baseline values. We thoroughly evaluate our approach on a variety of language benchmarks. Without any retraining, our method significantly outperforms the state-of-the-art methods, including LLM-Pruner and the extension of Wanda in structured pruning. The code is released at https://github.com/CASIA-IVA-Lab/FLAP.

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

↑