Cost Evaluation for Local Deployment of Trillion-Parameter MoE Models
This article evaluates the total cost of ownership (TCO) for locally deploying trillion-parameter Mixture-of-Experts (MoE) models. It covers VRAM and memory lower limits, deployment strategies including full-capacity clusters and heterogeneous offloading, and provides a tiered cost breakdown to guide hardware planning and optimization.
1. System TCO: Beyond Just Buying GPUs
When discussing the local deployment of trillion-parameter MoE models, the most common mistake is to look at the price of a single GPU first and then reverse-engineer the total budget. In reality, whether the model can run is determined by the minimum parameter storage capacity, how fast it runs is determined by compute power and interconnect bandwidth, and the long-term expenditure is dictated by electricity, cooling, datacenter facilities, storage, operations staff, depreciation, and licensing compliance. A more reasonable metric is the Total Cost of Ownership (TCO):
def tco(card_count, card_server_cost, network_ratio,storage_cost, power_kw, electricity_price,years, ops_cost, license_cost=0):hardware = card_count * card_server_costnetwork = hardware * network_ratioelectricity = power_kw * 24 * 365 * years * electricity_pricereturn hardware + network + storage_cost + electricity + ops_cost + license_cost
The following discussion uses a 2.8 trillion parameter MoE model as an example. It has approximately 2.8 trillion total parameters, assuming 896 experts, with 16 experts activated per token, resulting in an expert activation ratio of about 1.79%. It must be emphasized that the expert activation ratio does not equal the strict parameter activation ratio. During MoE deployment, all experts must reside in storage or memory, and only a few are routed and loaded during inference. The activation ratio primarily affects compute consumption, but it does not change the fact that the full set of parameters must be accessible in storage.
2. VRAM and Memory Lower Limits: Weights First, Then KV Cache
2.1 The raw data lower limit for 4-bit weights is about 1.4TB, but actual provisioning requires more
Converting 2.8 trillion parameters to 4-bit yields a raw data lower limit of approximately:
total_params = 2.8e12bits_per_weight = 4scale_bits = 8block_size = 32effective_bits = bits_per_weight + scale_bits / block_size # 4.25 bitweight_gb = total_params * effective_bits / 8 / 1e9print(weight_gb) # Approx 1487.5GB
If standard block-wise quantization is used, where every 32 4-bit weights are paired with an 8-bit scaling factor, the equivalent is about 4.25 bits per parameter, making the weights roughly 1.49TB. This does not account for non-4-bit tensors, metadata, alignment padding, runtime workspace, and KV cache. Therefore, engineering teams cannot purchase hardware strictly based on the 1.49TB baseline. It is recommended to provision between 1.8TB and 2.2TB for weight storage. If using 8-bit weights, plan for about 2.8TB to 3.2TB; for 16-bit, about 5.6TB to 6.5TB. Every step up in precision significantly raises the hardware lower limit and interconnect pressure.
2.2 KV cache is determined by context length, concurrency, and attention architecture
The KV cache can be estimated using a general formula:
def kv_cache_gb(layers, kv_heads, head_dim, seq_len, batch,bytes_per_elem=2):total_bytes = 2 * layers * kv_heads * head_dim * seq_len * batch * bytes_per_elemreturn total_bytes / 1e9
The factor of 2 represents keys and values. Architectures like Grouped-Query Attention or Latent Attention will change the kv_heads and head_dim values, but the logic remains the same: long contexts and high concurrency will linearly amplify the KV cache. For local deployments aimed at production use cases, maximum context length, concurrent sessions, and cache reuse strategies must be integrated into capacity planning. Otherwise, you will encounter a scenario where the weights fit, but memory overflows as soon as concurrency ramps up.
2.3 Comparing with 671B-scale MoE to understand the magnitude difference
A well-known 671B-scale MoE model requires about 685GB for main parameters and multi-token prediction parameters under 8-bit; for 4-bit, weights take about 335GB, plus about 37GB for activations, totaling around 400GB. This can run with low concurrency on 8 80GB accelerator cards (approx. 640GB VRAM). The 2.8 trillion parameter model is over 4 times this size, naturally resulting in a much higher lower limit for full-capacity deployment. The point of this comparison is not to copy the configuration, but to illustrate that local deployment of trillion-parameter MoE shifts from a “single-node multi-GPU” problem to a “multi-node high-speed interconnect domain” problem.
3. Deployment Paths: Full Clusters, Heterogeneous Offloading, and Quantization Compromises
3.1 Full-capacity accelerator clusters: The communication domain determines usability
Large-scale MoE inference is extremely sensitive to all-to-all communication bandwidth. With 896 experts distributed across multiple cards, after a token is routed, the activation values must be moved to the card hosting the target expert, computed, and moved back. If cross-node communication is slow, compute power is consumed by communication latency. Public resources often recommend using 64 or more accelerators to form a single high-speed interconnect domain, minimizing expert data transfers outside the domain. Thus, the cost of a full-capacity setup is not just the number of accelerator cards; it also includes high-bandwidth inter-GPU interconnects, switching networks, topology design, and fault domain planning.
3.2 Accelerator + large memory CPU heterogeneous inference: Suitable for validation and low concurrency
A common industry approach is heterogeneous inference: keeping the compute-intensive shared attention layers on the accelerators, while offloading the sparse expert layers—which take up the bulk of storage but only activate a few experts at a time—to host memory, using large-memory servers to feed the accelerators. In public heterogeneous inference tutorials, a 671B-scale MoE with about 377GB of 4-bit weights, configured with a dual-socket server CPU and a single consumer-grade accelerator, achieved prefill speeds in the hundreds of tokens/s range and decode at about a dozen tokens/s, depending on expert selection strategies. While these numbers cannot be directly extrapolated to the 2.8 trillion parameter model, they show that the heterogeneous route is viable for validation, low-concurrency, and cost-sensitive scenarios. The bottlenecks are typically host memory bandwidth, NUMA access, expert swapping, and decode latency.
3.3 Quantization, caching, and elastic supplementation
Quantization is the primary method to lower the baseline, but it requires quantization-aware training or calibration to prevent accuracy collapse. Additionally, prefix caching, session caching, hot/cold expert tiering, and batch scheduling can be implemented. For workloads with pronounced traffic peaks, general cloud instances can be used for elastic scaling, but core weights and data compliance still require local planning. Do not use “distilled small models” as a substitute for full-capacity deployment; their capability boundaries are fundamentally different.
4. How Much It Costs: Three Tiers and Cost Composition
The following is a methodological example, not an official quote. Assuming a single 80GB-class accelerator with an integrated server costs 150,000 to 300,000 CNY, networking is 15% to 30% of hardware, and electricity, cooling, facilities, storage, and operations staff are calculated separately.
| Tier | Configuration Strategy | Hardware & First-Year System Cost Order | Use Case |
|---|---|---|---|
| Validation / Low-concurrency Heterogeneous | 2-4TB host memory + few accelerators, expert offloading | Hundreds of thousands to millions of CNY | Functional validation, offline tasks, low concurrency |
| Full-capacity Low-concurrency | 32-64 cards, single high-speed interconnect domain, 4-bit weights | ~6 to 25 million CNY | Intranet production, controlled concurrency |
| Full-capacity High-concurrency | 64-128 cards, high-bandwidth interconnect, redundancy & storage | ~12 to 50 million CNY | Multi-team, long context, high concurrency |
Recommended priorities for cost optimization: First, limit context length and concurrency; next, apply quantization and caching; then, use expert offloading; only expand the number of GPUs as a last resort. Before scaling up, you must verify each item using benchmark tests: prefill throughput, decode throughput, Time To First Token (TTFT), Time Per Output Token (TPOT), maximum concurrency, VRAM peak, host memory peak, all-to-all bandwidth utilization, power consumption, and thermal control. Cost estimates are only meaningful when these metrics are stable.
