How to Calculate the Cost of Local LLM Deployment
A practical breakdown of local LLM deployment costs, covering VRAM, compute, context length, and hidden operational expenses, with a three-tier budget model for a 743B MoE model.
1. Define the Problem First: What Are You Actually Buying?
When evaluating on-premise LLM deployment, many teams start by asking, “How much does one GPU cost?” This is a misleading question. The real budget is determined by a system specification shaped by four variables: model architecture, context length, concurrency targets, and availability requirements.
Take the sample model in this article as an example. It uses a Mixture-of-Experts (MoE) architecture with roughly 743B total parameters, but only about 39B parameters are activated per generated token, and it natively supports a 1M context. These three numbers map to three completely different cost categories:
- Total parameters determine the VRAM floor—the space required to hold all weights.
- Activated parameters determine compute consumption—the multiply-accumulate workload per token.
- Context length determines the KV Cache size—the dynamic increase in VRAM usage.
Conflating these three is the main reason budgets spiral out of control.
2. The VRAM Bill: Weights Are Only the First Layer
Local deployment consumes VRAM across at least four layers:
- Model weights;
- The inference framework and runtime (including operator libraries, communication libraries, and the memory pool);
- KV Cache;
- Fragmentation and reserved buffers.
A common mistake is estimating GPU count as “parameter count ÷ VRAM per GPU.” At FP8 precision, for example, 743B parameters require roughly 743GB for weights alone. It looks like a single 8-GPU high-VRAM node should be enough, but runtime overhead and KV Cache quickly eat into the remaining headroom.
A rough formula for KV Cache is as follows (illustrative, not measured on a specific product):
KV_bytes ≈ 2 × layers × kv_heads × head_dim × ctx_len × batch × bytes_per_elem
Here, 2 represents the two caches for K and V, ctx_len is the context length, and batch is the number of concurrent sequences. Increasing the context from 4K to 1M enlarges the cache by roughly 250x. Add concurrency on top of that, and VRAM demand grows linearly or even faster.
The conclusion is straightforward: “Running” an FP8 version on a single 8-GPU high-VRAM node and “stably serving high concurrency with a 1M context” are two entirely different engineering goals.
3. The Compute Bill: MoE’s Cheapness Is Conditional
The advantage of MoE is that each token activates only about 39B parameters, so the theoretical compute cost is far lower than that of a dense model with the same total parameter count. But this advantage depends on two preconditions:
- Expert parallelism and routing communication must be efficient enough;
- Batch sizes must be large enough to amortize weight reads.
In low-concurrency, short-context offline batch scenarios, MoE offers strong cost efficiency. In high-concurrency, long-context online serving, however, the bottleneck shifts from compute to VRAM bandwidth and KV Cache movement. MoE’s “cheap compute” gets offset by communication and caching overhead. This is why “small activated parameters” does not directly translate to “small hardware budget.”
4. Break the Budget into Three Tiers: Entry, Stable, and Production-Ready
Based on the structure above, costs can be understood in three tiers:
- Entry tier (about RMB 3.5 million): A single 8-GPU high-VRAM node that can load FP8 weights and support functional validation and low-concurrency demos. It proves the system “runs,” not that it “holds up.”
- Stable tier (about RMB 7.3–8 million): Prepared as a dual-node setup, fully supporting a 1M context at FP8 with headroom for high concurrency. Dual nodes mean more than doubled VRAM—they also provide cross-node communication bandwidth for tensor/expert parallelism, fault-domain isolation, and room for rolling upgrades.
- Production-ready tier (added on top of the stable tier): High availability, monitoring and alerting, logging services, object storage, a container platform, image and model version management, and canary and rollback mechanisms. This part is often overlooked but determines whether the service can stay online long-term.
5. Four Categories of Hidden Costs That Are Easy to Miss
- Networking costs: Insufficient cross-node interconnect bandwidth degrades a dual-node setup into “two half-nodes,” which is especially sensitive in long-context scenarios.
- Storage costs: A 1M context means larger request bodies and more complex session state, so object storage and logging services grow in capacity quickly.
- Operations costs: Aligning driver, runtime, and operator library versions, plus model hot updates and rollbacks, requires dedicated staff or a mature platform.
- Power and data center costs: High-VRAM machines draw significant power, and power supply and cooling in the data center are hard constraints—often more rigid than hardware depreciation.
6. An Estimation Checklist for Decision-Makers
Before requesting quotes, fill in the table below. Budget deviations usually converge to an acceptable range:
Target context length: ____ tokensPeak concurrent sequences: ____First-token latency target: ____ msPer-token generation latency target: ____ ms/tokenAvailability target: ____ (is single-node failure acceptable?)Precision plan: FP8 / lower-bit quantization / mixed precisionCross-node parallelism required: yes / no
7. Conclusion: Open Source Does Not Mean Low Cost
Open-sourcing a model lowers the barrier to acquisition, not the barrier to serving. True on-premise deployment turns a 743B-parameter MoE model with a 1M context into a sustainable, operable, and scalable online service. RMB 3.5 million is the entry ticket, RMB 7.3–8 million is the starting point for stable operation, and a complete cost model must always include five ledgers: VRAM, compute, networking, storage, and operations. In practice on platforms such as Baidu AI Cloud, deploying this kind of long-context large model follows the same logic: calculate the system specification first, then discuss the hardware list.
