Estimating the Cost of Local Deployment for Trillion-Parameter MoE Models: Three Tiers

    How much does it cost to run a trillion-parameter MoE model on your own hardware? This article walks through a reproducible estimation method for local deployment, covering the storage floor imposed by full weights and KV Cache, why "fitting the model" is harder than "running it fast," and three deployment tiers with hardware configurations and cost ranges for both purchase and cloud rental. Includes estimation formulas, pseudocode, and a verification checklist to turn rough budgets into actionable deployment plans.

    1. Setting the Boundaries of the Estimate

    When a target model’s weights and technical report are not yet public, and public benchmarks remain unverified, any claim precise down to “how many GPUs, how much money” can only serve as an engineering estimate. This article uses a reproducible estimation method: first compute the storage floor for weights and KV Cache, then configure hardware for three performance tiers, and finally give cost ranges for purchase and rental. Costs cover compute, memory, storage, networking, power, and basic operations only—not model licensing, data compliance work, or business migration.

    The core conclusion: the hardest part of deploying a trillion-parameter MoE model locally is not compute, but “fitting it, moving it, and feeding it.” Total weights must be fully addressable; the activation ratio affects compute consumption but does not reduce the storage floor. After expert parallelism, all-to-all communication directly erodes effective compute, and KV Cache grows rapidly under high concurrency and long contexts. Consequently, cost differences across the three tiers come mainly from memory capacity, memory bandwidth, and the scale of the high-speed interconnect domain.

    2. Why “Fitting It” Is Harder Than “Running It Fast”

    MoE deployments reserve memory based on total parameters; at inference time, only routed experts are activated. As an example, assume a model with roughly 2.8 trillion total parameters, 896 experts, and 16 experts activated per token. That yields an expert activation ratio of about 1.79%, though this is not a strict parameter activation ratio. All experts must fit into addressable storage; the activation ratio only determines how many experts each computation calls.

    Using 4-bit weight quantization, the raw data floor is approximately:

    • 2.8 trillion × 4 bits ÷ 8 ≈ 1,400 GB
    • With one 8-bit scale factor per 32 4-bit elements, weights plus scale factors come to roughly 2.8 trillion × 4.25 bits ÷ 8 ≈ 1,487.5 GB
    • Adding non-4-bit tensors, metadata, alignment, runtime workspaces, and KV Cache, actual provisioned memory typically needs to be planned at 1.7–2.2 TB

    KV Cache cannot be ignored either. The higher the concurrency and the longer the context, the larger the KV Cache. In a 10-concurrent-user, long-context scenario, KV Cache can reach tens to hundreds of GB, depending on layer count, KV heads, head dimension, sequence length, and precision. Before deployment, you must load-test with realistic request distributions—not just look at weight size.

    In addition, large-scale MoE inference is highly sensitive to all-to-all communication. After routing, each token’s activations must be moved to the devices hosting its target experts, then moved back. The more scattered the expert distribution, the more likely communication latency becomes the bottleneck. The larger the high-speed interconnect domain, the less traffic leaves the domain, and the higher the effective compute utilization.

    3. Three Deployment Tiers and Cost Estimates

    Tier Target Core Configuration Purchase Estimate Cloud Rental Estimate
    Tier 1: Just runs Single-digit to low-double-digit tokens/s, speed not a priority 2 TB+ memory, 1–2 accelerators with 80 GB-class memory, 3–5 TB local SSD storage ~¥250K–600K (~$35K–85K) ~¥30K–80K/month (~$4K–11K)
    Tier 2: 25 tokens/s for one user Single-user output at 25+ tokens/s, quantization no worse than 4-bit with scales 8–16 accelerators with 80 GB-class memory, 1.5–2 TB memory, high-speed local storage and interconnect ~¥1.2M–3M (~$170K–420K) ~¥80K–250K/month (~$11K–35K)
    Tier 3: 10 concurrent users at 25 tokens/s 10 concurrent users, each at 25+ tokens/s, total throughput ~250 tokens/s 32–64 accelerators with 80 GB-class memory, 2–4 TB memory, high-speed interconnect domain, redundant storage ~¥10M–30M (~$1.4M–4.2M) ~¥500K–1.5M/month (~$70K–210K)

    Tier 1’s core approach is CPU+GPU heterogeneous inference: compute-intensive parts like attention stay on the accelerator, while sparse expert weights are offloaded to server memory, with the large memory feeding the CPU. This can fit the nearly 1.5 TB of weights into addressable storage, but memory bandwidth and host interconnect become bottlenecks—speed is typically limited to “it runs,” with high first-token latency. It suits validation, research, and low-frequency use.

    Tier 2 targets 25 tokens/s for a single user, which cannot rely on memory offloading alone. Hot experts must reside on the accelerator, with cold experts swapped in on demand, using high-bandwidth memory and fast local storage to reduce swap overhead. Eight to sixteen 80 GB-class accelerators provide 640 GB–1.28 TB of high-bandwidth memory, which, combined with 1.5–2 TB of system memory and expert caching strategies, offers a chance of approaching the target. But whether 25 tokens/s can be sustained must be verified with real benchmarks once the weights are released.

    Tier 3 targets 10 concurrent users at 25 tokens/s each, for total throughput of about 250 tokens/s. A single card or node cannot handle this; it requires expert parallelism, tensor parallelism, and multi-node high-speed interconnect. Thirty-two to sixty-four 80 GB-class accelerators provide 2.56–5.12 TB of high-bandwidth memory—enough to distribute nearly 1.5 TB of weights while leaving room for KV Cache and redundancy. Besides accelerators, major costs include high-speed switching, parallel storage, rack power delivery, and cooling. At an estimated 40–70 kW load, electricity and cooling may run tens of thousands of RMB per month, but this remains secondary to hardware purchase costs.

    4. Cost Formulas and Pseudocode

    The weight storage floor can be estimated with the following pseudocode:

    1. def weight_storage_gb(params, weight_bits, scale_bits=0, group_size=32):
    2. base = params * weight_bits / 8 / 1e9
    3. scale = params * (scale_bits / group_size) / 8 / 1e9 if scale_bits else 0
    4. return base + scale
    5. print(weight_storage_gb(2.8e12, 4, 8, 32))
    6. # ~1487.5 GB — floor for weights and scale factors only

    KV Cache can be estimated with a general formula:

    1. kv_gb = 2 * layers * kv_heads * head_dim * seq_len * batch * bytes_per_elem / 1e9

    Here, 2 accounts for keys and values, batch is the concurrency level, seq_len is the context length, and bytes_per_elem depends on KV Cache precision. Runtime workspaces, fragmentation, and alignment overhead must be added on top.

    Throughput estimation must consider both memory bandwidth and communication. Roughly speaking, the decode phase reads the activated experts’ weights per token. If each token activates about 50B parameters at 4-bit quantization, a single token requires reading about 25 GB of weights; reaching 25 tokens/s requires roughly 625 GB/s of effective bandwidth just for expert weight reads. At 10 concurrent users with total throughput of 250 tokens/s, aggregate bandwidth demand rises to the TB/s level, which must be shared across multiple cards’ high-bandwidth memory via expert parallelism.

    5. Implementation Sequence and Verification Checklist

    A recommended progression: “get it running first, then speed it up, then scale concurrency.”

    1. Start with Tier 1 validation: confirm weights load, expert routing works, and output quality is normal; record peak memory, first-token latency, and decode speed.
    2. Then Tier 2 optimization: introduce hot-expert caching, quantization calibration, continuous batching, and KV Cache management; load-test whether 25 tokens/s is stable under real requests.
    3. Finally Tier 3 concurrency: verify all-to-all bandwidth after expert parallelism, cross-node latency, p95 latency under 10 concurrent users, and fault recovery.

    For a short-term PoC, general-purpose GPU instances, high-memory instances, object storage, and monitoring/alerting from cloud providers such as Baidu AI Cloud can be used, billed hourly or monthly for elastic validation. Whether to self-host for production depends on long-term utilization, data compliance, and total cost of ownership. Whether you buy or rent, once the weights are released, verify each item: weight-loading memory, peak GPU memory, per-token latency, 25 tokens/s stability, p95 at 10 concurrent users, communication bandwidth, power and cooling headroom, and whether the model license permits local commercial use. Only when these numbers close the loop can the three-tier budget move from estimate to executable plan.