The Real Cost of Self-Hosting Ultra-Large Models On-Premises
A practical breakdown of what it actually costs to self-host an ultra-large MoE model, covering why parameter count alone is misleading, how KV Cache and runtime overhead consume GPU memory, the difference between running a model and serving it reliably, and how quantization and phased capacity planning bring the budget back into range.
The Real Cost of Self-Hosting Ultra-Large Models On-Premises
1. Define the problem first: you are buying a runtime, not just weights
When teams estimate a private deployment budget for the first time, they usually extrapolate hardware needs from “how many parameters the model has, and how many bytes each parameter takes.” That calculation is not wrong, but it only covers the most obvious part of the cost structure. In the real world, at least four things reside on an accelerator at the same time:
- Model weights: parameters multiplied by bytes per parameter, the static lower bound of memory usage.
- Runtime and framework overhead: device drivers, communication libraries, inference engine context, operator workspaces, memory fragmentation, and reserved pools.
- KV Cache: dynamic usage tied directly to context length, concurrent requests, number of layers, and number of attention heads. This is the real “memory black hole” in long-context scenarios.
- Redundancy and fault-tolerance headroom: buffer space needed for single-card failures, node restarts, and traffic spikes.
Take the sample model in this article: roughly 743B total parameters, a typical sparse Mixture-of-Experts (MoE) architecture that activates about 39B parameters per generated token and natively supports context lengths up to 1M. There is one easily overlooked point here: MoE’s “fewer activated parameters” only reduces compute pressure, not memory pressure. Because all expert weights must either stay resident or be quickly schedulable, memory usage is still calculated based on total parameters. Treating “39B activated” as “only 39B of memory needed” is the number one source of budget overruns.
2. The first cost threshold: being able to run is not the same as being able to serve
Estimating with a mainstream 8-bit floating-point (FP8) weight scheme, just to hold the weights and a basic runtime, you roughly need one 8-card high-memory accelerator server (with per-card memory around the 141GB level), with a whole-machine investment on the order of several million RMB. But this is only the “entry ticket,” and its capability boundary is very clear:
- It can complete single-machine inference, running and producing results;
- Context length must be heavily compressed, making it hard to support a full million-token window;
- Concurrency is limited, basically only enough for internal trials or low-frequency offline tasks.
The reason is that the memory ledger does not balance. A rough illustration (numbers are only to show the order-of-magnitude relationship, not measured on a specific configuration):
Single machine 8 × 141GB ≈ 1128GB total memory- Weights (FP8, 743B) ≈ 750GB- Runtime and framework reserve ≈ 80~120GB--------------------------------Remaining for KV Cache ≈ 250~300GB
KV Cache usage is roughly proportional to “context length × concurrency × cache bytes per token.” Under a million-token context, a single request can consume tens of GB of cache, and the remaining space only supports extremely low concurrency. This leads to a typical phenomenon: everything works fine in the demo environment, but once real traffic arrives, preemption, recomputation, and timeouts occur frequently.
3. The real budget scale: stably supporting long context and high concurrency
If the goal is to “stably provide a full 1M context service externally with usable concurrency,” engineering practice usually does not rely on a single machine, but instead adopts a two-node, multi-machine multi-card deployment, splitting weights via tensor parallelism and pipeline parallelism, and pooling the KV Cache into a larger memory space. After adding the whole machines and supporting infrastructure (high-speed interconnect network, storage, racks, and power retrofits), the budget scale jumps to more than double the previous tier, entering the range of several million to nearly ten million RMB.
The price difference here essentially buys three things:
- Memory pool capacity: determines the upper limit of the product of context length and concurrency;
- Interconnect bandwidth: under multi-machine parallelism, communication overhead directly eats into throughput gains;
- Scheduling and batching capability: determines how much effective throughput the same hardware can squeeze out.
4. Quantifying: the core means of pulling the budget back into an affordable range
In private deployment practice, weight quantization is almost a must. Common approaches each have trade-offs:
| Approach | Memory benefit | Main cost | Applicable scenario |
|---|---|---|---|
| FP8 | Halved relative to 16-bit | Higher hardware support requirements | General services pursuing stable precision |
| 4-bit weight quantization | Substantial drop in memory usage | Precision loss, needs validation on an evaluation set | Memory-constrained, can accept slight degradation |
| 4-bit weights + low-bit activations | Benefits both memory and bandwidth | High implementation complexity, narrow operator support | Pursuing high-concurrency throughput |
A repeatedly validated lesson is: most of the memory saved by quantization ultimately goes back to the KV Cache. So quantization is not “saving is earning,” but rather the key lever that pulls the budget back from “must buy a second whole machine” to “a single machine can serve medium context and medium concurrency.” In addition, decoding acceleration ideas like speculative decoding and multi-token prediction can significantly boost output speed in single-concurrency and medium-concurrency ranges, but they also impose extra demands on memory and implementation complexity, and require stress testing before deciding.
5. Underestimated hidden costs
Hardware procurement is only the on-paper expense. The full cost should also include:
- Supporting infrastructure: high-speed intranet, parallel file storage, redundant power and cooling;
- Operations manpower: driver and framework version adaptation, fault localization, capacity inspections;
- Iteration cost: re-evaluation and re-stress-testing brought by model version upgrades;
- Opportunity cost: self-built cluster launch cycles are usually measured in months, and the business window may be slowed down.
6. Decision recommendations: procure by stage, not by peak
- Do capacity modeling first: use the target context length, peak concurrency, and average output length to work backward to KV Cache needs, then back out memory and card count.
- Do small-scale validation first: get the pipeline running with compressed context and low concurrency, confirming precision and latency baselines.
- Then decide the form: internal low-frequency scenarios can start with a single machine; external services are recommended to use multiple machines + pooled cache + auto-scaling.
- Keep elastic options: if self-built investment is too high, consider cloud-based on-demand containerized inference services combined with general capabilities like object storage and log monitoring, converting fixed capital expenditure into variable operating expenditure.
The conclusion is direct: an ultra-large MoE model being open source does not mean private deployment is cheap. Several million RMB is the entry ticket, and the budget for stably serving long context and high concurrency needs to be prepared in two tiers. What really determines how much you ultimately spend is not the parameter count, but your trade-offs on context length, concurrency scale, and precision baseline.
