达尔文语言模型:大语言模型的进化结构化剪枝
DarwinLM: Evolutionary Structured Pruning of Large Language Models
AI总结:
研究针对大语言模型计算成本高的问题,提出达尔文语言模型(DarwinLM),基于进化搜索过程,通过变异生成后代模型并经多步训练选择最优者,在多个模型上实验验证,实现结构化剪枝最优性能,压缩后训练所需数据更少。
摘要:
大语言模型(LLMs)在各种自然语言处理任务中取得了显著成功。然而,其巨大的计算成本限制了广泛应用,尤其是实时应用。结构化剪枝通过压缩模型直接提升端到端速度,提供了有效解决方案。模型不同组件对剪枝敏感度不同,需要非均匀压缩。为此,我们提出达尔文语言模型(DarwinLM),一种训练感知结构化剪枝方法。它基于进化搜索过程,通过变异生成多个后代模型并选择最优者。为评估训练后效果,在后代群体中纳入轻量级多步训练过程,逐步增加令牌数量并在每个选择阶段淘汰表现不佳的模型。我们通过对Llama-2-7B、Llama-3.1-8B和Qwen-2.5-14B-Instruct进行大量实验验证了该方法,实现了结构化剪枝的最优性能。例如,DarwinLM超越ShearedLlama,且在压缩后训练中所需训练数据少5倍。代码位于:此https URL
英文摘要:
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 DarwinLM, a method for training-aware structured pruning. DarwinLM 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, DarwinLM surpasses ShearedLlama while requiring 5x less training data during post-compression training. Code is at: https://github.com/IST-DASLab/DarwinLM
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。