让专家模型按需瘦身,实现更平滑的算力与精度权衡。
MoSE: Mixture of Slimmable Experts for Efficient and Adaptive Language Models
- 每个专家可动态调整宽度,实现细粒度算力控制。
- 在相同算力下,模型精度优于传统MoE,FLOPs更低。
- 适合需要灵活部署的场景,如边缘设备或实时应用。
Mixture-of-Experts(MoE)模型通过稀疏激活专家高效扩展大语言模型,但一旦专家被选中,就会完整执行。这导致精度与计算量之间的权衡存在显著断点。我们提出混合可瘦身专家(MoSE),其每个专家具有嵌套的可裁剪结构,可在不同宽度下执行。这使得条件计算不仅体现在激活哪些专家,还体现在每个专家的使用程度上。因此,单个预训练的MoSE模型可在推理时支持更连续的精度-算力权衡。我们提出一种简单且稳定的训练方法,结合多宽度训练与标准MoE目标。推理时,探索了运行时宽度确定策略,包括一种轻量级测试时训练机制,可学习如何在固定预算下将路由器置信度映射到专家宽度。在GPT风格模型、多种路由机制、零样本下游推理基准以及DeepSeek模型持续预训练适应任务上的实验表明,MoSE在全宽时达到或超越标准MoE性能,并始终将算力-质量前沿推向更低的推理FLOPs。代码见:https://github.com/tnurbek/mose。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) models scale large language models efficiently by sparsely activating experts, but once an expert is selected, it is executed fully. Hence, the trade-off between accuracy and computation in an MoE model typically exhibits large discontinuities. We propose Mixture of Slimmable Experts (MoSE), an MoE architecture in which each expert has a nested, slimmable structure that can be executed at variable widths. This enables conditional computation not only over which experts are activated but also over how much of each expert is utilized. Consequently, a single pretrained MoSE model can support a more continuous spectrum of accuracy-compute trade-offs at inference time. We present a simple and stable training recipe for slimmable experts under sparse routing, combining multi-width training with standard MoE objectives. During inference, we explore strategies for runtime width determination, including a lightweight test-time training mechanism that learns how to map router confidence/probabilities to expert widths under a fixed budget. Experiments on GPT-style models, various routing regimes, zero-shot downstream reasoning benchmarks, and continual pre-training adaptation of DeepSeek model show that MoSE matches or improves standard MoE at full width and consistently shifts the compute-quality frontier toward lower inference FLOPs. The code can be found at: https://github.com/tnurbek/mose.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。