arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2411.07066cs.LGcs.AIcs.CL

基于零阶自适应神经元对齐的无需重训练剪枝

Zeroth-Order Adaptive Neuron Alignment Based Pruning without Re-Training

University of Trento(特伦托大学)

Elia Cunegatti, Leonardo Lucio Custode, Giovanni Iacca

AI总结:

本文提出NeuroAl算法,通过利用密集模型激活信息自适应调整块级和行级稀疏性,在无需重训练的情况下提升LLM剪枝后的神经元对齐,并在多个模型和任务上验证其优于现有方法。

摘要:

网络剪枝专注于通过移除模型的一部分参数来降低给定模型的计算成本,同时对性能影响最小的算法。在过去十年中,最广泛使用的剪枝范式是剪枝加重训练,但如今由于存在大量预训练模型,这种方法变得不方便,因为这些模型无论如何都过于昂贵而无法重训练。在本文中,我们利用密集预训练模型的功能信息,即其输入激活,来获得稀疏模型,使激活相对于其对应的密集模型的对齐最大化。因此,我们提出了 \textbf{NeuroAl},一种 \emph{叠加} 算法,可用于任何给定的 LLM 剪枝算法之上,它修改块级和行级稀疏性,利用密集模型及其稀疏版本的信息来最大化激活之间的 \emph{神经元对齐}。与现有方法不同,我们的方法根据模型和期望的稀疏度,自适应地选择块级和行级稀疏率的最佳超参数,并且 \emph{无需重训练}。我们在约 300 个测试用例上测试了我们的方法,涉及四个 LLM 家族、三种稀疏率和十个语言任务(三个语言建模和七个零样本数据集),表明它在性能-运行时间权衡方面始终优于最新的最先进方法。代码可在 \href{https://github.com/eliacunegatti/NeuroAL}{https://github.com/eliacunegatti/NeuroAL} 获取。

英文摘要:

Network pruning focuses on algorithms that aim to reduce a given model's computational cost by removing a subset of its parameters while having minimal impact on performance. Throughout the last decade, the most widely used pruning paradigm has been pruning and re-training, which nowadays is inconvenient due to the vast amount of pre-trained models, which are, in any case, too expensive to re-train. In this paper, we exploit functional information from dense pre-trained models, i.e., their input activations, to obtain sparse models that maximize the activations' alignment with respect to their corresponding dense models. Hence, we propose \textbf{NeuroAl}, a \emph{top-up} algorithm that can be used on top of any given pruning algorithm for LLMs, which modifies the block-wise and row-wise sparsity, exploiting information from both the dense model and its sparse version to maximize the \emph{neuron alignment} among activations. Different from existing methods, our approach adaptively selects the best hyperparameters for the block-wise and row-wise sparsity ratios w.r.t. the model and the desired sparsity, and requires \emph{no re-training}. We test our method over $\sim$300 test cases with four LLM families, three sparsity ratios, and ten language tasks (three language modeling and seven zero-shot datasets), showing how it consistently outperforms the latest state-of-the-art methods in terms of performance-runtime trade-off. The code is available at \href{https://github.com/eliacunegatti/NeuroAL}{https://github.com/eliacunegatti/NeuroAL}.

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

↑