How Much Does It Cost to Run a Trillion-Parameter MoE Model Locally?

    This article breaks down the local deployment cost of a trillion-parameter MoE model by separating storage requirements from compute activation. It explains why MoE memory usage scales with total parameters rather than activated experts, estimates weight storage under 4-bit quantization, compares hardware tiers, and outlines three deployment levels ranging from low-cost GPU-CPU heterogeneous inference to large-scale high-speed GPU clusters. It also highlights KV cache, hidden overhead, and all-to-all communication bottlenecks as key cost drivers.

    As open-source large models continue to grow in parameter count, one of the most common questions among developers and small teams is whether they can run these models on their own hardware. However, trillion-parameter-class Mixture-of-Experts (MoE) models have a fundamentally different deployment profile from standard dense models. This article uses a publicly discussed trillion-parameter-class MoE model as a sample and breaks the problem down to the cost level: how memory is calculated, what hardware is required for three tiers of needs, and what order of magnitude the costs fall into.

    Note: As of this writing, the complete weights of the model have not been fully released. Its official architecture parameters and accounting basis are known, but all figures related to speed, memory footprint, and hardware configuration are estimates based on public information. They should be rechecked with benchmarks after the weights are officially released.

    1. A Core Misconception: MoE Memory Is Based on Total Parameters

    Many people initially assume: “This model activates only 16 out of 896 experts per token, so the activation ratio is just 1.79%. Does that mean it only needs 1.79% of the memory?”

    This is a critical misunderstanding. Two concepts must be separated:

    • Expert activation ratio, about 1.79%: This determines compute consumption, or FLOPs, during a single forward pass. In other words, it affects “how fast it runs.”
    • Total parameter count, in the trillion-parameter range: This determines storage footprint. In other words, it affects “whether it fits in memory.”

    During MoE inference, the router dynamically selects which experts to activate for each token. However, the next token’s expert path cannot be known in advance. Therefore, all 896 experts must be preloaded into addressable storage, and only the selected experts are used for computation at inference time.

    The conclusion is straightforward: MoE storage usage is almost linearly proportional to total parameter count; the activation ratio mainly affects compute. This locks the lower bound of trillion-parameter MoE deployment to total parameters.

    2. Calculating the Memory Footprint

    2.1 Starting From the Architecture

    The model’s backbone is a linear attention/state-space attention variant, combined with attention residual structures and gated latent attention components. These are compute-intensive components and do not dominate storage. The real storage burden comes from the 896 sparse experts.

    2.2 Quantization Is the Key Lever

    The model introduces quantization-aware training from the supervised fine-tuning, or SFT, stage. This allows deployment in low-bit formats: 4-bit floating-point weights with 8-bit floating-point activations. This is a key prerequisite for fitting a trillion parameters into a single machine.

    2.3 Step-by-Step Storage Estimate

    First, calculate the theoretical raw 4-bit weight floor:

    1. 4-bit raw weights = parameter count × 4 bits ÷ 8
    2. = 2.8 × 10^12 × 0.5 byte
    3. ≈ 1400 GB

    Second, consider block-level scaling factors. This kind of 4-bit floating-point format is not “pure 4-bit.” According to open hardware specifications, every 32 4-bit weight elements include an 8-bit scale factor. The effective bit width is:

    1. Effective bit width = 4 bits + 8 bits ÷ 32 = 4.25 bits
    2. Weights with scale = parameter count × 4.25 bits ÷ 8
    3. = 2.8 × 10^12 × 0.53125 byte
    4. ≈ 1487.5 GB

    Third, several hidden costs remain outside the above figure:

    • Tensors that cannot be quantized to 4-bit, such as LayerNorm, embeddings, routers, and attention projections;
    • Metadata and indexes;
    • Memory alignment padding;
    • Runtime workspace, including activations and temporary buffers;
    • KV cache, which grows linearly with context length and concurrency and may consume tens of GB or more in long-context scenarios.

    Therefore, “about 1500 GB” is only the raw lower bound of the weights. The actual memory required to run the model must include additional headroom on top of this.

    2.4 Comparison: Why This Is an Order-of-Magnitude Threshold

    For reference, consider a publicly available hundred-billion-parameter MoE model, with about 671B main parameters plus about 14B multi-token prediction head parameters, totaling about 685B:

    Format Weights Additional activation/workspace Total Approximate hardware threshold
    FP8 ~671 GB + 14 GB ≈ 685 GB Relatively small ~685 GB Requires more than eight high-end GPUs; about 640 GB of VRAM is still insufficient, and real deployments are tighter
    4-bit quantization ~335 GB ~37 GB ~400 GB Can run on eight high-end data-center GPUs with about 640 GB total VRAM

    The trillion-parameter model is more than four times the size of this hundred-billion-parameter model. This means that the approach of barely fitting a hundred-billion-parameter model into an eight-GPU single machine no longer works for trillion-parameter models. Full deployment now requires a new hardware baseline.

    3. Three Tiers, Three Cost Levels

    Actual goals differ, so hardware and cost vary greatly. The needs can be clearly divided into three tiers.

    Tier 1: Just Get It Running, Without Caring About Speed

    Goal: Load about 1500 GB of weights into addressable storage and let the model generate tokens, even if it only produces a few tokens per second.

    Approach: GPU + CPU heterogeneous inference. This is currently the most realistic entry-level path. A common example is GPU-CPU collaborative inference frameworks. The core idea is “compute on GPU, storage in CPU memory”:

    • Each MoE layer has a shared attention component, which is compute-intensive and remains on the GPU for high-bandwidth computation;
    • The 896 sparse experts, which dominate storage, activate only 16 per token. They are offloaded to large-capacity memory and fed to the GPU as needed.

    Hardware profile: 1–2 consumer or workstation GPUs plus a multi-socket server with 1.5 TB or even 2 TB of physical memory.

    Cost level: This is the lowest of the three tiers. A high-memory server plus a small number of GPUs is usually enough, typically in the tens of thousands of RMB. The tradeoff is extremely slow speed, making it suitable only for functional verification, offline batch processing, or research experiments.

    Tier 2: Single User With 25 tokens/s Output

    Goal: Interactive single-user use with stable output around 25 tokens/s, close to human reading speed and acceptable experience.

    Approach: Still heterogeneous inference, but significantly increase the share of GPU compute and bandwidth, and optimize the expert offloading strategy. Keep frequently hit experts resident in VRAM, leave low-frequency experts in memory, and reuse KV cache to reduce repeated transfers.

    Hardware profile: Multiple high-end data-center GPUs with larger memory and higher bandwidth, paired with large-capacity high-bandwidth memory servers.

    Cost level: Clearly higher, reaching hundreds of thousands of RMB. This is a range that enthusiasts or small teams can bear, but it is painful.

    Tier 3: 10 Concurrent Requests, 25+ tokens/s per Request, and a Quantization Precision Floor

    Goal: Support about 10 concurrent requests, ensure each single-user stream exceeds 25 tokens/s, and maintain quantization precision above a required lower bound, such as approximately 8-bit effective precision to preserve output quality.

    Approach: At this point, heterogeneous offloading becomes a bottleneck. The transfer bandwidth between GPUs and memory cannot support multi-concurrency throughput. Large-scale tensor parallelism plus expert parallelism is required: distribute weights across multiple GPUs and keep communication within a single high-speed communication domain where possible. This usually means using a high-speed interconnected supernode composed of dozens of accelerators, with the official recommendation of 64 or more.

    Hardware profile: 64+ high-end data-center GPUs connected through high-bandwidth inter-GPU links into one communication domain, plus high-speed networking and large-capacity high-bandwidth memory.

    Cost level: This is a multi-million RMB capital-intensive investment, with hard requirements for power, cooling, and networking in the data center. At this tier, self-building is often no longer more economical than using on-demand cloud compute.

    4. Hidden Cost Driver: Communication Bottleneck

    The high cost of Tier 3 is not only due to the number of GPUs, but also because large-scale MoE inference is extremely sensitive to all-to-all communication bandwidth.

    The reason lies in MoE mechanics: 896 experts are distributed across dozens of GPUs. For each token, after routing, activations must be sent to the GPUs hosting the selected experts, computed, and sent back. Under 10-concurrency and long-sequence conditions, this “send-compute-receive” communication volume can grow explosively, and communication latency can consume expensive compute. If inter-GPU or inter-node communication becomes the bottleneck, adding more GPUs yields only low utilization.

    Therefore, high-end deployment emphasizes using NVLink-level high-speed interconnects to place as many GPUs as possible into the same communication domain, so expert routing stays within the high-speed domain and does not fall back to slow network transfers. This is the fundamental reason for the supernode form factor: it buys communication bandwidth, not just compute.

    5. Heterogeneous Inference: Using CPU Memory as Extended VRAM

    For Tier 1 and Tier 2, the most important concept is heterogeneous offloading. It can be summarized as policy pseudocode:

    1. for layer in model.layers:
    2. # 1) Compute-intensive shared attention: keep it on GPU and compute at high bandwidth
    3. attn_out = gpu_compute(layer.shared_attention, x)
    4. # 2) Sparse experts: select only the experts chosen by the router
    5. selected = router.top_k(x, k=16)
    6. for expert_id in selected:
    7. # 3) Frequently used experts stay in GPU cache; rare experts are loaded from host memory on demand
    8. weight = gpu_cache.get(expert_id) \
    9. or host_memory.load(expert_id) # Load from large host memory on a miss
    10. attn_out = expert_compute(weight, attn_out)
    11. # 4) Reuse KV cache to reduce repeated transfers
    12. x = layer.fuse(attn_out, residual)

    The essence is: use CPU memory, which has large capacity but limited bandwidth, to absorb storage pressure, and use GPUs, which have limited capacity but very high bandwidth, to provide compute. A tiered caching strategy of “frequently used stays resident, low-frequency is swapped in” balances the two. This also explains why such approaches work at low concurrency; once concurrency rises and hit rates drop, memory bandwidth becomes the next bottleneck.

    6. Cost Summary and Selection Advice

    Need tier Typical approach Hardware profile Cost level
    Just run it, single-digit tokens/s GPU-CPU heterogeneous offloading 1–2 GPUs + 1.5–2 TB memory server Tens of thousands of RMB
    Single user at 25 tokens/s Heterogeneous offloading + tiered cache optimization Multiple high-end data-center GPUs + high-bandwidth memory Hundreds of thousands of RMB
    10 concurrency, 25+ tokens/s per user, precision floor Large-scale tensor parallelism + expert parallelism 64+ high-speed interconnected supernode Millions of RMB

    Practical advice:

    1. Estimate memory first, then choose hardware. Use the formulas above to estimate “raw weight floor + workspace + KV cache.” Most budgets go wrong because KV cache and communication overhead are underestimated.
    2. Prioritize heterogeneous offloading for single-user validation. At low concurrency, use it to solve “can it run” at low cost before optimizing further.
    3. Multi-concurrency is the dividing line. Once concurrency is required, communication bandwidth costs can quickly exceed compute costs, sharply reducing the economics of self-hosting.
    4. Distinguish the storage threshold from the compute threshold. A low MoE activation ratio does not mean low cost. You still pay for all experts; you save compute, not storage.
    5. Prefer cloud when appropriate. At Tier 3, obtaining GPU compute on demand through cloud platforms is often more flexible and economical than building a supernode, and turns capital expenditure into controllable operating expense.

    Overall, local deployment of trillion-parameter MoE is a joint optimization problem of storage capacity and communication bandwidth, not simply a matter of piling up compute. Mapping the three need tiers to three cost levels, quantifying first and selecting hardware second, is the right way to avoid “money spent, GPUs bought, but still cannot run.”