SDE & MLE Prep

Mixture of Experts (MoE)

Q: What is a mixture-of-experts layer and why use it?

Replace a dense FFN with E expert FFNs and a router that sends each token to the top-k experts (k = 1–2). Parameters grow ~E×, compute per token stays ~constant → more capacity for the same FLOPs (Switch Transformer, Mixtral, many frontier LLMs). Challenges: load balancing (auxiliary loss so experts are used evenly), expert capacity limits / token dropping, all-to-all communication across devices (expert parallelism), and higher memory to hold all experts.