arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.12325cs.CL
收藏

从密集到动态:Token难度驱动的预训练LLM MoE化

From Dense to Dynamic: Token-Difficulty Driven MoEfication of Pre-Trained LLMs

Apple(苹果公司)

Kumari Nishu, Sachin Mehta, Samira Abnar, Mehrdad Farajtabar, Maxwell Horton, Mahyar Najibi, Moin Nabi, Minsik Cho, Devang Naik

AI总结:

本文提出DynaMoE框架,通过token难度感知路由器将预训练密集LLM低成本改造为动态MoE,仅用10B token和一次微调即可生成多种效率—准确率权衡模型,并以Flextron九分之一的微调成本达到相近下游总体准确率。

摘要:

针对不同推理约束训练大型语言模型(LLM)在计算上代价高昂,限制了对效率与准确率权衡的控制。此外,这些模型一旦训练完成,通常会统一处理所有token,而不考虑其复杂度,从而导致静态、不灵活的行为。本文提出一种训练后优化框架DynaMoE,它以极低的微调成本将预训练的密集LLM改造为token难度驱动的混合专家(Mixture-of-Experts)模型。这种改造使模型具备动态性,并提供敏感度控制,以自定义效率与准确率之间的平衡。DynaMoE的核心是一个token难度感知路由器,用于预测token难度并将其分配给合适的子网络或专家,从而让较大的专家处理更复杂的token,较小的专家处理较简单的token。实验表明,DynaMoE仅需一次微调步骤、使用10B个token,即可为现有已训练LLM生成一系列自适应模型变体;与基础模型训练相比,这一成本极低。每个变体都在准确率和性能之间提供不同的权衡。与基线训练后优化框架Flextron相比,本方法仅使用其九分之一的微调成本,却在下游任务上取得了相近的总体准确率。

英文摘要:

Training large language models (LLMs) for different inference constraints is computationally expensive, limiting control over efficiency-accuracy trade-offs. Moreover, once trained, these models typically process tokens uniformly, regardless of their complexity, leading to static and inflexible behavior. In this paper, we introduce a post-training optimization framework, DynaMoE, that adapts a pre-trained dense LLM to a token-difficulty-driven Mixture-of-Experts model with minimal fine-tuning cost. This adaptation makes the model dynamic, with sensitivity control to customize the balance between efficiency and accuracy. DynaMoE features a token-difficulty-aware router that predicts the difficulty of tokens and directs them to the appropriate sub-networks or experts, enabling larger experts to handle more complex tokens and smaller experts to process simpler ones. Our experiments demonstrate that DynaMoE can generate a range of adaptive model variants of the existing trained LLM with a single fine-tuning step, utilizing only $10B$ tokens, a minimal cost compared to the base model's training. Each variant offers distinct trade-offs between accuracy and performance. Compared to the baseline post-training optimization framework, Flextron, our method achieves similar aggregated accuracy across downstream tasks, despite using only $\frac{1}{9}\text{th}$ of their fine-tuning cost.

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

↑