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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Wang, Yaoxiang, Hu, Qingguo, Ding, Yucheng, Wang, Ruizhe, Gong, Yeyun, Jiao, Jian, Shen, Yelong, Cheng, Peng, Su, Jinsong
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866914068419313664
author Wang, Yaoxiang
Hu, Qingguo
Ding, Yucheng
Wang, Ruizhe
Gong, Yeyun
Jiao, Jian
Shen, Yelong
Cheng, Peng
Su, Jinsong
author_facet Wang, Yaoxiang
Hu, Qingguo
Ding, Yucheng
Wang, Ruizhe
Gong, Yeyun
Jiao, Jian
Shen, Yelong
Cheng, Peng
Su, Jinsong
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2509_26520
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Training Matryoshka Mixture-of-Experts for Elastic Inference-Time Expert Utilization
Wang, Yaoxiang
Hu, Qingguo
Ding, Yucheng
Wang, Ruizhe
Gong, Yeyun
Jiao, Jian
Shen, Yelong
Cheng, Peng
Su, Jinsong
Computation and Language
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.
title Training Matryoshka Mixture-of-Experts for Elastic Inference-Time Expert Utilization
topic Computation and Language
url https://arxiv.org/abs/2509.26520