Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
MoE vs dense: more parameters, same compute?
A dense model runs every parameter on every token. A Mixture-of-Experts model keeps many more parameters around but only fires a few per token — buying more capacity at roughly the same compute. It sounds like a free lunch. It isn't: what you save in compute, you pay back in memory and complexity.
The one distinction that decides everything
A dense model uses all of its parameters to process every token — a 7B dense model does ~7B parameters' worth of math per token. A Mixture-of-Experts (MoE) model replaces the big feed-forward layers with many parallel experts plus a small router that, for each token, picks just a few experts to run. So an MoE holds a huge number of total parameters but only activates a small slice per token.
Quality tracks total parameters; compute cost and latency track active parameters. MoE decouples the two — that's the entire point. A dense model can't: for it, total and active are the same number.
Head to head
| Dimension | Dense | Mixture of Experts |
|---|---|---|
| Params active per token | All of them | A few experts — a fraction of the total |
| Total capacity | = active params | Much larger than active (holds many experts) |
| Compute per token (FLOPs) | High — scales with total size | Low — scales with active size only |
| Memory / VRAM | Proportional to its size | Proportional to total params — every expert must be resident |
| Quality per FLOP | Baseline | Higher — more knowledge stored per unit of compute |
| Serving complexity | Low — one weight matrix | Higher — routing, expert parallelism, often multi-GPU |
| Training stability | Well-understood | Needs a load-balancing loss so experts are used evenly |
| Best fit | Small models, edge, simple serving | Frontier scale — max quality per dollar of inference compute |
When to use each
Reach for dense
- Small models (a few billion params) where MoE's overhead isn't worth it
- Edge and on-device, where total VRAM is the hard constraint
- Simple, single-GPU serving without expert-parallel plumbing
- Fine-tuning workflows you want to keep straightforward
- Latency-critical paths where routing overhead matters
Reach for MoE
- Frontier-scale models chasing maximum quality per token of compute
- Inference cost/latency is the bottleneck, not GPU memory
- You have the hardware to hold all experts resident (multi-GPU)
- Serving very high throughput where the FLOP savings compound
- You want to grow total capacity without growing per-token cost
Why the frontier went sparse
For a lab pushing the quality ceiling, the binding constraint at inference isn't how many parameters you can store — GPUs have lots of memory — it's how many FLOPs you can afford per token, because that sets latency and cost at scale. MoE is the lever that breaks the tie: it lets you grow total parameters (and thus knowledge and quality) into the hundreds of billions or trillions while keeping the compute per token near that of a far smaller dense model. That's why several leading models — Mixtral, DeepSeek-V3, and others — are MoE. Dense hasn't disappeared, but at the top end, sparsity is how you buy quality you could otherwise never afford to serve.
If you're picking a model to run rather than to train, don't choose by architecture — choose by active-parameter count (drives speed and cost), total-parameter count (drives quality and VRAM), and whether your hardware can hold the whole thing. MoE vs dense is downstream of those three numbers.
The memory tax nobody puts on the slide
MoE's headline is "same compute, more parameters" — and it's true. But the parameters have to live somewhere. The router might pick only 2 of 8 experts for a given token, but you can't know in advance which 2, and across a batch every expert gets hit, so all experts must be loaded in GPU memory at all times. An MoE with 47B total parameters needs ~47B parameters' worth of VRAM even if it only computes with ~13B of them per token. So MoE saves you compute (FLOPs, latency, cost) but charges you memory (VRAM, and usually multiple GPUs with expert parallelism) — the opposite of what "fewer active parameters" makes it sound like.
On top of the memory bill comes routing complexity. A learned router, left alone, collapses onto a few favorite experts and starves the rest — so training adds an auxiliary load-balancing loss to spread tokens evenly. Serving adds expert-parallel scheduling, and batching gets trickier because different tokens in a batch want different experts. None of it is unsolved, but it's real engineering that a dense model of the same active size simply doesn't have.
Dense trades away capacity-per-FLOP to keep serving dead simple and memory proportional to quality. MoE trades that simplicity — and a big VRAM/routing bill — for far more quality per unit of compute.
A worked scenario: a 7B dense model vs an 8×7B MoE
Take a 7B dense model. It fits comfortably on a single consumer GPU, computes ~7B parameters per token, and serves with the simplest possible setup — one weight matrix, no routing. It's the right choice for edge deployment, a laptop, or any place where total memory is the wall you hit first.
Now take an 8×7B MoE (the Mixtral shape): eight experts, a router picking two per token. Its total size is ~47B parameters (the experts share attention layers, so it's not a clean 8×7), but only ~13B are active per token. The upside: it reasons closer to a much bigger dense model while costing about a 13B-dense model's worth of compute per token. The catch: all ~47B parameters must sit in VRAM, so it wants a serious multi-GPU box — not a laptop. Same "7B" in the name, wildly different deployment footprint, because the number that sets quality (total) and the number that sets compute (active) have been pulled apart.
Memory-bound and simple → dense. Compute/cost-bound at scale with hardware to spare → MoE. Read a model by its two parameter counts, active and total, not the single number in its name.
The flip point: compute saved vs memory paid
A Mixture-of-Experts layer has N experts but a router activates only k per token, so compute per token scales with k/N of running all the parameters — while memory still holds all N experts.
An 8-expert MoE that activates 2 per token does 2/8 = 25% of the expert-layer FLOPs; attention is shared and always runs, so the whole model lands a little higher (Mixtral 8×7B: ~13B of ~47B parameters active, about 28%) — a big throughput and cost win at inference — yet every expert must still sit in VRAM, so it costs as much memory as a dense model of its total size. That is the whole trade in one ratio: MoE saves compute (k/N), not memory. The flip: choose MoE when you are compute- or throughput-bound and can afford to host all the experts; choose dense when you are memory-bound or serving at a scale where the per-expert footprint (and the risk of an unbalanced router with dead experts) is not worth the FLOP savings.
The picture: one dense layer vs one MoE layer
Cost and trade-offs: compute, memory and the wire
Here Time is forward-pass compute per token (≈ 2 × active parameters) and Space is weight memory alone, before the KV cache. Weights at 16-bit take 2 bytes per parameter.
| Case | Time | Space | Why |
|---|---|---|---|
| 7B dense | ≈ 14 GFLOPs | 14 GB | Fits one 24 GB card with room for the KV cache. The page’s edge pick. |
| 13B dense (same active) | ≈ 26 GFLOPs | 26 GB | Same compute as the MoE below, about half its memory, less capacity. |
| 8×7B MoE, ~47B total, ~13B active | ≈ 26 GFLOPs | 94 GB (≈ 23.5 GB at 4-bit) | Active/total is 13/47 = 28%, not the 2/8 = 25% of its expert layers, because attention is shared and always runs. |
| 47B dense (same total) | ≈ 94 GFLOPs | 94 GB | Same memory as the MoE and about 3.6× its compute per token. |
| DeepSeek-V3, 671B total, 37B active | ≈ 74 GFLOPs | 1,342 GB (671 GB at 8-bit) | Active is 5.5% of total. A multi-GPU node just for the weights, at the compute of a ~37B dense model. |
| Expert parallelism | Two all-to-all exchanges per MoE layer: send tokens to their experts, gather results back | Experts split across GPUs | The GPU interconnect joins the critical path. A dense model split by tensor parallelism communicates too, but not with the routing imbalance. |
Read down the Time column and MoE looks like a 13B model. Read down Space and it is a 47B model. Quantisation narrows the memory column for both architectures alike, so it does not change which one wins. What it changes is whether the MoE fits on hardware you already own. One more effect hides between the rows. At batch size 1, decoding is limited by how many weight bytes are read per token, and an MoE reads only its active experts, so it decodes like a 13B model. As the batch grows, more experts are touched each step, and the bytes read approach the full 94 GB, while compute still tracks 13B. The MoE advantage is clearest at the two ends, a single stream or a compute-bound batch, and smallest in between.
Common mistakes
- Budgeting VRAM by active parameters
A team sees “13B active” and books a 24 GB card. The weights alone are 94 GB at 16-bit. Size memory from the total count, then add the KV cache, which depends on attention layers, context length and batch size, not on the number of experts.
- Reading 8×7B as 56B, or as 7B
The experts replace only the FFN blocks. Attention and embeddings exist once, so eight 7B-sized experts come to ~47B, not 56B. The name is not 7B either: the active count is ~13B because two experts run. Always look up both numbers on the model card. Comparing a 13B-active MoE with a 13B dense model on benchmarks is fair for cost per token, but unfair for memory, where the MoE needs about 3.6× as much.
- Ignoring the interconnect
Spread experts over GPUs joined by a slow link and every MoE layer waits on the token exchange. The FLOP saving then never reaches wall-clock time. Benchmark tokens per second on the real topology, not FLOPs on paper. The usual fix is to keep each expert-parallel group inside one server, where GPUs share a fast link, and to scale across servers in other ways.
- Dropping tokens without knowing it
Many MoE implementations give each expert a fixed capacity per batch. Tokens routed to a full expert are dropped from that layer and pass through on the residual connection only. A capacity factor set too low quietly costs quality on skewed batches. Watch the drop rate. Raising the capacity factor buys back quality at the price of padding and memory. “Dropless” implementations avoid drops entirely, but then one hot expert sets the step time for the whole batch.
- Fine-tuning without the balancing loss
Turn off the auxiliary load-balancing loss for a narrow fine-tune and the router can collapse back onto a few favourites. You keep paying memory for experts that no longer learn or fire. Keep the loss on and log tokens per expert. A healthy router spreads tokens roughly evenly across experts. If one expert takes several times its share, or another sits near zero, you have paid for capacity the model is not using.
Which would you pick?
Three situations. Pick the side you'd actually build — the explanation follows.
You are serving on hardware where VRAM is the binding constraint and the deployment must stay simple.
The trap is assuming sparse activation means sparse memory. All experts must be resident to be routable, so an MoE's VRAM bill tracks its *total* parameters even though its compute tracks the active ones. Paging experts from disk trades the memory problem for a latency problem on every routing decision.
You are compute-bound and cost-bound at scale, and you have hardware with memory to spare.
This is the case MoE exists for: when FLOPs rather than memory are what you are short of, activating a fraction of a large parameter count buys quality the same compute budget could not buy densely. Scaling a dense model to match means paying for those parameters on every token.
A model card lists "8 experts, 2 active." How should you read its quality and its cost?
That split is the whole point of the architecture, and reading it either way collapses the trade. Judging quality by active parameters undersells the model; judging cost by total parameters oversells what it takes to run. The page's advice is to read a model by both numbers rather than by one.
Quick answers
What's the difference between a dense and an MoE model?
A dense model uses every parameter on every token. An MoE replaces the feed-forward layers with many expert sub-networks plus a router that sends each token to only a few. So an MoE holds far more total parameters while activating only a fraction per token — more capacity, roughly the same compute per token.
Does MoE make models cheaper to run?
Cheaper in compute, not memory. Only a few experts fire per token, so FLOPs and latency drop versus a dense model of the same total size. But every expert must be resident in VRAM in case the router picks it, so MoE needs memory proportional to its total parameters. That memory tax is why it isn't a free lunch.
Why do frontier models use MoE?
Quality scales with total parameters, but cost scales with active parameters. MoE lets a lab grow total capacity into the hundreds of billions while keeping per-token compute — and thus latency and cost — closer to a much smaller dense model. Mixtral and DeepSeek-V3 are examples.
What is load balancing in an MoE?
Left alone, the router overuses a few experts and starves the rest. Training adds an auxiliary load-balancing loss that spreads tokens roughly evenly across experts, so all of them get trained and the stored capacity is actually used.
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Handbooks
- The Prompting HandbookA friendly, hands-on field guide for everyday humans — learn the CRISP framework, spot bad prompts, practice with real recipes, play a drag-and-drop game, and test yourself with a quiz. No code required.Read →
- The Senior AI Engineer Interview Handbook60 questions across architecture, production incidents, agentic systems, RAG, evals, cost, safety, and leadership — what staff-level AI interviewers actually probe for.Read →
- The LLM Serving HandbookHow to serve large language models fast and cheap — prefill vs decode, the KV cache, continuous batching and PagedAttention (vLLM), quantization, speculative decoding, and the latency-vs-throughput tradeoffs that decide your inference bill.Read →
- The Transformers HandbookThe architecture behind every LLM, built up from scratch — tokens and embeddings, positional encoding, self-attention (query/key/value), multi-head attention, the transformer block (FFN, residuals, layer norm), and how a decoder-only model generates text autoregressively.Read →
- The Fine-Tuning HandbookWhen to fine-tune vs RAG vs prompting, full fine-tuning vs parameter-efficient methods, how LoRA and QLoRA make it cheap enough for a single GPU, why the data matters more than the method, catastrophic forgetting, and how to evaluate and decide.Read →
- The On-Device AI HandbookSmall models, everywhere: why 1–14B models got frontier-adjacent (distillation + textbook data), the napkin law of local inference (tokens/sec ≈ bandwidth ÷ bytes), quantization and the llama.cpp / GGUF / Ollama / MLX stack, the honest local-vs-cloud decision table, four hybrid patterns that ship, and the evals craft of choosing a small model that actually fits the device.Read →