Select the correct comparisons of an MoE transformer versus a dense transformer at equal active parameters
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
At equal active params, MoE wins on quality-per-FLOP at scale but loses on HBM (must store all experts) and on small-batch latency (routing fragments matmul).
Think of dense as a well-organized worker who keeps every skill in their head; limited by how much they can memorize. MoE is more like a small office of specialists: more total knowledge stored on the shelves, but only one or two of them get pulled in for any given task, so the per-task work stays the same. The catch is that all the specialists have to stay in the office (HBM) even when they aren't working, and when only one customer walks in at a time (batch 1), the receptionist's handoff becomes a bottleneck. Llama 4 Maverick is 128 specialists with top-1 routing; vast shelf, one specialist per token.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: explain the param separation, name the three costs (HBM, batch-1 latency, all to all training), confirm attention and block recipe are unchanged.
| Dimension | Dense (at X active params) | MoE (at X active params) |
|---|---|---|
| Total parameters | X | X · (N / k), much larger |
| Active FLOPs per token | X-equivalent | ~X-equivalent (similar) |
| HBM footprint | Scales with X | Scales with total, not active |
| Quality on benchmarks | Baseline | Matches 2-3x larger dense |
| Batch-1 latency | Good (clean matmul) | Worse (fragmented per-expert) |
| Batch-128 latency | Linear in batch | Often competitive once experts saturate |
| Training infrastructure | Standard DP + TP | Adds expert parallelism + all to all |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Conflating total params with active params, or thinking MoE 'replaces the FFN' means it replaces attention too. The swap is FFN-only and the param separation is the entire point of the architecture.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.