How to Choose an MoE Model: It Saves Compute, Not VRAM
MoE models reduce per-token compute by activating only a few experts per token, but VRAM usage is still determined by total parameters, since all expert weights must remain in memory. This article explains how MoE works, its speed and memory characteristics, and a practical selection approach: calculate VRAM requirements first, then compare speed.
Bottom Line First
MoE saves compute, not VRAM. Only a small number of experts are activated per token, so each forward step requires relatively little computation. However, all expert weights must stay resident in memory. When selecting a model, estimate VRAM first, then compare speed.
1. The Three-Way Trade-Off in Inference Efficiency
Open-source LLMs have grown from billions to hundreds of billions of parameters. The more capable the model, the more compute and memory inference typically demands. Deployment teams usually have to balance model quality, inference speed, and deployment cost—optimizing all three at once is difficult.
Dense models activate all parameters on every inference pass. The architecture is simple, and debugging and fine-tuning practices are well established. But as parameter counts grow, each forward pass gets slower and memory pressure increases.
The Mixture of Experts (MoE) architecture offers another path. The model retains a large total parameter count, but each token only uses a small fraction of those parameters during computation. This article uses an open-source MoE model with roughly 26B total parameters and about 3.8B activated parameters per inference as an example to explain how it works, its performance characteristics, and how to approach model selection. The figures here are general estimates for this parameter scale, not measured results from any specific model—readers should validate with their own benchmarks.
2. How MoE Works
From Dense to Sparse
In a standard Transformer, every token passes through the attention module and feed-forward network (FFN) of every layer. The floating-point operations for a forward pass are roughly twice the model’s parameter count. A 100B dense model, for example, needs about 200 GFLOPs per generated token—a heavy demand on compute and memory bandwidth.
MoE replaces the FFN layer with multiple parallel expert networks, commonly 8, 16, or 64 experts. The model also includes a gating network (the Router), typically a lightweight linear layer. The router scores each token’s hidden state, selects the Top-K experts (K is usually 1 or 2), routes the token to those experts, and merges the results by weight. Because each token only passes through a few experts, actual compute is dominated by the activated parameters.
Total Parameters vs. Activated Parameters
Total parameters are the model’s complete set of weights; activated parameters are the weights that actually participate in a single forward pass. The model’s knowledge capacity comes from all its parameters, but each computation only uses a portion of them.
Two points deserve attention. First, in most MoE models the attention layers and embedding layers remain dense, so activated parameters include all attention parameters plus the few selected expert parameters. Second, VRAM usage at deployment is determined by total parameters—all expert weights must remain in memory because any token can be routed to any expert. Speed, on the other hand, is mainly determined by activated parameters. That is why MoE saves compute while VRAM usage is still set by total parameters.
3. Performance: Speed, VRAM, and the Cost
Generation Speed
MoE’s main benefit comes from lower per-step computation. On the same hardware, its tokens per second (TPS) is usually higher than a dense model with a comparable total parameter count. But the improvement depends on expert count, Top-K, batch size, input/output length, inference framework, and quantization precision—there is no fixed multiplier you can apply.
Speed should be evaluated with two metrics. Time to first token (TTFT) is the latency from submitting a request to receiving the first token, dominated by the prefill stage. Time per output token (TPOT) is the generation time for each subsequent token, dominated by the decode stage. MoE’s gains are usually more pronounced in the decode stage. Whether throughput scales with batching depends on how evenly the expert load is balanced, so test with your real request distribution.
VRAM Usage
VRAM is the most commonly miscalculated part of MoE deployment. At FP16, each parameter takes 2 bytes, so 26B parameters require roughly 52GB of weights alone. Actual usage also includes the KV cache, activations, framework runtime overhead, and communication buffers, so total consumption exceeds the weight footprint.
A rough weight-only estimate at different precisions is shown below. The figures cover weights only, not other overhead.
| Precision | Weight Size (approx.) | Single 24GB GPU | Single 80GB GPU |
|---|---|---|---|
| FP16 | 52GB | Won’t fit | Fits, with limited headroom |
| INT8 | 26GB | Won’t fit; needs multi-GPU or offloading | Fits, with comfortable headroom |
| INT4 | 13GB | Weights fit, but context and concurrency are constrained | Fits, with ample headroom |
When weights exceed a single GPU’s capacity, you can use multi-GPU tensor parallelism or expert parallelism. CPU offloading also lets the model run with less VRAM, but weights must be repeatedly moved between host memory and GPU memory, which slows inference significantly. It is only suitable for low-frequency, non-real-time tasks.
Estimating Total VRAM
Total VRAM can be estimated as:
Total VRAM ≈ Weights + KV Cache + Activations + Runtime Overhead + Communication Buffers
The KV cache grows with context length and concurrency, and is calculated as:
KV Cache = 2 × Number of Layers × KV
