Advanced Architecture

MoE Routing Explained for Mixture-of-Experts Models

Mixture-of-experts models activate only part of their parameters per token, which changes capacity, memory, routing, and deployment behavior.

AdvancedQuality v1.1
Author: DhirajReviewed by: InnoAI Technical Review12 min readPublished: 2026-05-13Last updated: 2026-08-01

What You Will Learn

  • - MoE models have total parameters and active parameters; both matter.
  • - Routing decides which experts process each token.
  • - MoE can improve capability per active compute but complicates serving.
  • - Memory planning must consider all resident experts, not only active ones.

Author and Review

Author: Dhiraj

Technical review: InnoAI Technical Review

Review process: Content is reviewed for technical clarity, deployment realism, and consistency with currently published product pages and tools.

Key Takeaways

  • - MoE models have total parameters and active parameters; both matter.
  • - Routing decides which experts process each token.
  • - MoE can improve capability per active compute but complicates serving.
  • - Memory planning must consider all resident experts, not only active ones.

1. What MoE means

A mixture-of-experts model contains multiple expert feed-forward networks and a router that selects which experts handle each token. Only a subset of experts is active for a given token, so active compute can be much smaller than total parameter count. This is why MoE models can advertise very large total parameters while using fewer active parameters during generation.

2. Total vs active parameters

Total parameters affect storage and memory because the experts generally need to be available to the runtime. Active parameters affect compute per token. Developers should not compare a dense 70B model and an MoE model using only total parameters. The relevant comparison depends on memory capacity, expert placement, active expert count, routing behavior, and runtime support.

3. How routing works

The router scores experts for each token and selects one or more experts. Some architectures use top-k routing, where each token is sent to a small number of experts. Routing quality matters because poor routing can waste expert capacity or hurt output quality. During inference, routing also affects load balance because some experts may become more active than others.

4. Deployment implications

MoE serving can be more complex than dense serving. All experts may need to reside in memory, expert parallelism may be useful, and load balance can affect throughput. A model with low active parameters may still require significant VRAM. Runtime support is especially important; an MoE architecture that is efficient in one engine may be awkward in another.

5. When MoE is attractive

MoE is attractive when a team wants high capability without activating all parameters for every token. It can work well for broad assistants, multilingual models, coding models, and systems that need a large knowledge or skill surface. The value is highest when serving infrastructure can handle the expert layout efficiently.

6. Risks and evaluation

MoE models can show uneven latency, expert imbalance, and surprising memory requirements. Evaluate with representative prompts across domains because routing behavior can vary by task. Measure not only average speed but p95 latency and GPU utilization. Also check whether quantization supports the MoE layers cleanly.

7. Comparison with dense models

Dense models are simpler to deploy and reason about because every token uses the same main parameter path. MoE models can be more efficient for capability, but they add routing and expert-management complexity. For small teams, a dense model may be easier unless the MoE model offers a clear quality or cost advantage on measured tasks.

8. Practical recommendation

Consider MoE when quality requirements exceed compact dense models and your runtime supports the architecture well. Do not assume active-parameter count equals memory requirement. Use the config fields for number of experts and active experts per token, then verify memory and latency on the target serving stack.

9. Top-k gating and load balancing

A mixture-of-experts layer replaces one feed-forward network with many, plus a lightweight router that scores the experts for each token and sends it to the top-k (often top-1 or top-2). The catch is balance: left alone, the router collapses onto a few favorite experts while others go unused, wasting capacity. Training adds an auxiliary load-balancing loss to spread tokens, and inference uses a capacity factor that caps how many tokens each expert accepts — excess tokens are dropped or padded. Understanding this explains why MoE quality can be uneven across domains where routing skews.

10. Expert parallelism and the all-to-all cost

At serving scale the experts are sharded across GPUs (expert parallelism), so after routing, tokens must be shipped to whichever GPU holds their chosen expert and the results shipped back — two all-to-all communication steps per MoE layer. This makes MoE inference bandwidth-sensitive in a way dense models are not: interconnect, not FLOPs, is frequently the bottleneck. It is also why a model advertising few active parameters can still demand a lot of VRAM and fast links — every expert must be resident even though each token only visits a couple.

11. Expert parallelism and the load-balance problem

Because experts are independent feed-forward blocks, they can be distributed across GPUs — expert parallelism — rather than sharding every matrix the way tensor parallelism does. This is attractive for very large mixture-of-experts models, since it keeps each device holding a manageable slice of total parameters. The complication is that routing is data-dependent, so the work each GPU receives depends entirely on which experts the incoming tokens happen to select. When a batch skews toward a handful of popular experts, those devices become the bottleneck while others idle, and because every device must synchronize at the end of the layer, the slowest determines the step time. Training addresses this with auxiliary load-balancing losses that push the router toward even utilization, and with capacity factors that cap how many tokens any single expert may accept, dropping the overflow. At inference you inherit whatever balance the trained router produces, and your levers are cruder: larger batches average out the skew, and some runtimes replicate the hottest experts across multiple devices. Two practical consequences follow. Latency on mixture-of-experts models is more variable than on dense models of comparable size, because it depends on the routing pattern of the specific batch, which makes p95 a far more honest metric than the mean. And a mixture-of-experts model that benchmarks well on one domain can behave differently on another, since a shift in subject matter shifts the routing distribution — so evaluate across the domains you actually serve rather than a single representative set.

Implementation Checklist

  • - Size memory from total parameters, not active parameters — every expert has to be resident.
  • - Read num_experts and num_experts_per_tok from config.json instead of inferring from the model name.
  • - Evaluate across task domains, because routing behaviour shifts with subject matter.
  • - Check quantization support for the expert layers specifically; MoE support lags dense support.
  • - Compare against a dense model of equal memory footprint before accepting the serving complexity.
  • - Size VRAM for all resident experts, not just the active-parameter count.
  • - Prefer fast interconnect; MoE all-to-all traffic is bandwidth-bound.
  • - Evaluate across domains — routing skew makes quality task-dependent.
  • - Confirm your runtime and quantization support the MoE layers cleanly.
  • - Check the config for num_experts and num_experts_per_tok before planning memory.

FAQ

Does MoE mean only active experts are stored?

No. Active experts reduce compute per token, but resident memory can still include many or all experts.

Are MoE models always faster?

No. Routing, expert loading, communication, and runtime support determine speed.

What config fields identify MoE?

Look for fields such as num_experts, num_local_experts, or num_experts_per_tok.

Why is latency less predictable on mixture-of-experts models?

Because routing is data-dependent. Which experts a batch activates depends on its content, so some steps concentrate work on a few devices while others spread it evenly. Every device synchronizes at the layer boundary, so the busiest one sets the step time. Track p95 rather than mean latency.

What is the capacity factor in a mixture-of-experts model?

It caps how many tokens each expert will process in a batch, as a multiple of the average. Tokens beyond the cap are dropped or padded. Higher capacity reduces dropped tokens but costs memory and compute; it is a balance-versus-efficiency knob.

Related Guides

Decision Resources

Sources and Methodology

This guide combines public model metadata with practical deployment heuristics used in InnoAI tools.

Continue Your Journey

Editorial Disclaimer

This guide is for informational and educational purposes only. Validate assumptions against your own workload, compliance requirements, and production environment before implementation.