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

Compresso:基于协作提示的结构化剪枝学习紧凑大型语言模型

Compresso: Structured Pruning with Collaborative Prompting Learns Compact Large Language Models

Microsoft Research(微软研究院)

Song Guo, Jiahang Xu, Li Lyna Zhang, Mao Yang

AI总结:

Compresso通过资源高效剪枝算法与LLM协作,在训练中学习最优剪枝决策,将LLaMA-7B剪至5.4B并保持甚至提升性能,显著优于一次性剪枝基线。

摘要:

尽管大型语言模型(LLMs)取得了显著成功,但其庞大的规模带来了严峻的部署挑战,尤其是在资源受限的硬件上。现有的LLM压缩方法主要聚焦于量化,而剪枝由于基于训练的方法成本高昂和数据收集困难,仍相对未被充分探索。一次性剪枝方法虽然成本效益高且无需数据,已成为LLM剪枝的主流,但在结构化剪枝设置下会导致性能下降。在本工作中,我们引入了一种新的结构化剪枝LLM范式,称为Compresso。我们的方法通过所提出的资源高效剪枝算法与LLM本身的协作,在训练过程中学习最优剪枝决策。Compresso通过在指令微调过程中将低秩适应(LoRA)融入$L_0$正则化,解决了训练成本高昂和数据收集困难的挑战。然后,我们通过引入一种协作提示来进一步增强剪枝算法,该提示促进LLM与剪枝算法之间的协作,显著提升整体性能。为此,Compresso将LLaMA-7B剪枝至5.4B,保持了原始性能,并在阅读理解上甚至超过LLaMA-7B达2.62%。大量实验表明,Compresso在各种稀疏比下显著优于一次性剪枝基线,在常识推理、阅读理解、MMLU和BBH基准上分别取得高达2.21%、11.43%、7.04%和4.81%的分数提升。

英文摘要:

Despite the remarkable success of Large Language Models (LLMs), the massive size poses significant deployment challenges, particularly on resource-constrained hardware. While existing LLM compression methods focus on quantization, pruning remains relatively unexplored due to the high cost of training-based approaches and data collection challenges. One-shot pruning methods, although cost-effective and data-free, have become dominant in LLM pruning, but lead to performance decline under the structured pruning setting. In this work, we introduce a new paradigm for structurally pruning LLMs, called Compresso. Our approach, through the collaboration of the proposed resource-efficient pruning algorithm and the LLM itself, learns optimal pruning decisions during the training process. Compresso addresses the challenges of expensive training costs and data collection by incorporating Low-Rank Adaptation (LoRA) into the $L_0$ regularization during the instruction tuning process. Then, we further augment the pruning algorithm by introducing a collaborative prompt that fosters collaboration between the LLM and the pruning algorithm, significantly boosting the overall performance. To this end, Compresso prunes LLaMA-7B to 5.4B, maintaining original performance and even surpassing LLaMA-7B in reading comprehension by 2.62%. Extensive experiments demonstrate that Compresso significantly outperforms one-shot pruning baselines across various sparsity ratios, achieving up to 2.21%, 11.43%, 7.04%, and 4.81% higher scores on the commonsense reasoning, reading comprehension, MMLU, and BBH benchmarks, respectively.

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

↑