Trillion-Parameter MoE Models: The Cost of Local Deployment
Deploying a trillion-parameter mixture-of-experts model locally requires far more GPU memory than its sparse activation pattern might suggest. Using a 2.8-trillion-parameter model as an example, this article breaks down weight storage, quantization overhead, runtime memory, and KV cache requirements, then uses a smaller reference model to estimate a full-model deployment footprint of more than 1.5 TB.
1. Total Parameters Set the Deployment Threshold
The inference cost of a mixture-of-experts (MoE) model has two distinct components. Storage requirements depend on the total parameter count: any expert may be selected during inference, so all experts must reside in storage that can be accessed quickly. Compute requirements depend on the active parameters, because each token passes through only a small subset of experts.
Confusing these two costs leads to underestimating GPU memory requirements.
Consider a model with approximately 2.8 trillion parameters and 896 experts, with 16 experts activated per token. Its expert activation ratio is:
16 ÷ 896 ≈ 1.79%
This figure describes routing sparsity within the expert layers only. Attention layers, shared components, and embeddings typically participate in processing every token, so it is not the activation ratio for the entire model.
The practical conclusion is straightforward: start GPU memory planning with the total parameter count. Use the activation ratio to estimate compute demand and throughput, not weight storage.
2. Breaking Down GPU Memory Requirements
2.1 The Theoretical Minimum for Weights
Weights account for the largest share of GPU memory. Their storage requirement is calculated as:
Weight storage in bytes = Parameter count × Bits per parameter ÷ 8
For 2.8 trillion parameters stored at 4 bits each:
2.8 × 10¹² × 4 ÷ 8 = 1,400 GB
This is the theoretical minimum for the weight data alone, without metadata. An actual deployment cannot fit below this value under these storage assumptions.
2.2 Block-Scaling Overhead
A commonly used 4-bit microscaling floating-point format groups every 32 four-bit elements together and assigns them a shared 8-bit scale factor. Its effective storage cost per parameter is therefore:
4 + 8 ÷ 32 = 4.25 bits
For a 2.8-trillion-parameter model:
2.8 × 10¹² × 4.25 ÷ 8 ≈ 1,487.5 GB
That is approximately 6% more than the raw 4-bit estimate. Memory planning should use the effective bit width, rather than the nominal bit width.
Models trained with quantization-aware training generally retain better accuracy with low-bit weights because training has already adapted to quantization error. Activations often use an 8-bit floating-point format. Unlike weights, they occupy temporary inference memory, with requirements that vary according to batch size and sequence length.
2.3 Frequently Overlooked Memory Usage
Actual GPU memory consumption exceeds the theoretical weight footprint for several reasons:
- Non-4-bit tensors: Embeddings, output layers, and some normalization or routing parameters often remain at higher precision, increasing storage requirements.
- Metadata and alignment: Tensor-sharding metadata and memory-alignment padding take additional space.
- Runtime workspaces: Temporary operator buffers and communication buffers consume memory, especially in multi-GPU deployments.
- KV cache: Its size depends directly on context length, concurrent requests, and the attention architecture. With long contexts or high concurrency, it can exceed the other non-weight overheads.
There is no single KV cache estimate that applies to every model. It must be calculated from the specific architecture, including layer count, head count, and hidden dimensions, and validated through load testing.
3. Calibrating the Estimate with a Reference Model
A reference model with known memory figures can help check the estimate.
For a model in the 671-billion-parameter range, the main parameters plus a multi-token prediction module occupy approximately 685 GB in FP8. With 4-bit quantization, its weights occupy around 335 GB, with approximately 37 GB for activations and an overall memory budget of roughly 400 GB. The model can run on eight accelerators with 80 GB each, providing 640 GB of aggregate GPU memory.
A 2.8-trillion-parameter model has approximately 4.2 times as many parameters as this reference model. A rough proportional estimate therefore puts its memory requirements at around four times those of the reference.
Using 1,487.5 GB for the 4-bit block-scaled weights, then adding activations and runtime overhead, a deployment of the complete model requires more than approximately 1.5 TB of GPU memory.
This proportional scaling is only a rough estimate. The actual footprint still depends on the model’s architectural details.
