Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

Handbooks  /  MoE vs Dense Models
AI~9 min readComparison
Head to Head

MoE vs dense: more parameters, same compute?

Mixture of ExpertsvsDense

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.

01

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.

→ The rule

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.

02

Head to head

DimensionDenseMixture of Experts
Params active per tokenAll of themA few experts — a fraction of the total
Total capacity= active paramsMuch larger than active (holds many experts)
Compute per token (FLOPs)High — scales with total sizeLow — scales with active size only
Memory / VRAMProportional to its sizeProportional to total params — every expert must be resident
Quality per FLOPBaselineHigher — more knowledge stored per unit of compute
Serving complexityLow — one weight matrixHigher — routing, expert parallelism, often multi-GPU
Training stabilityWell-understoodNeeds a load-balancing loss so experts are used evenly
Best fitSmall models, edge, simple servingFrontier scale — max quality per dollar of inference compute
03

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
04

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.

→ The cheap default

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.

05

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.

→ The trade you're actually making

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.

06

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.

→ The pattern generalizes

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.

→ The number

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

The picture: one dense layer vs one MoE layer

dense block token attention FFN: every weightruns on every token output MoE block (8 experts, top-2) token shared attention router: top-2 E1 E2 E3 E4 E5 E6 E7 E8 weighted sum all 8 sit in VRAM; 2 compute
Only the feed-forward part changes. Attention is shared, and every token runs through it, as in a dense model. The MoE swaps the single FFN for eight smaller ones plus a router that scores them per token and keeps the top two, mixing their outputs by the router’s weights. The next token may pick E1 and E7. So compute follows the two highlighted boxes, while memory has to hold all eight, dashed or not. Real models repeat this block dozens of times, and each layer has its own router, so one token can visit different experts at every depth. Across a batch of thousands of tokens, every expert in every layer is busy, which is why none of them can be left on disk.
Trade-offs

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.

CaseTimeSpaceWhy
7B dense≈ 14 GFLOPs14 GBFits one 24 GB card with room for the KV cache. The page’s edge pick.
13B dense (same active)≈ 26 GFLOPs26 GBSame compute as the MoE below, about half its memory, less capacity.
8×7B MoE, ~47B total, ~13B active≈ 26 GFLOPs94 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 GFLOPs94 GBSame memory as the MoE and about 3.6× its compute per token.
DeepSeek-V3, 671B total, 37B active≈ 74 GFLOPs1,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 parallelismTwo all-to-all exchanges per MoE layer: send tokens to their experts, gather results backExperts split across GPUsThe 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.

Watch for

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.

Your call

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.

You are compute-bound and cost-bound at scale, and you have hardware with memory to spare.

A model card lists "8 experts, 2 active." How should you read its quality and its cost?

Frequently asked

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.

MoE vs Dense Models · Vibe Engines · 2026
Finished this one? 0 / 209 Handbooks done
NextThe Reinforcement Learning Handbook Next on the “How models actually work” ladder · rung 6 of 11

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Handbooks