Book a demo →

Mixture of Experts (MoE)

Definition

Mixture of experts swaps layers of a model for experts and a router that picks a few per token. Total and active parameters, examples with dates, limits.

In short

Mixture of experts (MoE) is a model design in which some layers consist of many sub-networks, called experts, and a router switches on only a few of them for each token. An MoE model therefore has two parameter counts: Mixtral 8x7B has 47 billion in total and uses 13 billion per token.

What mixture of experts is

Mixture of experts (MoE) is a way of building a neural network in which some layers consist of many smaller sub-networks, called experts, and a router sends each input to only a few of them. IBM Think (retrieved 5 December 2026) defines it as “a machine learning approach that divides an artificial intelligence (AI) model into separate sub-networks (or ‘experts’), each specializing in a subset of the input data, to jointly perform a task.”

In a large language model built on the transformer, the experts take the place of the feed-forward layers. The transformer architecture entry explains that feed-forward layer and the attention layer next to it. The Hugging Face blog (11 December 2023) names two elements: “Sparse MoE layers are used instead of dense feed-forward network (FFN) layers”, and a gate network or router that decides which tokens are sent to which expert. The rest of the model stays shared. Wikipedia classes the approach with ensemble methods: “MoE represents a form of ensemble learning.”

The Hugging Face blog defines each expert as “a neural network”; in practice, it says, the experts are feed-forward networks. Whether experts end up handling particular topics has been measured, with results described below.

Where it comes from

The idea predates today's language models. Jacobs, Jordan, Nowlan and Hinton described it in Neural Computation in 1991: “We present a new supervised learning procedure for systems composed of many separate networks, each of which learns to handle a subset of the complete set of training cases.” IBM and the Hugging Face blog both name this paper as the origin. Wikipedia starts its history with the meta-pi network of Hampshire and Waibel.

Paper and dateWhat it added
Jacobs et al., Neural Computation, 1991Separate networks, each learning a subset of the training cases
Shazeer et al., arXiv, 23 Jan 2017A sparsely gated MoE layer with up to 137 billion parameters, between LSTM layers
Lepikhin et al. (GShard), arXiv, 30 Jun 2020MoE in a transformer translation model beyond 600 billion parameters
Fedus et al. (Switch Transformer), arXiv, 11 Jan 2021One expert per token; models with 395 billion and 1.6 trillion parameters

Dates of the first arXiv versions. Wikipedia dates Switch Transformer to 2022, the year of its journal version.

Shazeer et al. made the selection sparse: “A trainable gating network determines a sparse combination of these experts to use for each example.” They applied it “to the tasks of language modeling and machine translation”. GShard let each token go to at most two experts. Switch Transformer cut that to one: “we instead use a simplified strategy where we route to only a single expert.”

How it works

Mixtral 8x7B from Mistral AI shows the mechanism. Its paper (Jiang et al., 8 January 2024) describes each layer as 8 feedforward blocks: “For every token, at each layer, a router network selects two experts to process the current state and combine their outputs.” The router produces a gating vector, a weight for every expert, and “If the gating vector is sparse, we can avoid computing the outputs of experts whose gates are zero.” Experts that a token does not reach do no work for that token. The paper states the purpose: the technique “increases the number of parameters of a model while controlling cost and latency”.

This creates two parameter counts. The Mixtral paper separates the “total parameter count (commonly referenced as the sparse parameter count)” from the parameters used for one token, “called the active parameter count”. For Mixtral 8x7B: “each token has access to 47B parameters, but only uses 13B active parameters during inference.” The total is not eight times seven billion. The Hugging Face blog asks “Why 47B parameters and not 8 x 7B = 56B?” and answers that only the FFN layers are experts, while “the rest of the model parameters are shared.”

Training has to keep the experts evenly used. The Hugging Face blog: “In a normal MoE training, the gating network converges to mostly activate the same few experts.” The usual remedy is an extra loss term: “an auxiliary loss is added to encourage giving all experts equal importance.” GShard also sets an expert capacity, a ceiling on how many tokens one expert processes. DeepSeek-V3 (27 December 2024) uses “an auxiliary-loss-free strategy for load balancing”.

What an expert learns has been measured, and the measurements found no experts for topics. The Mixtral authors compared which experts handled texts from different domains, such as arXiv papers: “Surprisingly, we do not observe obvious patterns in the assignment of experts based on the topic.” They found patterns of another kind: “This suggests that the router does exhibit some structured syntactic behavior”. The Hugging Face blog reports from the ST-MoE paper that “encoder experts specialize in a group of tokens or shallow concepts”, such as punctuation, and that “there is no single expert specialized in any given language”. IBM's phrase about experts specializing in a subset of the input data is part of a definition; the routing analyses above are measurements.

A router picks two of eight experts for each token; only those two compute, and their outputs are added after weighting by the router. Source: Jiang et al., “Mixtral of Experts”, arXiv, 8 January 2024 (Figure 1, Section 2.1).

Variants

MoE models differ mainly in how many experts a token reaches and whether some experts are always on.

VariantSource
One expert per tokenSwitch Transformer, 11 Jan 2021
Two experts per tokenGShard, 30 Jun 2020; Mixtral, 8 Jan 2024
Shared experts plus routed expertsDeepSeekMoE, 11 Jan 2024; DeepSeek-V2, 7 May 2024
Many small routed experts, 8 of 256 per tokenDeepSeek-V3, 27 Dec 2024

DeepSeek's design keeps some experts active for every token. DeepSeek-V2 describes splitting experts into finer pieces and “isolating some shared experts for mitigating knowledge redundancy among routed experts”. In DeepSeek-V3, each MoE layer “consists of 1 shared expert and 256 routed experts”, and “8 experts will be activated for each token”. The entry on multi-token prediction explains a training objective of the same model.

Examples with parameter counts

Model (maker, date)Total / active
Switch Transformer (Fedus et al., 11 Jan 2021)1.6 trillion / one expert per layer
Mixtral 8x7B (Mistral AI, paper, 8 Jan 2024)47B / 13B
Mixtral 8x7B (Mistral AI, announcement, 11 Dec 2023)46.7B / 12.9B
Mixtral 8x22B (Mistral AI, 17 Apr 2024)141B / 39B
DeepSeek-V2 (DeepSeek-AI, 7 May 2024)236B / 21B
DeepSeek-V3 (DeepSeek-AI, 27 Dec 2024)671B / 37B
Qwen3-235B-A22B (Qwen Team, 14 May 2025)235B / 22B
gpt-oss-120b (OpenAI, 8 Aug 2025)116.8B / 5.1B
gpt-oss-20b (OpenAI, 8 Aug 2025)20.9B / 3.6B

Figures as each maker published them on the date given; not a ranking and not a current list. Makers count “active” differently: OpenAI counts unembedding parameters as active, embeddings not.

Mistral published two sets of figures for the same model. The paper gives 47B and 13B, the announcement “46.7B total parameters but only uses 12.9B parameters per token”. The paper's figures match the announcement's when rounded. For Switch Transformer the paper gives no active count; it matches the compute of its T5 baseline “because a single expert is always used per layer”.

For GPT-4, OpenAI's technical report (15 March 2023) says it “contains no further details about the architecture (including model size), hardware, training compute, dataset construction, training method, or similar.” Among OpenAI's models, MoE is documented for gpt-oss.

Limits

Memory follows the total count. A token uses a few experts, but all of them must be loaded. The Mixtral paper: “The memory costs for serving Mixtral are proportional to its sparse parameter count, 47B”. The Hugging Face blog: “all parameters need to be loaded in RAM, so memory requirements are high.”

Switch Transformer (2021) says what had held MoE back: “widespread adoption has been hindered by complexity, communication costs and training instability”. Its authors present their model as the answer to these three. For fine-tuning, the Hugging Face blog reports that “Sparse models are more prone to overfitting”, and from the Flan-MoE results that “MoEs might benefit much more from instruction tuning than dense models.” It adds that sparse models “have different fine-tuning hyperparameter setups”, for example smaller batch sizes and higher learning rates.

Hardware use depends on the workload. The Mixtral authors write that MoE layers add overhead from routing and from memory loads, and: “They are more suitable for batched workloads where one can reach a good degree of arithmetic intensity.”

Dense model. In a dense model, every token passes through the same feed-forward layers that an MoE model replaces with experts. The Hugging Face blog warns that “one cannot directly compare the number of parameters between sparse and dense models, as both represent significantly different things”, and advises: “For low throughput scenarios with little VRAM, a dense model will be better.” Qwen3 (14 May 2025) uses both designs in one family: six dense models up to Qwen3-32B and two MoE models.

Small language model. MoE does not make a model small, because memory follows the total count. Mixtral 8x7B, at 46.7 billion parameters in total, lies above every size limit listed in the entry on small language models (5 to 40 billion). Its 12.9 billion active parameters would fall inside only the highest of them, 40 billion. This comparison is ours, made from the published figures.

Ensemble. Wikipedia counts MoE as a form of ensemble learning. In Mixtral the experts sit inside one network: “the feedforward block picks from a set of 8 distinct groups of parameters”.

Source

  • IBM Think, “What is mixture of experts?”. Source for the definition (retrieved 2026-12-05): https://www.ibm.com/think/topics/mixture-of-experts
  • Hugging Face blog, “Mixture of Experts Explained” (11 December 2023). Source for the two elements, shared parameters, load balancing, the ST-MoE findings, memory, fine-tuning and dense versus sparse (retrieved 2026-12-05): https://huggingface.co/blog/moe
  • Wikipedia, “Mixture of experts”. Source for ensemble learning, the meta-pi network, use in transformer models and the 2022 date of Switch Transformer (retrieved 2026-12-05): https://en.wikipedia.org/wiki/Mixture_of_experts
  • Jacobs, Jordan, Nowlan and Hinton, “Adaptive Mixtures of Local Experts”, Neural Computation 3(1), 79–87 (1991), abstract via OpenAlex. Source for the 1991 procedure (retrieved 2026-12-05): https://doi.org/10.1162/neco.1991.3.1.79
  • Shazeer et al., “Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer” (arXiv 1701.06538, 23 January 2017). Source for the sparsely gated layer and its size (retrieved 2026-12-05): https://arxiv.org/abs/1701.06538
  • Lepikhin et al., “GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding” (arXiv 2006.16668, 30 June 2020). Source for two experts per token, expert capacity and the 600 billion model (retrieved 2026-12-05): https://arxiv.org/abs/2006.16668
  • Fedus, Zoph and Shazeer, “Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity” (arXiv 2101.03961, 11 January 2021). Source for one expert per token, model sizes, training obstacles and pre-training speed (retrieved 2026-12-05): https://arxiv.org/abs/2101.03961
  • Jiang et al. (Mistral AI), “Mixtral of Experts” (arXiv 2401.04088, 8 January 2024). Source for the router, total and active parameters, routing analysis, memory and hardware use (retrieved 2026-12-05): https://arxiv.org/abs/2401.04088
  • Mistral AI, “Mixtral of experts” (11 December 2023). Source for the 46.7B and 12.9B figures (retrieved 2026-12-05): https://mistral.ai/news/mixtral-of-experts/
  • Mistral AI, “Cheaper, Better, Faster, Stronger” (17 April 2024). Source for Mixtral 8x22B (retrieved 2026-12-05): https://mistral.ai/news/mixtral-8x22b/
  • Dai et al. (DeepSeek-AI), “DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models” (arXiv 2401.06066, 11 January 2024). Source for shared experts (retrieved 2026-12-05): https://arxiv.org/abs/2401.06066
  • DeepSeek-AI, “DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model” (arXiv 2405.04434, 7 May 2024). Source for DeepSeek-V2 and shared experts (retrieved 2026-12-05): https://arxiv.org/abs/2405.04434
  • DeepSeek-AI, “DeepSeek-V3 Technical Report” (arXiv 2412.19437, 27 December 2024). Source for DeepSeek-V3, its expert layout and load balancing (retrieved 2026-12-05): https://arxiv.org/abs/2412.19437
  • Qwen Team, “Qwen3 Technical Report” (arXiv 2505.09388, 14 May 2025). Source for the Qwen3 models (retrieved 2026-12-05): https://arxiv.org/abs/2505.09388
  • OpenAI, “gpt-oss-120b & gpt-oss-20b Model Card” (arXiv 2508.10925, 8 August 2025). Source for the gpt-oss parameter counts and how active parameters are counted (retrieved 2026-12-05): https://arxiv.org/abs/2508.10925
  • OpenAI, “GPT-4 Technical Report” (arXiv 2303.08774, 15 March 2023). Source for the statement on undisclosed architecture (retrieved 2026-12-05): https://arxiv.org/abs/2303.08774

Frequently asked questions

What does MoE stand for in AI?

MoE stands for mixture of experts: a model design in which some layers hold many sub-networks, called experts, and a router sends each token to a few of them. In Mixtral 8x7B, for example, each layer has eight experts and each token goes to two.

What is MoE used for?

To build models with more parameters without raising the compute per token by the same amount. Shazeer et al. (2017) applied it to language modeling and machine translation. Wikipedia writes that MoE layers are used in the largest transformer models. Mixtral, DeepSeek-V3, Qwen3-235B-A22B and gpt-oss are documented MoE models.

Is GPT-4 a mixture of experts?

OpenAI's GPT-4 technical report (15 March 2023) gives no details about the architecture or model size. OpenAI documents MoE for its open-weight gpt-oss models (8 August 2025): gpt-oss-120b has 116.8 billion parameters in total and 5.1 billion active per token.

What is the difference between a dense model and an MoE model?

A dense model sends every token through all its feed-forward parameters. An MoE model sends each token through a few experts, so compute follows the active count and memory follows the total. The Mixtral paper puts its serving memory at 47 billion parameters, while each token uses 13 billion.

Are MoE models faster to train?

For the same compute budget, Switch Transformer and the Hugging Face blog report faster pretraining. The Switch paper gives up to 7x faster pre-training with the same computational resources, for models based on T5-Base and T5-Large (January 2021). For fine-tuning, the Hugging Face blog notes that sparse models overfit more easily.

Is Qwen3 an MoE model?

The Qwen3 family contains both designs. Its technical report (14 May 2025) lists six dense models, from Qwen3-0.6B to Qwen3-32B, and two MoE models. The flagship Qwen3-235B-A22B has 235 billion parameters in total and 22 billion activated per token.