Mixture of Experts
Inside the blocks · 2021+
The idea
Section titled “The idea”Most of the parameters live in the MLPs - so keep many and route.
Sparse MoE itself is older (Shazeer et al., 2017) - Switch Transformer is the paper that made it practical at scale: top-1 (not top-2) routing, and the first trillion-parameter model actually trained. DeepSeekMoE (2024, arXiv:2401.06066) is the more recent refinement - many small, fine-grained experts plus a few always-on shared ones - and is the specific recipe behind Kimi K3’s own expert layout, though this project’s film never names it as such.
The mechanics, in one pass: a small router scores each token against every expert and keeps the top-k. The experts’ weights live stacked in one tensor; tokens are sorted by their assigned expert, each expert multiplies its contiguous slice, and results scatter back to token order. That sort-then- group step is not decoration - it is what makes MoE fast on real hardware (see Batching & GPU kernels).
Verdict
Section titled “Verdict”The story, animated
Section titled “The story, animated”Every token visits a few experts, not the whole network. Watch the router pick, then the tokens sort into groups a GPU can multiply.
Where it sits
Section titled “Where it sits”Worth having first: Columns write back