The Real Cost of Self-Hosting Large-Scale MoE Models
A practical cost breakdown for deploying a large-scale Mixture-of-Experts model on-premises, covering VRAM, compute, networking, and storage. It explains why total parameter count alone leads to underestimation, how KV Cache and context length drive memory usage, two reference budget tiers, a capacity estimation formula, and cost-reduction options.
1. Understand the Model First: Parameter Count Is Not Compute Demand
Before discussing deployment costs, you need to clarify three key parameters of a large-scale Mixture-of-Experts (MoE) model: total parameter count, activated parameters per token, and native context length. This article uses a set of figures common in the industry as a sample: roughly 743B total parameters, about 39B parameters activated per generated token, and native support for a 1M context.
Each of these numbers drives a completely different cost:
- Total parameter count sets the VRAM floor. MoE expert weights do not all participate in computation at once, but they must stay resident in VRAM. Otherwise, every routing step would have to fetch weights from external storage, and the latency would be unacceptable.
- Activated parameters set the compute demand. An activation scale of about 39B means the matrix multiplications in a single forward pass are far smaller than the total parameter count implies. This is where MoE gains its throughput advantage over dense models in inference.
- Context length drives VRAM fluctuation. The KV Cache grows linearly with context length and concurrency. A 1M context is not a marketing line; it is the least predictable variable in the memory budget.
The conclusion is straightforward: estimating deployment cost from total parameters divided by VRAM alone will almost certainly underestimate it.
2. The VRAM Bill: Weights Are Only the Entry Ticket
Take FP8 precision as an example. 743B weights occupy about 743GB in theory. A mainstream data-center accelerator has around 141GB of VRAM, so 8 cards total roughly 1128GB. There appears to be plenty of headroom, but you actually have to deduct:
- Inference framework and runtime overhead: CUDA contexts, communication libraries, and memory allocator fragmentation typically consume several GB to over ten GB.
- KV Cache: This is the biggest variable. Per-token KV usage depends on the number of layers, attention heads, and key/value dimensions. At a 1M context, a single request can consume tens of GB.
- Parallelism overhead: Tensor parallelism and expert parallelism introduce weight replicas and communication buffers, so actual usage exceeds the theoretical value.
So “8 cards just fit the FP8 weights” only applies to a low-concurrency, short-context validation scenario. It cannot support high-concurrency service with a 1M context.
3. The Compute and Network Bill: The Second Underestimated Cost
MoE’s activation sparsity lowers per-token compute, but under high concurrency, total throughput is still constrained by VRAM bandwidth and inter-card interconnect. In multi-node deployments, inter-node bandwidth becomes a hard constraint, and high-speed interconnect networks, switches, and cables are often an expense that gets overlooked. You also need supporting infrastructure: high-performance parallel file storage to load hundreds of GB of weights, logging services and monitoring alerts for long-term stable operation, and a container platform for multi-instance orchestration.
4. Two Budget Tiers: From “It Runs” to “It Serves”
- Entry tier: A single node with 8 high-VRAM accelerators, with a whole-machine budget on the order of RMB 3.5 million. It is positioned for feature validation and internal pilots and can hardly handle high-concurrency, long-context workloads.
- Production tier: A dual-node setup that stably supports a full 1M context with a certain level of concurrency, with a budget on the order of RMB 7.3–8 million, including networking, storage, and redundancy.
There are also many hidden costs in between: data center space and power, spare parts, the labor for model quantization and evaluation, and ongoing operational investment for continuous iteration.
5. A Practical Approach to Capacity Estimation
Work backward from “concurrency × context length” to estimate the total KV Cache, then add weights and runtime overhead, and finally leave more than 20% headroom. The illustrative logic:
Required VRAM ≈ weights (FP8) + KV (concurrency × context × per-token KV) + runtime overhead + headroom
If the estimate approaches the single-node limit, prioritize scaling out horizontally rather than pushing precision compression to the extreme.
6. Cost-Reduction Paths and Decision Recommendations
Viable directions include: adopting lower-precision quantization with a quality regression check, offering tiered long- and short-context services by workload, using cache reuse to reduce repeated prefix computation, and supplementing peak demand with general-purpose container platforms and elastic compute in the cloud. If you want a fast launch and elasticity, you can also evaluate general-purpose compute and containerized solutions from providers such as Baidu AI Cloud, turning heavy capital investment into on-demand usage.
In one sentence: open source does not mean low cost. RMB 3.5 million is only the entry ticket; the real budget has to be calculated by “concurrency × context.”
