Local Deployment Cost Breakdown for Ultra-Scale MoE Models
Can a trillion-parameter-scale model actually run on your own hardware, and what would it cost? Using a representative ultra-scale MoE model with about 2.8 trillion total parameters, 896 experts, and 16 experts activated per token, this article separates three often-confused metrics—expert activation ratio, actual parameter activation, and GPU memory footprint—then works through the memory floor, compute limits, and three deployment paths that range from a single 24 GB GPU paired with a large-memory CPU up to a production-grade supernode. It also breaks down total cost of ownership (depreciation, electricity, staffing, opportunity cost, and lock-in risk), compares the cloud API alternative, and provides a pre-deployment checklist.
Introduction: From “Can It Run?” to “Is It Worth Running?”
“Can a certain trillion-parameter-scale large model be deployed on-premises? Roughly how much would it cost?” These are questions many developers and companies ask when evaluating private deployment of large models. On the surface, the deployment question boils down to “how much GPU memory is needed, and how many cards?” But for an ultra-large MoE (Mixture-of-Experts) model, that formula doesn’t hold. It involves four dimensions at once:
- Capacity: whether all the weights fit;
- Bandwidth: whether the weights can be fed into the compute units in time for every generated token;
- Interconnect: whether the overhead of moving activation data across cards and nodes is manageable;
- Electricity and operations: whether the long-term total cost of running is acceptable.
This article isn’t tied to any specific product. We use a representative ultra-scale MoE model as a reference: it has about 2.8 trillion total parameters, activates 16 of its 896 experts per token, uses a hybrid architecture of linear attention and full attention, and has been quantization-aware trained since the supervised fine-tuning stage. Starting with “do the math,” we break it down piece by piece.
1. Three Numbers to Separate First: Total Parameters, Activation Ratio, and GPU Memory
When discussing the deployment cost of this kind of model, the most common mistake is conflating “sparse activation” with “saving memory.”
1.1 Expert Activation Ratio ≠ Parameter Activation Ratio
Activating 16 of 896 experts per token gives an expert activation ratio of:
16 ÷ 896 ≈ 1.79%
But this is only the expert activation ratio, not the strict parameter activation ratio. There are three reasons:
- The non-expert parts are always involved in computation: the embedding layer, output projection, routing/gating, normalization layers, and the shared attention backbone all participate at every step of every layer, unaffected by expert routing;
- Shared experts or dense feed-forward layers are permanently active: many MoE designs include this always-on portion;
- The attention part contains dense components: in a hybrid structure of linear and full attention, the global attention portion is still dense computation.
So the actual proportion of parameters activated per token is higher than 1.79%, but overall it is still sparse activation.
1.2 MoE Memory Is Counted by Total Parameters; Activation Ratio Only Affects Compute
The GPU memory footprint of MoE inference is determined by the total parameters; the activation ratio only affects compute consumption. The reason is intuitive: routing is dynamic, and no one can predict which 16 experts the next token will select. For this reason, all 896 experts must reside in addressable memory, and at inference time the corresponding experts are fetched and computed according to the routing result.
You can think of an MoE as a library holding 2.8 trillion volumes:
| Analogy element | In model deployment |
|---|---|
| The library’s total collection | All model weights, determining how large a “building” (memory) is needed at minimum |
| Borrowing materials from only 16 disciplines each time | The experts activated per token, determining the speed of “transport and reading” (bandwidth and compute) |
| The passage that carries request slips between service windows | High-speed interconnect between cards and nodes, determining the communication overhead of cross-card expert calls |
This leads to a key conclusion: capacity determines “whether it can run,” while bandwidth, compute, and interconnect determine “how fast it runs.”
1.3 Architecture Backbone: Hybrid Linear Attention and Gated Low-Rank Attention
The architecture backbone of this model is a combination of linear attention (Kimi Delta Attention, based on a Delta rule, or KDA) and attention residuals, with Gated low-rank attention (Gated MLA) as one of its components. From a deployment perspective, this has two direct implications:
- Cache-friendly for long context: the state update of linear attention resembles a recurrent neural network, and its state size does not grow linearly with context length, so the KV cache of full attention is also significantly reduced. This is an important memory advantage for long-context inference;
- The attention part is a compute-intensive stage: it still needs strong compute support. But the KDA state updates, gated low-rank projections, and attention residuals are mostly element-wise operations executed position by position or at fine granularity. They are naturally suited to being handled by the CPU—a point that becomes the design premise for the heterogeneous deployment approach in Part 4.
2. The Memory Floor: 1487.5 GB Is Just the Starting Point
2.1 Quantization-Aware Training: The Starting Point of the Memory Math
This model’s quantization strategy is MXFP4 weights with MXFP8 activations. MXFP4 is an industry standard for the microscaling format: every 32 4-bit elements share one 8-bit scale factor. If you think of the parameters as simply “4-bit,” you get a raw-data floor of 2.8 trillion × 0.5 bytes = 1400 GB. But under the standard above, the footprint of the weight elements plus their scales is:
2.8T × (4 + 8 ÷ 32) bit ÷ 8 = 2.8T × 4.25 bit ÷ 8 ≈ 1487.5 GB
This is only the weights themselves. None of the following are included yet:
- Non-4-bit tensors: the embedding layer, normalization layers, routing/gating, some attention projections, and multi-token prediction heads are usually kept at higher precision;
- Metadata and alignment: tensor indices, configuration information, and memory-alignment padding;
- Runtime workspace: activation buffers, communication buffers, temporary sampler tensors, and memory-allocator overhead;
- KV cache and attention state.
In industry practice, it is common for the total memory of a quantized model to run 10%–20% higher than the pure weights. Conservatively estimating 15%, the single-instance memory requirement of this model is about:
1487.5 GB × 1.15 ≈ 1711 GB
Meanwhile, current flagship accelerators typically have 80–192 GB of memory per card. This means no single card can hold a full instance on its own, so multi-card parallelism is required.
2.2 A Horizontal Reference: Why a 700B-Class MoE Model Can Run on 8 Cards
As a reference, a certain 700B-class MoE model (about 671B main parameters plus 14B multi-token prediction parameters) has a much lower deployment threshold:
- In FP8, the weights are about 685 GB;
- After activation-aware 4-bit weight quantization (AWQ), the weights are about 335 GB, plus about 37 GB of activations, totaling about 400 GB.
So it can be deployed on flagship accelerators with 8×80 GB (640 GB total). This reference model is about a quarter the size of our model, and its memory floor for full deployment also differs by an order of magnitude.
2.3 Compute Estimation: The Dense Part Determines How Much You Can Read per Second
When decoding on a GPU, the weight read volume per token depends on two things: the activated expert parameters per token, and the always-active dense parameters.
Let the activated expert parameters be A (in billions), the dense parameters be D, the average bit width be b, and the effective memory bandwidth per card be B. Then the upper bound of single-stream decode throughput is:
Tokens/s ≤ B ÷ [(A + D) × b ÷ 8]
With about 50 billion activated expert parameters, about 40 billion dense parameters, and an average bit width of 4.25 bits, each token must read at least about 475 GB of weights from memory. With an aggregate bandwidth of 3 TB/s, the theoretical ceiling is about 6 token/s, and in practice it is lower. This is precisely the root cause of why “just make it run” solutions have only single-digit decode speeds.
2.4 Doing the Math in Code
Before deployment, you can do an estimate to work out the memory requirement, the number of cards needed, the theoretical throughput ceiling, and the hardware acquisition cost all at once:
import mathdef estimate_deployment(params_t, experts=896, topk=16, dense_b=40.0,bits=4.25, gpu_mem_gb=141, mem_price=20.0,bw_tbps=7.0, efficiency=0.5, reserve=1.15):expert_active = params_t * 1000 * topk / experts # in billionsweight_gb = params_t * 1000 * bits / 8 # GB = 1e9 bytestotal_gb = weight_gb * reserve # incl. KV/workspace headroomcards = math.ceil(total_gb / gpu_mem_gb)active_gb = (expert_active + dense_b) * bits / 8 # per-token read volumetps = bw_tbps * 1000 * efficiency / active_gb # single-stream theoretical ceilingcost = cards * mem_price # in units of 10,000return {"Weight GB": weight_gb, "Total GPU mem GB": total_gb, "Cards": cards,"Per-token read GB": active_gb, "Decode ceiling token/s": tps,"Memory cost (10k)": cost}if __name__ == "__main__":print(estimate_deployment(params_t=2800))
Under the assumptions above, the output is as follows. The single-stream theoretical ceiling is about 6 token/s, which is in the same order of magnitude as the heterogeneous benchmark later (about 8 token/s).
{'Weight GB': 1487.5, 'Total GPU mem GB': 1711.06, 'Cards': 13,'Per-token read GB': 474.75, 'Decode ceiling token/s': 6.3, 'Memory cost (10k)': 260.0}
Two things need to be noted:
- The parameters are example values: dense_b, mem_price, and other parameters are only examples and should be replaced with the real parameters of the hardware you use;
- The estimate is a floor: the formula above does not include the portion of the KV cache that grows linearly with concurrency. The conclusion is that 13 cards is only the theoretical floor of “just barely fitting,” and it is still some distance from being usable.
3. Three Deployment Paths: From “Just Running” to “Running Well”
Depending on the requirements for throughput and stability, local deployment of this kind of model can generally proceed in three tiers. The core idea is to first validate usability at the lowest cost, then upgrade step by step.
Path 1: Just Make It Run — GPU + Large-Memory CPU (Heterogeneous)
Design approach
The core of this approach is “schedule on demand, each playing to its strengths”:
- The shared attention part stays on the GPU. Attention is compute-intensive, so the GPU’s high bandwidth and large compute can be fully leveraged;
- The sparse experts are all offloaded to CPU memory. The 896 experts account for the bulk of the storage, but only 16 are activated per token, making them well suited to being fetched on demand by a large-memory server according to the routing result.
This model’s architecture is particularly well suited to this idea. Element-wise operations like KDA’s recurrent-style state updates and low-rank gated projections are well suited to step-by-step execution on the CPU, and expert computation can also be done on the CPU with vectorized instructions, with the GPU handling only the most compute-intensive parts.
It should be emphasized: total memory must first be able to hold all the weights—this is the premise for the approach to work; paging in and out is only a stopgap.
Public reference case
A published benchmark from an open-source heterogeneous inference project is: a dual-socket server CPU paired with one 24 GB flagship accelerator, running a 4-bit quantized version of a certain 700B-class MoE model (about 377 GB), reaching over 200 token/s at prefill (the stage that processes the input prompt) and about 14 token/s at decode (generating output token by token). This figure comes with qualifications such as the expert-selection strategy and is not a universal conclusion, but it illustrates one rule: the sparser the MoE model, the better it suits heterogeneous offloading.
Porting cost estimate
The case model reads about 150 GB of weights per token and decodes at about 14 token/s, which implies an effective “memory bandwidth” of about 2.1 TB/s. The ratio of per-token weight reads between the two models is about 3.2 (475 ÷ 150), from which we can infer:
- Decode speed: expected to be in the single-digit to low-teens token/s range;
- Prefill: dependent on GPU compute and CPU efficiency. Processing an input of 32K tokens could take anywhere from tens of seconds to several minutes, which is a poor experience for long-document scenarios.
Hardware configuration and cost
- GPU: a single flagship consumer/workstation accelerator with 24 GB of memory is sufficient;
- CPU: a dual-socket server-class processor, preferably a platform that supports high memory bandwidth and large-capacity memory modules;
- Memory: start with 2 TB, and 2 TB or more is recommended;
- Disk: at least 2 TB of high-speed SSD to hold the ~1.5 TB of weights and model files. In binary units, 1487.5 GB is about 1.45 TiB.
A complete machine is a one-time investment typically in the range of tens of thousands to over a hundred thousand yuan, depending on memory capacity and GPU model. If you amortize over a year and add electricity costs, the average annual total cost can be kept at a low level.
Suitable scenarios: model capability evaluation, prompt and fine-tuning effect validation, offline data generation, and research and teaching.
Limitations: not suitable for online serving; weak concurrency and slow response to long inputs.
Path 2: Aim for Usable Speed — Multi-Card Tensor Parallelism
When you need to provide interactive service to a small team, you have to split both the weights and the computation across multiple accelerators.
Parallelism strategy
- Tensor parallelism (TP): splits attention projections and the matrices inside experts across cards, suitable for smaller clusters;
- Expert parallelism (EP): shards the 896 experts across different cards, with each card responsible for only a portion of the experts;
- Combining the two: in real deployments, it is usually expert parallelism by node first, then tensor parallelism within a node.
Capacity requirements
- Estimating at 141 GB per card, just holding the weights needs at least 11 cards;
- Reserving more for the KV cache and communication buffers, a single 8-card machine is not enough—usually 12 to 16 cards are needed;
- If you choose 80 GB-class cards, you would need 20 to 24 cards, corresponding to 3 eight-card servers.
Interconnect within the cluster
Across nodes, routing dispatch and result collection frequently cross node boundaries. Without a high-speed network, the inter-card interconnect alone becomes the bottleneck. It is worth noting that the attention part is always involved in computation, independent of MoE’s sparsity. Within an 8-card machine, it won’t naturally get faster just because the expert activation ratio is small, so scaling should be done on a per-node basis.
Optimization techniques
- KV cache quantization and paged management: reduce the memory footprint of long context;
- Continuous batching: batch multiple requests together to improve compute utilization;
- Speculative decoding: use a small draft model to guess several tokens ahead, then have the large model verify them in one pass. The bottleneck in the decode stage is weight reads, so verifying one more token adds almost no read volume.
Cost magnitude
Estimating at 141 GB per card and 200,000 yuan per card, the memory cost for 12 to 16 cards is about 2.4 million to 3.2 million yuan. Adding the whole machine, networking, and storage, the total project investment is typically on the order of several million yuan.
Suitable scenarios: private deployment for small and medium teams, R&D and testing environments, and internal assistants without high concurrency.
Path 3: Production-Grade — Supernodes and Large-Scale Parallelism
For public services or high-concurrency workloads, the official recommendation is a supernode made up of 64 or more accelerators.
Why must it be a supernode?
Large-scale MoE inference is extremely sensitive to all-to-all communication bandwidth:
- The 896 experts are distributed across multiple cards, so after routing, every token must move its activations to the card where the target expert resides;
- After computation, the results must be moved back;
- Under continuous batching, this process repeats at every layer for every generated token.
Communication latency directly eats into compute. Inside a node there is usually high-bandwidth interconnect, while across nodes it mostly relies on Ethernet or InfiniBand. A supernode uses NVLink or equivalent high-speed interconnect to enlarge the communication domain, keeping this transport within a single communication domain as much as possible.
RDMA is not optional
When bandwidth is limited, the following occurs:
- Each token doesn’t move much data, but the round-trip latency is high;
- Under high concurrency, the synchronization overhead of many small messages is further amplified.
So inter-node needs RDMA-class network capability, forming a layered topology with intra-node interconnect.
Parallel architecture
- PD disaggregation: the prefill stage is compute-intensive with lots of batching room, while the decode stage is bandwidth-intensive and latency-sensitive. Deploying them separately lets each choose a more suitable parallelism strategy;
- Expert parallelism + data parallelism: scale out horizontally with multiple replicas to carry more concurrency;
- Auto-scaling: the inference framework dynamically adjusts the number of instances by load, working with a container platform for orchestration;
- Request routing: dynamically schedule requests by session affinity and load.
Capacity and cost
- Memory: about 1.7 TB of memory can hold one or two instances. To simultaneously meet higher concurrency and longer context, you usually need several such resource pools;
- Hardware: estimating at 141 GB per card and 200,000 yuan per card, the memory cost for just 64 cards is about 12.8 million yuan;
- Network and supporting infrastructure: adding servers, RDMA networking, storage, and data-center power and cooling, the total project investment is typically over 20 million yuan, depending on cluster size;
- Staffing: tuning parallelism strategies, pinpointing communication bottlenecks, and upgrading inference frameworks all require experienced engineers over the long term.
Suitable scenarios: production-grade workloads such as external API services, large-scale enterprise knowledge-base Q&A, and multi-tenant model services.
Comparing the Three Paths
| Dimension | Path 1: Just Make It Run | Path 2: Aim for Usable | Path 3: Production-Grade |
|---|---|---|---|
| Core hardware | Dual-socket server + 2 TB memory + 1×24 GB card | 12–16× 141 GB-class cards | Supernode of 64+ cards |
| Memory requirement | ~2 TB CPU memory | ≥1.7 TB GPU memory | ≥1.7 TB GPU memory, scaled with multiple replicas |
| Interconnect requirement | PCIe is enough | High-speed intra-node interconnect | Supernode interconnect + RDMA network |
| Decode speed (single-stream) | Single-digit to low-teens token/s | Tens of token/s | Meets concurrency SLAs |
| Hardware investment | Tens of thousands to over a hundred thousand yuan | Several million yuan | Over 20 million yuan |
| Ops complexity | Low | Medium | High |
| Suitable scenarios | Evaluation, offline, research | Team private deployment, internal assistants | External service, high-concurrency workloads |
4. Don’t Just Look at the GPU: What TCO Is Really Made Of
If you calculate “how much it costs” by only counting the purchase price of the cards, you will often underestimate significantly. Total Cost of Ownership (TCO) should include at least the following.
1. Depreciation
The economic lifespan of accelerators is typically 3 to 5 years. With straight-line depreciation over 5 years, a 200,000-yuan card depreciates 40,000 yuan per year. In Path 2, the annual depreciation for 12 cards is about 480,000 yuan; in Path 3, 64 cards depreciate about 2.56 million yuan per year. This is the most rigid item in the cost structure.
2. Electricity
A simplified estimation formula is:
Annual electricity = system power (kW) × 24 × 365 × electricity price (yuan/kWh) × PUE
Taking an 8-card training/inference server as an example:
- system power of 10 kW;
- an electricity price of 0.7 yuan/kWh and a PUE of 1.4;
- annual electricity of about 86,000 yuan.
Adding cooling, racks, and data-center allocation, infrastructure costs are often on the same order of magnitude as hardware depreciation. If Path 3 runs at full load all year, the supporting infrastructure cost could reach several million yuan per year.
3. Staffing
This is the most easily underestimated item:
- deployment, parallelism splitting, and quantization validation require senior engineers;
- fault localization and framework upgrades require ongoing investment;
- for most teams, this cost could exceed hardware depreciation itself.
4. Opportunity cost
One 141 GB card can run a dozen-plus tens-of-billions dense models, or dozens of 7B models, with far higher business throughput than hosting a single trillion-parameter MoE. So whether this investment holds up depends on business value, not technical feasibility.
5. Risk and lock-in costs
- Supernode interconnect is a specific hardware form, and migrating to other hardware platforms carries lock-in risk;
- model version upgrades and quantization-strategy changes may trigger re-tuning.
Buy or rent?
If the load fluctuates a lot or the usage period is short, renting cloud GPU instances turns a fixed investment into a variable expense. For teams willing to build their own, general-purpose IaaS products from cloud platforms such as Baidu AI Cloud (for example, GPU cloud servers and elastic bare metal instances) can be used to build a private cluster, and combined with cloud products such as monitoring/alerting and logging services to handle day-to-day operations.
5. If You Just Want to “Use” It Without “Maintaining” It: The Cloud API Path
There is another path with a completely different cost structure: don’t deploy the model, just call a cloud API directly.
- Cost structure: billed by input/output tokens, with no hardware depreciation, no electricity, and no ops staffing;
- Scale effects: cloud providers rely on scale economies, deep hardware-software co-design, and more mature parallelism strategies, so the per-token cost is often lower than small-to-medium self-built setups;
- Hidden benefits: it eliminates hardware procurement and ops investment, letting the team focus on the business;
- Decision reference: roughly calculate the annual API cost corresponding to your daily call volume; if it is lower than the self-built annual total cost (depreciation + electricity + infrastructure + staffing), calling the API is more economical. Refer to the provider’s official pricing for specifics.
Conversely, when call volume grows steadily past the break-even point, or when data-compliance requirements mandate keeping things on-premises, that is when to consider building your own cluster.
6. Before You Start: A Checklist
- Quantify first, then evaluate: the model’s quantization format determines the weight size. For example, under MXFP4, the scales add about 87.5 GB of overhead (1487.5 − 1400); switching to one scale shared per 128 elements can compress this part further;
- Don’t ignore CPU memory bandwidth: Path 1’s actual decode speed is determined by effective CPU memory bandwidth—the number of memory channels, frequency, and NUMA topology all affect the result;
- Account for the KV cache: even with a hybrid linear-attention architecture, the full-attention part still has a KV cache that grows linearly with concurrency;
- Rely on real measurements: published token/s figures often come with qualifications such as expert-selection strategy, and will differ once moved to your own model and hardware, so always validate on a small batch;
- Plan the network ahead: inter-node bandwidth and RDMA capability often become the bottleneck before the GPU count does;
- Budget enough for ops: frameworks iterate quickly and need someone dedicated to keeping up.
Conclusion
Deploying an MoE model with about 2.8 trillion total parameters corresponds roughly to three cost tiers:
- Just make it run: dual-socket server + large memory + one 24 GB accelerator, starting from tens of thousands to over a hundred thousand yuan;
- Aim for usable: 12 to 16 141 GB-class accelerators, on the order of several million yuan;
- Production-grade supernode: 64+ accelerators plus an RDMA network, over 20 million yuan, plus ongoing electricity and staffing costs.
Recommended sequence:
- First, use a quantized model to work out the memory math;
- Then, use the heterogeneous approach to validate model performance;
- Finally, choose a deployment tier based on business goals.
Technical feasibility has never been the problem; the question is whether this investment matches the business value. Once you have done the math on the four accounts—memory, bandwidth, interconnect, and electricity—the answer will naturally become clear.
