arXiv:2509.26520cs.CL2025-09被引 5

让专家模型在推理时灵活调整计算量,性能不下降。

Training Matryoshka Mixture-of-Experts for Elastic Inference-Time Expert Utilization

  • 训练时动态调整激活专家数,让模型学会从粗到细的协作机制。
  • 同一模型在不同专家数量下表现接近专用模型,仅需少量训练成本。
  • 适合需要弹性计算的部署场景,如资源受限或分层优化需求。

Mixture-of-Experts(MoE)是一种可高效扩展大语言模型而无需成比例增加计算成本的有前景范式。然而,标准的Top-K路由策略限制了MoE模型在推理时实现弹性能力的潜力。当推理阶段激活的专家数量改变时,模型性能会急剧下降。本文提出马赛克专家模型(Matryoshka MoE, M-MoE),将从粗到细的结构直接嵌入专家集合中。通过在训练过程中系统性地改变激活专家数量,M-MoE迫使模型学习一种有意义的排序:排名靠前的专家协作提供基础、粗粒度能力,后续专家逐步补充更精细的细节。我们在多个粒度层次上探索该原则,发现层级随机化策略最有效。实验表明,单个M-MoE模型展现出卓越弹性,其在不同专家数量下的性能几乎媲美一整套专用模型,但总训练成本仅为后者的极小部分。这种灵活性不仅支持弹性推理,还允许对不同模型层分配不同计算预算以优化性能。本工作为大规模MoE模型的实际与可适应部署铺平了道路。

原文摘要 · Abstract (English)

Mixture-of-Experts (MoE) has emerged as a promising paradigm for efficiently scaling large language models without a proportional increase in computational cost. However, the standard training strategy of Top-K router prevents MoE models from realizing their full potential for elastic inference. When the number of activated experts is altered at inference time, these models exhibit precipitous performance degradation. In this work, we introduce Matryoshka MoE (M-MoE), a training framework that instills a coarse-to-fine structure directly into the expert ensemble. By systematically varying the number of activated experts during training, M-MoE compels the model to learn a meaningful ranking: top-ranked experts collaborate to provide essential, coarse-grained capabilities, while subsequent experts add progressively finer-grained detail. We explore this principle at multiple granularities, identifying a layer-wise randomization strategy as the most effective. Our experiments demonstrate that a single M-MoE model achieves remarkable elasticity, with its performance at various expert counts closely matching that of an entire suite of specialist models, but at only a fraction of the total training cost. This flexibility not only unlocks elastic inference but also enables optimizing performance by allocating different computational budgets to different model layers. Our work paves the way for more practical and adaptable deployments of large-scale MoE models.

MoE弹性推理专家模型大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。