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.


翻译:神经网络可通过剪枝有效压缩,在保持预测性能的同时显著降低存储和计算需求。简单而有效的方法(如幅度剪枝)会移除重要性较低的参数,通常需要昂贵的重训练过程以恢复性能。然而,随着大语言模型(LLMs)的兴起,由于内存和计算限制,完全重训练已变得不可行。本研究通过证明仅更新一小部分高表达性参数即可在剪枝后恢复甚至提升性能,从而挑战了重训练所有参数的常规做法。令人惊讶的是,在GPT架构模型中仅重训练0.01%-0.05%的参数,即可在不同稀疏度水平下达到与完全重训练相当的性能,显著降低了计算和内存需求,并使得在单块GPU上数分钟内重训练高达300亿参数的模型成为可能。为弥合高稀疏度下与完全重训练的差距,我们引入了两种新颖的LoRA变体,与标准LoRA不同,它们允许在不损害稀疏性的前提下合并适配器。进一步地,我们证明这些方法可应用于内存高效的逐层重建,显著提升了无需重训练的先进方法(如Wanda(Sun等人,2023)和SparseGPT(Frantar & Alistarh,2023))的性能。我们的研究结果为避免重训练提供了一种有前景的替代方案。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
RAG与RAU:自然语言处理中的检索增强语言模型综述
专知会员服务
87+阅读 · 2024年5月3日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员