Also available in: Português

AI Fundamentals: Dense Models vs MoE

The previous article covered NLP and NLU, the conceptual field behind language models. This last one closes the series by going back to architecture: the difference between dense models and MoE, which parameters are actually activated for each token, and why that changes the math on cost and memory, a topic that had already come up in the article on quantization and local use.

The core difference is this: a dense model uses practically all relevant parameters at every processing step, while a Mixture of Experts (MoE) uses only part of them at a time, chosen by a router. This makes MoE look like a “team of specialists”, while the dense model looks like a “single block” that works as a whole all the time.

Dense models are the most “straightforward”: for each token processed, the model activates the full path through the network, so the computational cost tracks the model’s size more directly. MoE, on the other hand, introduces conditional computation, in which a router picks only a few experts for each token, making it possible to greatly increase the total number of parameters without activating everything at once.

In practice, this means MoE models can have enormous total capacity with a more controlled inference cost than a dense model of the same total size, although they bring extra challenges in routing, balancing and implementation.

Diagram comparing a dense model and an MoE: in the dense model there is no router and the token goes through the whole block, with every block working; in the MoE, a router picks only 2 of 8 experts for that token and their outputs are combined

What is a dense model?

A dense model is the more traditional type of neural network in which all the main parts of a given layer or block take part in the computation for each input. In LLMs, this usually means that each token goes through the same full set of relevant layers and sub-networks.

The practical consequence is simple: behavior is more predictable and implementation tends to be more straightforward, but cost grows along with the model’s size. If the model is very large, each token becomes expensive to process because “the whole brain” kicks in all the time.

What is MoE?

Mixture of Experts (MoE) is an architecture in which part of the network is divided into several “experts”, and a gating or router mechanism decides which experts should be activated for each input or token.

The main point is that the model can have many parameters in total but use only a fraction of them at each step. This creates a sparse architecture, because not everything is activated all the time.

How MoE works

The simplified MoE flow usually looks like this:

  1. The token enters the layer.
  2. A router analyzes that token.
  3. The router picks the best-suited experts.
  4. Only those experts process the token.
  5. Their outputs are combined and move on to the next layer.

IBM cites, for example, the case of Mixtral 8×7B, which has 8 experts per layer and, for each token, the router selects 2 experts to process that data. This illustrates the idea of “many parameters available, few active at a time” well.

Diagram of an MoE layer: the token enters the layer, the router analyzes the token and scores each of the 8 experts, picks the 2 best-suited ones, only those process the token, and their outputs are combined before moving on to the next layer

A simple analogy

A good analogy is this:

  • Dense model: a generalist engineer does all the work alone, on every task.
  • MoE: a manager receives the task and routes parts of the problem to different specialists.

This helps explain why MoE can be efficient: you don’t mobilize the whole company for every microtask.

The main difference

The most important difference between them lies in which parameters are activated per token. In dense models, all the relevant parameters on that path are used in every pass; in MoE, only the router and a few experts are activated.

This leads to a practical distinction:

  • Dense: simpler to understand and operate.
  • MoE: more efficient for scaling total capacity without activating everything.

Dense vs MoE in practice

AspectDense modelMoE model
Activation per tokenUses the full path through the network for each token.Activates only a few experts per token.
Type of computationMore uniform and direct.Conditional and sparse.
Parameter scaleGrows with a high cost per token.Can grow a lot without activating everything.
ImplementationSimpler.More complex because of routing and balancing.
EfficiencyGood in smaller, more direct scenarios.Can be advantageous at large scale.

What “total parameters” and “active parameters” mean

With MoE, a common confusion is thinking that the total number of parameters equals the real cost per token. It doesn’t, because the model can have many parameters in total but activate only part of them during inference.

So you will see two different ideas:

  • Total parameters: everything that exists in the model.
  • Active parameters: what actually kicks in for a specific token.

This distinction is one of the keys to not misreading names like “8×7B”, or huge models whose cost of use is lower than it seems at first glance.

Chart of Mixtral 8×7B with figures published by Mistral AI: about 46.7 billion total parameters and about 12.9 billion active per token; reading the name as 8 × 7 = 56 billion is wrong, because only part of each layer is split into experts

Advantages of dense models

Dense models have some clear advantages:

  • A simpler architecture to train and serve.
  • More uniform behavior, with no need to handle routing between experts.
  • Less operational complexity compared with MoE.

That is why they remain very relevant, especially in scenarios where simplicity, predictability and compatibility matter more than scaling to extreme total capacity.

Advantages of MoE

MoE models stand out when you want to greatly increase a model’s total capacity without paying the cost of activating everything at every step. IBM highlights exactly this: imposing sparsity in activation makes it possible to increase capacity while keeping computational costs closer to manageable levels.

In addition, MoE can encourage internal specialization among experts and improve efficiency at large scale. This does not automatically mean “smarter at everything”, but it does mean a different and powerful way to scale models.

Disadvantages of MoE

MoE brings extra complexity. You need a good router, you need to prevent a few experts from receiving almost all the traffic, and you need to handle load balancing across experts.

Besides that, real inference costs cannot be estimated just by looking at “active parameters”; factors such as the number of layers, communication between machines and implementation details also come into play. Epoch AI draws attention to exactly this when comparing MoE and dense models at inference.

Is MoE always better?

No. MoE does not completely replace dense models; it is a different architectural strategy with trade-offs. MoEs can be more efficient than dense models with the same total number of parameters, but that does not mean they are better than a well-tuned dense model with a similar number of active parameters.

So the right question is not “which one is superior in absolute terms?”, but “which one delivers the best balance of quality, cost, latency and simplicity in my case?”.

Other types worth knowing

Besides dense and MoE, there are other labels and families you will probably come across:

  • Sparse models: a broader category in which not all parameters are activated all the time; MoE is an important example of this.
  • Switch Transformer: a variation of MoE in which the router usually picks a single expert per token, simplifying part of the computation.
  • Ensemble: a combination of several different models, but this is not the same thing as MoE; Ultralytics itself points out that these concepts are often confused.
  • Hybrid models: architectures that keep dense parts and sparse parts, or combine specialized mechanisms in only some blocks.

These names matter because they show that “model architecture” is not a single thing. The market and research are testing several ways of distributing capacity and computation.

Dense, sparse and ensemble

It’s worth clearly separating these three terms:

  • Dense: everything takes part, always.
  • Sparse: only part takes part at each step.
  • Ensemble: several separate models contribute to the final answer, usually as an external combination, not as a single internally routed network.

This distinction avoids a common confusion: MoE is not simply “several independent models put together”; it is a single architecture with internal experts and routing.

Diagram comparing three terms: dense is a single network in which everything takes part, always; sparse is a single network in which only part takes part at each step, with internal routing, as in MoE; ensemble is several separate models that contribute to the answer through an external combination

How to think about this in practice

If you are looking at a model for real use, think like this:

  • Dense: easier to reason about cost and behavior.
  • MoE: can deliver a lot of capacity with cheaper inference than its total size would suggest.
  • Sparse in general: the idea of activating only what is needed.

For local use, this is especially important because the model’s name can be misleading. An MoE model with many total parameters does not necessarily have the same cost per token as a dense model with the same total number of parameters, but it is not “free” in memory and infrastructure either.

Quick summary:

A simple rule to keep in mind:

  • Dense = one large model that works as a whole on every input.
  • MoE = several experts, but only a few work per input.
  • Sparse = a general name for architectures that activate only part of the network.