Sparse MoE: Why 320B Total Parameters Activate Only 18B
This article explains how sparse mixture-of-experts models separate total parameter capacity from per-token computation, how to interpret benchmark scores and long-context/thinking settings, and what to check for memory, deployment, and licensing.
Introduction: The Tension Between Parameter Scale and Inference Cost
For years, the large-model field has faced a clear tension. Making a model stronger usually requires more parameters. But more parameters also mean higher inference compute, memory footprint, and response latency. In a dense model, nearly all parameters participate in computation for every generated token. The larger the model, the more expensive each inference run becomes. Teams building coding assistants, long-running agents, and similar applications often hesitate for this reason.
Sparse Mixture of Experts (MoE) architectures attempt to ease this tension. They divide parameters into many experts and call only a small subset each time. This article uses a sparse MoE model with about 320B total parameters and about 18B activated per token as an example to explain its structure, how to read benchmark scores, how to use long context and thinking effort, and what to verify before deployment.
1. Basic Structure of Sparse MoE
1.1 Separating Computation from Storage
A dense model’s feed-forward network (FFN) layers perform the same full computation for every input. MoE splits the FFN into multiple expert subnetworks and adds a router. The router scores each token, selects the top-k experts, and lets only those experts participate in computation while the rest remain idle. This is called top-k selection.
The router and load balancing are partners. If the router always favors a few experts, other experts do not receive enough training, and resources sit idle. Training therefore usually adds a load-balancing loss to constrain how often each expert is selected. The activation ratio is determined by k and the total number of experts: more experts and a smaller k lower the per-token share of computation.
There is a common misconception here. Dividing 320B total parameters by 18B activated gives about 5.6%, but this is only a rough estimate. Actual activated parameters also include shared layers, attention layers, vocabulary embeddings, and the output layer. These are computed for every token and do not change with routing.
To truly answer “why only 18B is activated,” you need the model’s specific configuration. Check the model card or config file for fields such as num_experts, num_experts_per_tok, whether shared experts exist, hidden dimension, number of layers, and number of KV heads. Plug these numbers into the formulas to derive where the activated parameters come from. This article does not give these values for any specific model, to avoid readers treating the example as an official conclusion.
Two classes of metrics are determined by different parameters:
- Knowledge capacity is mainly determined by total parameters. During training, different experts gradually specialize: some become better at code, others at math or tool calling.
- Per-token computation is mainly determined by activated parameters. The inference compute path is similar to a dense model with roughly 18B parameters. Overall cost is not equally close, because memory capacity and communication overhead are still tied to total parameters.
1.2 Why Sparse Models Can Approach Larger Dense Models
These models can approach much larger dense models on some tasks for three main reasons.
First, capability on many tasks depends on training data coverage and expert division of labor, not only on the number of parameters used in a single inference run. Second, under the same training compute, MoE can train a larger total parameter count and usually achieve lower training loss. Third, smaller activated parameters mean lower decoding compute and usually higher throughput.
These reasons all depend on the specific data, training recipe, and inference framework. Performance multiples are affected by these factors and cannot be derived directly from parameter ratios. When selecting a model, run tests on your own tasks. Use enough samples for each task type and record success rate and average latency.
1.3 The Costs of MoE
MoE also has clear engineering challenges.
- Load balancing: when the router favors a few experts, other experts learn little, and GPU load becomes uneven.
- Routing jitter: similar inputs may be routed to different experts, causing output instability. The same prompt may produce more varied results across multiple runs.
- Memory footprint: at inference time, even if only 18B parameters are activated, the system must still hold all 320B parameters or use an offloading scheme. Offloading places some weights in memory or on disk, and speed is limited by bandwidth.
Here is an illustrative calculation of memory magnitude. Assume weights use BF16, with 2 bytes per parameter. The weights for 320B parameters are about 640GB. This is only the weight portion. Adding KV cache, activations, communication buffers, and framework overhead increases actual usage further. With INT4 quantization, weights drop to roughly one quarter, about 160GB. Quantization loss must be validated on your own tasks; do not assume it is lossless.
2. How to Read Benchmark Scores
Public evaluation results usually cover three types of capability.
- Terminal and command-line tasks: evaluating the model’s ability to complete system operations, write scripts, and configure environments in a real terminal.
- Software engineering tasks: for example, locating defects in a real code repository and generating a verifiable patch. These tasks are closer to daily development.
- Tool use and Agent tasks: evaluating multi-step planning, tool invocation, error recovery, and state tracking.
Before reading a score, record the following four items. If any is missing, the score cannot be directly compared.
- Model and version: which model and which release version, whether it is instruction-tuned, and whether it is quantized.
- Benchmark name and version: use the official card for the benchmark’s formal name and version number. Different versions of the same benchmark may have different questions and scoring rules.
- Evaluation script: whether the official script or a third-party script was used, and whether the environment image, timeout settings, and scoring logic are consistent.
- Run settings: whether a specific Agent framework was used, how many retries were allowed, what thinking effort was set, and how large the context window was.
Vendor settings differ widely. A score produced with multiple retries and best-result selection cannot be directly compared with one from a single run. A score should be understood as “the result under specific settings,” not as a fixed property of the model.
Benchmark scores are only one reference for model selection. A more reliable approach is to sample real tasks from your own business and design a set of tests with acceptance criteria. Fix the settings, run multiple times, and track pass rate, latency, and cost.
3. Very Long Context, Thinking Effort, and Memory Estimation
3.1 How to Use Very Long Context
A nominal context window only indicates how much input the model can accept. It does not mean the model can reliably use all information at that length. Content in the middle of long text is easily ignored, a phenomenon often called “lost in the middle.” When using long context, place key instructions at the beginning or end of the input, and use retrieval or segmented summaries to reduce irrelevant content.
Memory pressure from long context mainly comes from the KV cache. Its size can be roughly estimated with the following formula:
KV cache bytes ≈ 2 × layers × KV heads × dimension per head × sequence length × batch size × bytes per element
The 2 corresponds to Key and Value. KV cache has no direct relationship with the number of activated parameters, so MoE’s memory benefit in long-context scenarios is limited. The longer the sequence and the higher the concurrency, the faster this portion grows.
3.2 How to Choose Thinking Effort
Most models that support thinking mode allow adjustment of the number of reasoning tokens generated during inference. More thinking usually improves accuracy on complex problems, but latency and cost also rise. Simple Q&A, format conversion, and batch classification usually do not need high thinking effort. Multi-step planning, complex code repair, and math problems that require repeated verification may use higher effort.
The selection method is: on your own samples, run low, medium, and high settings, record accuracy, average latency, and cost per item, and find the level where marginal benefit begins to diminish. Vendor level names are not standardized. Do not assume that “high” means the same thing across different models.
3.3 Elements of Memory Estimation
Before deployment, memory requirements can be broken into the following parts for separate estimation.
- Parameter precision: bytes per parameter. BF16 is 2 bytes, INT8 is 1 byte, and INT4 is about 0.5 bytes. Weight memory is approximately parameter count multiplied by bytes per parameter.
- KV cache: calculate using the formula above with the target sequence length and concurrency.
- Activations and temporary buffers: related to batch size, sequence length, and operator implementation. Measure these in the actual framework.
- Communication buffers and expert-parallel overhead: in multi-GPU deployment, experts are distributed across devices, and tokens must be routed between devices. This consumes extra memory and adds latency.
- Offload bandwidth: if weights are placed in memory or on disk, throughput is limited by PCIe or disk bandwidth and must be tested separately.
Leave headroom in the estimate, at least covering the case where peak concurrency and the longest sequence occur at the same time. Final numbers should be based on actual loading and stress-test results.
4. License Checklist
The license determines whether the model can be used in commercial products, whether it can be fine-tuned and redistributed, and it may impose limits on user scale or usage domains. Use the following steps when checking:
- Find the original license text on the official release page. Do not rely only on summaries or third-party paraphrases.
- Confirm whether commercial use is allowed and whether there are revenue or user-count thresholds.
- Confirm whether fine-tuning and distillation are allowed, whether derivative models can be redistributed, and whether attribution or notice requirements apply.
- Check usage restriction clauses, such as prohibitions on certain domains or requirements to follow an attached usage policy.
- Record the license version and review date, because terms may change between versions.
If your team has legal counsel, final judgment should be made by them.
