How Much Does It Cost to Deploy a Trillion-Parameter MoE Model Locally?
This article breaks down the real hardware requirements of deploying a multi-trillion-parameter MoE model on-premise: how to calculate weight sizes, why the "1.79% activation" argument is misleading, and what it takes to run the model either entirely in GPU memory or via a GPU+CPU heterogeneous setup — including a throughput estimate for CPU-offloaded decoding.
1. First, Do the Math: How Big Are the Weights?
The first hurdle for local deployment is whether the weights even fit. Weight size is determined by the parameter count and the bits per parameter:
Weight bytes = parameter count × bits per parameter ÷ 8
For a 2.8-trillion-parameter model, the raw data floor with 4-bit quantization is 2.8T × 4 ÷ 8 ≈ 1400GB.
Real formats also include scaling factors. With microscaling floating-point formats (MX formats), every 32 4-bit elements share one 8-bit scale, which works out to an average of 4.25 bits per element. That puts the weights alone at 2.8T × 4.25 ÷ 8 ≈ 1487.5GB — and this still excludes non-4-bit tensors, metadata, memory alignment, runtime workspaces, and the KV cache.
def weight_size_gb(params_t, eff_bits):# params_t: parameter count, in trillions# eff_bits: average bits per parameter (including scale overhead)return params_t * 1e12 * eff_bits / 8 / 1e9print(weight_size_gb(2.8, 4.0)) # 1400.0, raw data floorprint(weight_size_gb(2.8, 4.25)) # 1487.5, including scaling factors
For comparison, an open-source model of a similar era with 670 billion parameters needs about 685GB at FP8, counting the main parameters plus multi-token prediction modules. After 4-bit quantization, the weights come to roughly 335GB, and with activation overhead, about 400GB fits into a single 8-GPU node with 80GB cards. The model discussed here is roughly four times that size, so deployment requirements must be scaled up accordingly.
2. A Common Misconception About MoE Models
For Mixture-of-Experts models, compute and storage must be evaluated separately.
The model has 896 experts, with 16 activated per token — an expert activation ratio of 16 ÷ 896 ≈ 1.79%. This ratio describes how much of the expert parameters are used per token; it is not the activation ratio of the entire model. Non-expert components such as attention and shared layers participate in every token.
This has two implications for deployment:
- Storage scales with total parameters. Before inference, all experts must reside in some storage medium, because routing decides which 16 experts to call only at runtime.
- Compute scales with activated parameters. The activation ratio determines how many parameters each token actually reads and computes; it affects throughput, not whether the model fits.
So the judgment “it only activates 1.79%, so the memory footprint must be small” is wrong.
3. Route 1: Fit Everything in GPU Memory
This route requires total GPU memory to exceed the weight size, with headroom for the KV cache and runtime overhead.
At 80GB per card, 1500GB of weights implies a theoretical floor of 1500 ÷ 80 ≈ 18.75 — at least 19 cards. Accounting for KV cache, communication buffers, and load balancing, real-world planning usually targets 24 or even 32 cards (about 2560GB).
This route also has a communication challenge. In MoE inference, after each token is routed, its activations must be sent to the devices hosting the target experts and fetched back afterward. When experts are spread across many cards, this all-to-all communication happens constantly. If the communication latency cannot be hidden behind computation, compute goes to waste. This is why the official recommendation is a supernode of 64 or more accelerators, with high-speed interconnects to enlarge the communication domain so that token transfers stay within it as much as possible.
For individuals or small teams, the hardware count and networking costs of this route are usually beyond budget; it suits organizations with sustained high-throughput needs.
4. Route 2: Heterogeneous GPU + CPU Inference
This is a common approach to lower the GPU memory barrier. The division of labor:
- GPU: handles attention and shared computations. These are compute-intensive and demand high memory bandwidth, but their footprint is relatively small.
- CPU memory: stores all the sparse experts. Each token only needs to fetch the 16 experts selected by the router.
The core requirement here is large system memory. The weights alone are about 1500GB; adding the OS, KV cache, and cache space, 2TB of system memory is a safe choice.
Estimating the Decoding Speed Ceiling
The decoding phase (token-by-token generation) is mainly memory-bandwidth-bound. Generating each token requires reading that token’s activated expert weights. A rough upper-bound estimate:
expert_storage_gb = 1400 # assume expert weights are about 1400GBactive_ratio = 16 / 896 # about 1.79%bytes_per_token_gb = expert_storage_gb * active_ratio # about 25GBeffective_bw_gbs = 400 # assumed effective memory bandwidthupper_bound_tps = effective_bw_gbs / bytes_per_token_gb # about 16 token/s
This is a theoretical ceiling. It ignores the computation of non-expert parts, scheduling overhead, and the fact that bandwidth can never be fully utilized. Real-world speed is more likely to land in the single digits to low teens of tokens per second.
