Select the correct comparisons of an MoE transformer versus a dense transformer at equal active parameters
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.
Detailed answer & concept explanation~6 min readEverything 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. 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.
- Llama 4 Maverick (128 experts, top-1) has ~400B total / ~17B active; needs ~6 H200 GPUs for fp16 serving despite being 'only' 17B active.
- Mixtral 8x7B (8 experts, top-2) has ~47B total / ~13B active; fits on 2 H100 80GB with fp16 but needs more than a Mistral 7B dense equivalent would.
- DeepSeek V3 (256 fine-grained experts + 1 shared, top-8) has ~671B total / ~37B active; the shared expert design stabilizes load balance vs Switch-style top-1.
- Qwen2.5-MoE A2.7B-14B has 14B total / 2.7B active; serving cost is closer to 14B dense than 2.7B dense despite the active count.
What an interviewer would ask next. Try answering before peeking at the approach.
QIf MoE total params scale with N, can you keep adding experts indefinitely?
QHow does MoE interact with KV cache memory at long context?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
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.
Same topic, related formats. Practice these next.