Local Deployment Cost Estimation for Trillion-Parameter MoE Large Language Models
This guide explains how to estimate the hardware, memory, interconnect, and operating cost of privately deploying trillion-parameter Mixture-of-Experts (MoE) large language models. It clarifies that GPU memory must be sized for total parameters while compute is driven by activated parameters, then covers quantization overhead, realistic GPU counts, high-bandwidth communication domains, GPU+CPU heterogeneous inference, and cost models for self-purchase, cloud rental, and heterogeneous deployment. The article also includes example estimates and a pre-purchase checklist.
Local Deployment Cost Estimation for Trillion-Parameter MoE Large Language Models
When parameter counts enter the trillion range, Mixture-of-Experts (MoE) large language models can offer strong capabilities, but private deployment becomes substantially more difficult. Unlike dense models, MoE deployment cannot be estimated simply as “parameters divided by GPU memory.” A more accurate conclusion is: GPU memory is determined by total parameters, while compute is determined by activated parameters. This article provides a practical framework for estimating memory usage, quantization overhead, interconnect topology, heterogeneous inference, and deployment cost.
1. Use the Right Baseline: Memory Depends on Total Parameters; Compute Depends on Activated Parameters
The following example is based on a public trillion-parameter MoE model technical report: the model has about 2.8 trillion parameters, contains about 896 experts, and each token is routed to 16 experts. The expert activation ratio is therefore 16/896 ≈ 1.79%.
A common misunderstanding should be clarified here: 16/896 is the expert-parameter activation ratio, not the total model parameter activation ratio. Attention, gating, normalization, embedding, and other resident parameters usually participate in computation for every token. As a result, the actual activated parameter ratio is higher than the expert activation ratio. For example, a public 671B-scale model is commonly cited as having about 37B activated parameters, or about 5.5% of its total parameters.
Therefore, MoE deployment can be summarized in two sentences:
- Memory and storage usage are determined by total parameters: Because the system cannot know in advance which experts the next token will route to, all experts must remain resident in addressable storage.
- Compute consumption is determined by activated parameters: Each forward pass only computes the selected experts, but resident parameters such as attention still participate in computation.
The conclusion is that a lower activation ratio can reduce compute pressure, but it does not eliminate weight storage requirements. In addition, the KV cache still grows with context length and concurrency.
2. Quantization Lowers the Deployment Threshold, but Scaling Factors Increase Model Size
Some trillion-parameter MoE models may use quantization-aware training (QAT) from the supervised fine-tuning (SFT) stage, training directly with 4-bit weights and 8-bit activations. The specific approach depends on the target model’s technical report. If weights are released in BF16 or FP8, the user must requantize them for the target hardware and validate accuracy loss independently.
A simple baseline estimate for 2.8 trillion parameters at 4-bit is:
Raw lower bound ≈ 2.8×10^12 × 4 bit ÷ 8 ≈ 1400 GB
However, real 4-bit floating-point micro-scaling formats are usually not this ideal. If every 32 4-bit elements carry one additional 8-bit scaling factor, the effective bit width becomes:
Effective bits per element = (32 × 4 + 8) ÷ 32 = 4.25 bitWeight size ≈ 2.8×10^12 × 4.25 bit ÷ 8 ≈ 1487.5 GB
In other words, the weights alone approach 1.5 TB. Beyond this, the following factors must also be considered:
- Tensors that are not quantized to 4-bit, such as some attention weights, normalization layers, and embeddings;
- Metadata, alignment padding, and runtime workspace;
- KV cache under long-context and concurrent workloads.
A horizontal comparison helps explain the scale. In an example comparison, a 671B-scale open-source model under 4-bit group quantization has 335GB of weights, 37GB of activated and auxiliary parameters, and 372GB in total. In an example setup with 8 GPUs, each with 80GB of memory, totaling 640GB, the remaining headroom is about 268GB, which can cover long-context KV cache and moderate concurrency. The example assumes a single replica, moderate context length, and non-extreme concurrency.
The weight size of a trillion-parameter model is about four times that of the 671B-scale example. This directly determines the hardware minimum for full deployment.
3. Hardware Minimum Is Not Just “Can It Fit?” but “Can Data Move?”
If only capacity is considered, 1487.5GB ÷ 80GB ≈ 19 GPUs may appear sufficient. However, real full-capacity deployment usually recommends a high-bandwidth communication domain with at least 64 accelerators. The 64-GPU threshold is an empirical lower bound and may vary depending on model structure, parallel strategy, and inference framework.
There are two main reasons.
First, storage and runtime headroom are required. Non-4-bit tensors, KV cache, activation buffers, and communication buffers all consume GPU memory. Space must be reserved for long contexts, batch processing, and concurrent requests.
Second, interconnect topology determines success or failure. Large-scale MoE inference is highly sensitive to all-to-all communication bandwidth. When 896 experts are distributed across different GPUs or nodes, each token must move its activations to the device hosting the target expert after routing, and then move results back after computation. If this movement crosses a slow interconnect boundary, communication latency can consume compute capacity and cause expensive GPUs to idle.
Therefore, GPU-to-GPU and node-to-node connections should use high-bandwidth switching networks, and expert all-to-all communication should remain within high-bandwidth domains as much as possible. For scenarios that must cross domains, hierarchical all-to-all can be used to reduce inter-node traffic. The cost of high-speed interconnect networks is often underestimated in deployment budgets.
4. Low-Cost Route: GPU+CPU Heterogeneous Inference
If the goal is not the lowest latency and highest throughput, but stable token generation at a lower cost, GPU+CPU heterogeneous inference is a more practical path.
A typical division of labor is:
- Shared attention backbone: This can use a low-rank latent attention (MLA-class) backbone with gating. The attention portion is computed for every token and cannot have its cost amortized through sparse expert activation. It is therefore more suitable to keep on GPUs to leverage high memory bandwidth.
- Sparse expert layers: Expert weights occupy most of the storage, but each token activates only a small number of experts. Expert weights can be offloaded as a whole to large-memory servers, using high-capacity, lower-cost CPU DRAM to hold the majority of weights.
The core value of this approach is to move the most space-consuming weights from expensive high-memory GPUs to low-cost large memory, allowing GPUs to focus only on the parts that genuinely require compute and bandwidth.
As an example, consider a dual-socket server-class CPU paired with a small number of data-center-class or professional GPUs, running a 671B-scale 4-bit group-quantized model. In this example, weights are 335GB, activated and auxiliary parameters are 37GB, and total size is 372GB. In the prefill stage, throughput can reach more than 200 tokens per second; in the decode stage, it is about ten-plus tokens per second. These numbers usually come with the qualification of an “expert selection strategy,” meaning throughput is obtained by constraining the scale of routing-participating experts.
The difference between the two stages should be distinguished:
- prefill: Processes a large number of input tokens at once. It is compute-intensive, and GPUs can perform well here.
- decode: Generates one token per step. The main bottleneck is moving weights from storage to compute units, making it memory-access-intensive. With batching and concurrency, decode gradually becomes limited by both compute and bandwidth.
The cost of the heterogeneous approach is also clear: expert activations need to be moved between GPUs and CPUs over interfaces such as PCIe, adding latency. An expert selection strategy may slightly affect output quality, requiring a trade-off between quality and speed.
5. How to Calculate Cost: Self-Purchase, Rental, and Heterogeneous Routes
Before formal purchase or rental, one point must be confirmed: verify the model weight usage license before commercial use.
Self-purchase cannot be calculated simply as “hardware unit price × quantity × duration,” because self-purchase is a one-time capital expenditure and must be amortized with depreciation and operating costs. A practical formula is:
Self-purchase monthly total ≈ hardware total cost ÷ depreciation months+ rack/facility+ storage+ network+ electricity (total system power kW × PUE × electricity price × 720h)+ operations labor
Rental can be billed by instance duration:
Rental monthly cost ≈ instance price × GPU count × hours × 720+ storage/network/traffic
All example estimates below are illustrative assumptions. Prices are based on commonly observed public market ranges, and usage duration is calculated as 720 hours per month. The example cost figures are illustrative and expressed in RMB.
Example Estimates
Route A: Full GPU Super Node
Assume 64 data-center-class GPUs with 80GB memory each. The total cost of hardware, chassis, network, and supporting equipment is RMB 16 million, depreciated over 36 months, resulting in monthly depreciation of about RMB 444,000. If total system power is 200kW, PUE is 1.3, and electricity price is RMB 0.7/kWh, monthly electricity cost is about RMB 131,000. Adding facility, storage, network, and operations costs of RMB 50,000 gives a monthly total cost of about RMB 625,000.
Route B: GPU+CPU Heterogeneous
Assume one large-memory dual-socket server plus 4 data-center-class or professional GPUs. Total hardware cost is RMB 800,000, depreciated over 36 months, resulting in monthly depreciation of about RMB 22,200. If total system power is 8kW, PUE is 1.3, and electricity price is RMB 0.7/kWh, monthly electricity cost is about RMB 5,200. Adding facility and operations costs of RMB 5,000 gives a monthly total cost of about RMB 32,400. This route is low-cost, but the number of replicas must be estimated according to the target tok/s.
Route C: Cloud Rental
Assume renting 64 data-center-class GPUs at an instance price of RMB 30/GPU/hour. The GPU rental cost is 64 × 30 × 720 ≈ RMB 1,382,400. Adding storage, network, and traffic costs of about RMB 50,000 gives a monthly total cost of about RMB 1,432,400.
Route Comparison Table
| Route | Throughput and latency | Monthly cost level | Operations effort | Use cases |
|---|---|---|---|---|
| Route A: GPU super node | High throughput, low latency | Hundreds of thousands RMB or higher | High | Production environments, high concurrency, low latency |
| Route B: GPU+CPU heterogeneous | Medium-low throughput, higher latency | Tens of thousands RMB | Medium | Research validation, internal pilots, offline tasks |
| Route C: Cloud rental | High elasticity, depends on instance specifications | Hundreds of thousands RMB or hourly billing | Low | Short-term testing, peak-valley fluctuation, rapid validation |
For long-term, high-frequency use, a total cost of ownership (TCO) comparison between self-purchase and rental is also needed. Beyond hardware unit price, two multipliers significantly amplify cost: throughput targets and utilization. The tok/s of a single replica determines how many replicas are needed to meet concurrency requirements. Idle high-end GPUs, whether self-purchased or rented, increase the cost per token.
6. FAQ
How much GPU memory and how many GPUs are needed for MoE deployment?
The number of GPUs cannot be estimated by simply dividing total parameter count by single-GPU memory. Using the example of 2.8 trillion parameters and an effective 4.25-bit weight format, weights are about 1487.5GB. With 80GB-memory GPUs, theoretical capacity is about 19 GPUs. However, real full-capacity deployment also requires KV cache, activations, communication buffers, and high-bandwidth interconnect. Therefore, it usually requires 64 or more accelerators forming a high-bandwidth communication domain.
How is MoE deployment different from dense model deployment?
For dense models, both storage and compute grow with total parameters. For MoE models, weight storage is still determined by total parameters, but compute is related only to activated parameters. The special challenge of MoE lies in all-to-all communication caused by expert routing and the network topology cost after experts are distributed across devices.
What are common mistakes in local MoE deployment?
Common mistakes include: estimating GPU count only by “parameters divided by GPU memory”; ignoring quantization scaling factors; ignoring KV cache and runtime headroom; ignoring all-to-all communication overhead; using consumer-grade GPUs in data-center environments; and failing to verify model weight licenses and compliance requirements.
7. Pre-Purchase Checklist
- Memory budget: Have weights, including scaling factors at about 1.5 TB, non-quantized tensors, KV cache, and runtime headroom all been included?
- Topology budget: Are GPU-to-GPU and node-to-node connections based on high-bandwidth switching networks? Is all-to-all communication kept within high-bandwidth domains as much as possible?
- Throughput budget: How many replicas are required to meet tok/s at the target concurrency? Do prefill and decode meet targets separately?
- Accuracy budget: Are the quantization scheme and expert selection strategy acceptable?
- Compliance budget: Have model weight usage licenses, data compliance requirements, and restrictions on consumer-grade GPU deployment been confirmed?
- Cost budget: Among self-purchase, rental, and heterogeneous routes, which has the better TCO? What idle rate is expected?
Once these questions are calculated clearly, “how much it will cost” is no longer a vague feeling, but a reviewable bill. All figures in this article are examples or public-information estimates. Before making a formal decision, they should be corrected based on the target model, actual hardware, and benchmark results.
