2025-02-17 · 专家 · 自然语言处理 · 机器学习

DarwinLM: Evolutionary Structured Pruning of Large Language Models

DarwinLM通过进化搜索和训练感知的结构化剪枝,实现了大型语言模型的压缩,同时保持了较高的性能。

更新于 2025-02-17。作者:Shengkun Tang、Oliver Sieberling、Eldar Kurtic、Zhiqiang Shen、Dan Alistarh。

中文摘要

大型语言模型(LLMs)在各种自然语言处理(NLP)任务中取得了显著的成功。然而,它们的巨大计算成本限制了它们的广泛应用,尤其是在实时应用中。结构化剪枝提供了一种有效的解决方案,通过压缩模型并直接提供端到端的速度提升,不受硬件环境的影响。同时,模型的各个组件对剪枝的敏感性各不相同,这要求进行非均匀模型压缩。然而,剪枝方法不仅应该识别出有能力的子结构,还应该考虑压缩后的训练。为此,我们提出了\sysname,这是一种训练感知的结构化剪枝方法。\sysname基于进化搜索过程,通过变异在每个世代中生成多个后代模型,并选择最适应的模型进行生存。为了评估训练后效果,我们在后代群体中引入了一个轻量级的多步骤训练过程,逐步增加标记数,并在每个选择阶段消除表现不佳的模型。我们通过在Llama-2-7B、Llama-3.1-8B和Qwen-2.5-14B-Instruct上的广泛实验验证了我们的方法,实现了结构化剪枝的最新性能。例如,\sysname在压缩后训练过程中所需的训练数据量比ShearedLlama少5倍,却超越了ShearedLlama。

英文摘要

Large Language Models (LLMs) have achieved significant success across various NLP tasks. However, their massive computational costs limit their widespread use, particularly in real-time applications. Structured pruning offers an effective solution by compressing models and directly providing end-to-end speed improvements, regardless of the hardware environment. Meanwhile, different components of the model exhibit varying sensitivities towards pruning, calling for non-uniform model compression. However, a pruning method should not only identify a capable substructure, but also account for post-compression training. To this end, we propose \sysname, a method for training-aware structured pruning. \sysname builds upon an evolutionary search process, generating multiple offspring models in each generation through mutation, and selecting the fittest for survival. To assess the effect of post-training, we incorporate a lightweight, multistep training process within the offspring population, progressively increasing the number of tokens and eliminating poorly performing models in each selection stage. We validate our method through extensive experiments on Llama-2-7B, Llama-3.1-8B and Qwen-2.5-14B-Instruct, achieving state-of-the-art performance for structured pruning. For instance, \sysname surpasses ShearedLlama while requiring 5times less training data during post-compression training.

解读

一句话总结

DarwinLM通过进化搜索和训练感知的结构化剪枝,实现了大型语言模型的压缩,同时保持了较高的性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt