Mixture of Experts (MoE) Inference

MoE architecture, top-K expert routing, expert parallelism, load balancing, all-to-all communication, and DeepSeek MoE optimization patterns for efficient inference at scale.

Overview

Mixture of Experts (MoE) models replace the dense feed-forward network (FFN) in each transformer layer with N expert FFNs and activate only a few (typically top-2) per token. Parameter count grows without a matching growth in per-token compute. DeepSeek-V3 (671B parameters, 37B active per token) and Mixtral 8x7B/8x22B are the prominent examples.

Capacity versus compute

The point of an MoE is to buy capacity without paying for it in compute. Compare a dense model with a 16-expert MoE of the same hidden dimension. The MoE holds about 8x the parameters, yet each token runs through only 2 experts where the dense model runs one FFN, so its compute per token stays similar to the dense baseline.

Interview questions

  • How would you serve DeepSeek-V3 (671B params, 37B active) efficiently on a multi-node H100 cluster?

Sign up free to read the full topic

More AI Infrastructure topics

Start free on Cariara · Coding problems · System design studio