Abstract
Mixture of Experts (MoE) architectures allow Large Language Models (LLMs) to scale parameters efficiently but suffer from linear computational scaling when multiple experts are selected. We present Merging Experts into One (MEO), a novel approach that merges the parameters of selected experts into a single "virtual" expert before inference. This decoupling of model capacity from inference cost allows MEO to achieve the performance gains of multi-expert models while maintaining the computational overhead of a single-expert model.
Introduction
Large Language Models (LLMs) often utilize Mixture of Experts (MoE) to increase parameter counts without a proportional rise in training costs. In a standard MoE, a gating network selects a subset of specialized sub-networks (experts) for each input. While selecting multiple experts (Top-$m$) significantly boosts model performance and representation diversity, it introduces a significant computational bottleneck: in standard MoE, the computational cost scales linearly with the number of experts selected. This "compute tax" often forces practitioners to use Top-1 selection, sacrificing accuracy for efficiency.
Methods
The core innovation of MEO is a fundamental change in the order of operations. In a standard MoE, the input is processed by $m$ different experts, and their outputs are subsequently weighted and summed. In contrast, MEO calculates a weighted sum of the parameters (weights and biases) of the $m$ selected experts to create one "merged" expert. The input is then processed by this single merged expert.
Because parameter merging (simple summation and multiplication) is computationally negligible compared to a full neural network forward pass, the cost of MEO remains nearly constant regardless of how many experts are selected. To address the challenge of token-level expert selection—which would normally require a unique weight merge for every token—the authors introduce a token-level attention block. This lightweight bottleneck adapter allows the model to maintain token-specific nuances while performing expert selection at the sequence level to keep weights stable.
Key Results
Computational Efficiency
Empirical testing on NVIDIA V100 GPUs confirms that MEO effectively breaks the scaling law of traditional MoE. As the number of selected experts increases from 1 to 16, MoE's inference time increases linearly, while MEO's inference time remains almost perfectly flat.
In BERT-Base experiments, MEO reduced FLOPs from 72.0G (vanilla MoE) to 28.9G, making it nearly as efficient as a standard dense model while retaining MoE's performance benefits.
Model Performance
MEO demonstrates consistent performance gains across diverse benchmarks including GLUE, XSum, WikiText-2, and SQuAD v1.1. On the GLUE benchmark, MEO achieved an average score of 83.0, outperforming both the vanilla dense model (80.5) and the standard MoE (82.8). On SQuAD, MEO achieved an Exact Match (EM) score of 82.1 using only 93.5G FLOPs, compared to MoE's 82.0 score at a much higher 221.3G FLOPs.
Conclusion
MEO provides a powerful, architecture-agnostic replacement for standard MoE layers. By merging expert parameters rather than outputs, it decouples model capacity from inference cost. This allows for the deployment of highly specialized, multi-expert models without the traditional computational penalties, paving the way for more efficient large-scale model architectures.
Summary updated