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

PERP:在大语言模型时代重新思考剪枝-再训练范式

PERP: Rethinking the Prune-Retrain Paradigm in the Era of LLMs

Department for AI in Society, Science, and Technology, Zuse Institute Berlin, Germany(人工智能与社会、科学与技术部门,柏林Zuse研究所);Institute of Mathematics, Technische Universität Berlin, Germany(数学研究所,柏林技术大学)

Max Zimmer, Megi Andoni, Christoph Spiegel, Sebastian Pokutta

AI总结:

PERP提出通过更新少量高表达性参数实现高效再训练,无需全量再训练即可在稀疏度范围内恢复性能,显著降低计算和内存需求。

摘要:

神经网络可以通过剪枝有效压缩,显著降低存储和计算需求,同时保持预测性能。简单而有效的剪枝方法如幅度剪枝会移除不重要的参数,通常需要昂贵的再训练过程来恢复性能。然而,随着大语言模型(LLMs)的兴起,全量再训练由于内存和计算限制变得不可行。本研究挑战全量再训练的做法,证明通过更新少量高表达性参数即可在剪枝后恢复或甚至提升性能。令人惊讶的是,在GPT架构中仅重新训练0.01%-0.05%的参数可以匹配全量再训练在各种稀疏度水平上的性能,显著降低计算和内存需求,并使在单个GPU上对拥有300亿参数的模型进行再训练只需几分钟。为在高稀疏度范围内接近全量再训练,我们引入了两种新颖的LoRA变体,不同于标准LoRA,它们允许在不牺牲稀疏度的情况下合并适配器。进一步地,我们证明这些方法可以用于内存高效的逐层重建,显著增强无再训练方法如Wanda(Sun等,2023)和SparseGPT(Frantar & Alistarh,2023)的最先进性能。我们的发现提供了一种有前途的避免再训练的替代方案。

英文摘要:

Neural Networks can be effectively compressed through pruning, significantly reducing storage and compute demands while maintaining predictive performance. Simple yet effective methods like magnitude pruning remove less important parameters and typically require a costly retraining procedure to restore performance. However, with the rise of LLMs, full retraining has become infeasible due to memory and compute constraints. This study challenges the practice of retraining all parameters by showing that updating a small subset of highly expressive parameters can suffice to recover or even enhance performance after pruning. Surprisingly, retraining just 0.01%-0.05% of the parameters in GPT-architectures can match the performance of full retraining across various sparsity levels, significantly reducing compute and memory requirements, and enabling retraining of models with up to 30 billion parameters on a single GPU in minutes. To bridge the gap to full retraining in the high sparsity regime, we introduce two novel LoRA variants that, unlike standard LoRA, allow merging adapters back without compromising sparsity. Going a step further, we show that these methods can be applied for memory-efficient layer-wise reconstruction, significantly enhancing state-of-the-art retraining-free methods like Wanda (Sun et al., 2023) and SparseGPT (Frantar & Alistarh, 2023). Our findings present a promising alternative to avoiding retraining.

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

↑