先正则化再剪枝,让大模型瘦身不丢性能
DReSS: Data-driven Regularized Structured Streamlining for Large Language Models
- 先用少量数据对要剪的模块做正则化,提前传递关键信息
- 在极端剪枝比下仍保持强语言能力,延迟降低、吞吐提升
- 适合需要高效部署大模型的场景,如边缘计算
大语言模型在多个领域取得显著进展,但规模增大导致计算和内存开销上升。近期研究发现大模型具有稀疏性,为通过剪枝压缩模型规模提供了可能。然而现有剪枝方法多采用先剪后微调的范式,被剪除部分仍含重要信息,直接移除常导致不可逆性能下降,微调阶段需大量计算恢复性能。本文提出一种新范式:先正则化,再剪枝,最后微调。基于此,我们提出DReSS——一种简单高效的面向大模型的数据驱动正则化结构化精简方法。通过少量数据对将被剪枝的组件进行正则化,可提前将关键信息显式转移到剩余模型部分。相比直接剪枝,该方法有效减少参数移除带来的信息损失,从而增强语言建模能力。实验表明,即使在极端剪枝比例下,DReSS显著优于现有剪枝方法,显著降低延迟并提高吞吐量。
原文摘要 · Abstract (English)
Large language models (LLMs) have achieved significant progress across various domains, but their increasing scale results in high computational and memory costs. Recent studies have revealed that LLMs exhibit sparsity, providing the potential to reduce model size through pruning techniques. However, existing pruning methods typically follow a prune-then-finetune paradigm. Since the pruned components still contain valuable information, their direct removal often leads to irreversible performance degradation, imposing a substantial computational burden to recover performance during finetuning. In this paper, we propose a novel paradigm that first applies regularization, then prunes, and finally finetunes. Based on this paradigm, we introduce DReSS, a simple and effective Data-driven Regularized Structured Streamlining method for LLMs. By leveraging a small amount of data to regularize the components to be pruned, DReSS explicitly transfers the important information to the remaining parts of the model in advance. Compared to direct pruning, this can reduce the information loss caused by parameter removal, thereby enhancing its language modeling capabilities. Experimental results demonstrate that DReSS significantly outperforms existing pruning methods even under extreme pruning ratios, significantly reducing latency and increasing throughput.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。