arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.18331cs.LG

剪枝、更新与裁剪:大型语言模型的鲁棒结构剪枝

Prune, Update and Trim: Robust Structured Pruning for Large Language Models

ISMLL & DARC VWFS University of Hildesheim(ISMLL与DARC VWFS大学海德斯海姆大学);ISMLL University of Hildesheim(ISMLL大学海德斯海姆大学)

Diego Coello de Portugal Mecke, Tom Hanika, Lars Schmidt-Thieme

AI总结:

本文提出Putri方法,通过更新未剪枝权重、按顺序剪枝FFN层以及移除单个注意力头来改进大型语言模型的后训练剪枝,实现了在极端稀疏率下的高效剪枝。

摘要:

大型语言模型(LLMs)近年来经历了显著的增长和开发。然而,进行LLMs的推理仍然成本高昂,尤其是在长上下文推理或资源受限的设备上。这促使开发新的后训练剪枝(PTP)方法。这些方法通过移除模型参数的大量部分来降低LLMs的要求。被丢弃的权重根据其对模型性能的影响进行选择。当前的PTP方法通过移除FFN层中信息较少的隐藏节点和最不重要的注意力层来剪枝模型。我们提出Putri,一种PTP方法,引入了三个改进:首先,更新未剪枝的FFN权重以补偿引入的剪枝误差;其次,按顺序剪枝FFN层,考虑之前层的更新;第三,而不是移除完整的注意力层,我们移除单个注意力头。我们扩展了这种方法,使其能够处理分组查询注意力。总之,Putri是一种保持简单但表现卓越的结构剪枝方法。在多个模型上进行剪枝实验,涵盖广泛的稀疏率范围和不同的数据集,验证了Putri的通用性。值得注意的是,我们证明,与以前的方法不同,Putri可以在极端稀疏率下剪枝LLMs。代码可在:https://github.com/Coello-dev/Putri 获取。

英文摘要:

Large Language Models (LLMs) have experienced significant growth and development in recent years. However, performing inference on LLMs remains costly, especially for long-context inference or in resource-constrained devices. This motivates the development of new post-training pruning (PTP) methods. These methods reduce LLMs' requirements by removing a substantial part of the model's parameters. The discarded weights are selected depending on their impact on the models performance. Current PTP methods prune the models by removing the less informative hidden nodes from the FFN layers, and the least important attention layers. We propose Putri, a PTP method that introduces three changes to the State-of-the-art. First, we update the un-pruned weights of the FFN to compensate for the introduced pruning error. Second, the FFN layers are pruned sequentially, taking into account the updates done to the previous layers. Third, instead of removing full attention layers, we remove individual attention-heads. We extend this method such that it can also address Grouped-Query Attention. In summary, Putri is a structure pruning method which remains simple while showing SOTA performance. Pruning experiments on multiple models with a wide variety of sparsity ranges and on different datasets, validate the generality of Putri. Notably, we demonstrate that, unlike previous methods, Putri can prune LLMs on extreme sparsity ratios. The code is available at: https://github.com/Coello-dev/Putri.

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

↑