Understanding MoE Architecture: How Parameter Scaling Decouples from Compute Cost
This article breaks down why Mixture of Experts (MoE) models can hold massive parameter counts while keeping per-token compute surprisingly low. It explains where dense models spend their budget, how MoE splits the FFN into routed and shared experts, why quality holds up, and what engineering costs remain. You will also find practical guidance on planning memory and compute separately when deploying MoE-based services.
1. A Counterintuitive Cost Pattern
When people first read the technical details of a model with an enormous parameter count, their first concern is usually the compute bill: how many accelerators will training and inference consume? Yet if they keep reading, they often find that the accelerator-hours used for training are lower than those of some dense models with only a few billion parameters. This contrast is not marketing spin; it is a direct consequence of the architecture: sparse activation.
Sparse activation means that although the model holds a huge collection of parameters, only a small fraction of them actually participate in the forward pass for any given input token. The industry usually summarizes this structure with a multiplicative name, such as “number of experts × size per expert,” which captures the fact that total capacity is large while compute per pass is small. This is the core proposition of the Mixture of Experts (MoE) architecture: large in capacity, light in compute.
2. The Cost Structure of Dense Models: Where the Money Goes
To understand why MoE works, first look at how parameters are distributed in a dense model. A standard Transformer block has two main components: the self-attention module and the feed-forward network (FFN). By parameter share, attention typically accounts for only about ten to twenty percent of each layer, while roughly eighty percent is concentrated in the FFN.
Take a dense model in the 70-billion-parameter class as an example. In a single layer, the attention module has about 150 million parameters, while the FFN has about 700 million, so the FFN accounts for more than eighty percent of that layer’s parameters. The rule for dense models is rigid: every token must pass through the entire FFN, meaning all parameters are read and multiplied-accumulated once for every token processed.
This means a dense model’s “capacity” and “compute” are locked to the same number. A 70-billion capacity equals 70 billion activations; to make the model smarter, you must pay a higher compute cost for every token. The cost curve rises linearly.
Schematically, a dense structure can be abstracted as:
# Dense: capacity == activation, every token goes through the full networkdef dense_forward(token, attn, ffn):h = attn(token)return ffn(h) # all parameters take part in the computation
3. MoE’s First Cut: Splitting the Fattest FFN
The target of the MoE redesign is clear: the FFN, which has the largest share and is the “fattest” component. The approach is to replace one large FFN with N smaller FFNs that share the same structure but have independent parameters, called experts, and to add a lightweight router in front of them.
When a token arrives, the router scores it and selects the few experts with the highest scores to participate in the computation, while the remaining experts are not activated at all. A common configuration in the industry is top-2 routing: pick 2 out of 8 experts. Larger-scale designs use fine-grained expert splitting, for example hundreds of routed experts plus one always-on shared expert; each token selects a few of the routed experts and then adds the shared expert that always participates.
# MoE: capacity and activation are decoupleddef moe_forward(token, experts, router, top_k=2, shared=None):scores = router(token) # only the router scores everything, at minimal costidx = topk(scores, k=top_k) # wake up only a few expertsout = sum(experts[i](token) for i in idx)if shared is not None:out = out + shared(token) # the shared expert carries general knowledgereturn out
This yields the most important decoupling in the whole article:
- Total parameters (capacity) determine how much knowledge the model can store and how high its ceiling is;
- Activated parameters (compute) determine the compute each token actually consumes.
In a dense model, these are the same number; in MoE, they are separated. Two sets of publicly reported figures illustrate this span: one MoE model has a total capacity of about 47 billion with about 13 billion activated per token; a larger design has a total capacity of about 671 billion with only about 37 billion activated per token. Using compute on the order of tens of billions to support a knowledge capacity close to seven hundred billion parameters is the quantified expression of “large in capacity, light in compute,” and it is the first layer of understanding MoE’s cost advantage.
4. Why Quality Does Not Drop Noticeably: Cutting Redundancy, Not Necessity
A natural follow-up question is: if only a small fraction of experts run, why doesn’t quality decline? The answer is that what gets skipped is mainly the eighty percent of FFN parameters, and that portion already contains substantial redundancy in a dense model.
This can be understood from three angles:
First, knowledge is sparse. The vast majority of tokens in language relate to only a small set of semantic patterns. Having all parameters participate indiscriminately is like requiring all knowledge to be “present” at once, most of which is wasted effort.
Second, division of labor brings specialization. During training, different experts spontaneously develop preferences: some lean toward code and symbolic reasoning, some toward natural language expression, and some toward multiple languages. What the router does is call on demand, which is equivalent to turning one large, all-purpose lookup table into several small, specialized ones.
Third, attention and the shared expert preserve a global path. Cross-expert information exchange is handled by the attention layers, and the shared expert carries the general capabilities that all tokens need, so sparsification does not break the model’s overall consistency.
5. The Engineering Cost: Sparsity Is Not Free
It must be emphasized that MoE saves compute, not memory. All expert parameters must stay resident, so memory usage is proportional to total capacity, which is completely different from a dense model. Engineering also has to handle three typical problems:
- Load imbalance. The router may send a large number of tokens to a few experts, causing some devices to overload while others sit idle. The common approach is to introduce an auxiliary balancing loss and to apply noise perturbation and capacity-limit constraints to the routing scores.
- Communication overhead. Experts are usually distributed across different devices, so tokens must be exchanged all-to-all according to the routing results and then aggregated. Communication can easily become the new bottleneck and needs to be overlapped with computation in scheduling.
- Fine-tuning and deployment complexity. During inference, the routing distribution of tokens within a batch fluctuates, so throughput is less stable than with a dense model, requiring finer-grained batching and scheduling strategies.
route -> capacity check -> dispatch (communication) -> expert compute -> aggregate (communication) -> output↑ if overloaded, drop or fall back to the shared expert
6. Deployment Advice: Plan Capacity and Compute Separately
When building MoE-style services on an enterprise platform, plan the two types of resources separately: estimate memory based on total parameters and concurrent batch size, and estimate compute based on activated parameters and expected throughput. The former determines how large a model a single machine can hold; the latter determines how many tokens can be served per unit of time.
Supporting general capabilities include using a container platform to host elastically scaling inference replicas, using object storage to manage large-scale weights and checkpoints, using a message queue to smooth out request peaks, and using logging and monitoring with alerts to track routing distribution, expert load, and communication latency. If you use a managed model service or an AI coding tool in the cloud, prioritize whether it supports long context, stable throughput, and fine-grained quotas, rather than looking only at the parameter-count number.
In one sentence: the value of MoE is not in piling up parameters, but in pricing “how much to remember” and “how much to compute each time” as two separate things. Once you understand this, you can look at the parameter table in any large-model technical document and immediately tell which column its real compute cost falls into.
