A Practical Cost Guide to Deploying Large Language Models On-Premises

    This guide breaks down the real cost of self-hosting a large MoE model, using a 743B-parameter sample with 39B active parameters per token and native 1M context support. It explains why open weights do not mean zero cost, how VRAM is consumed across weights, runtime overhead, KV Cache, and safety margins, and what three common budget tiers actually cover. It closes with a decision framework for choosing between on-premises hardware and cloud services.

    A Practical Cost Guide to Deploying Large Language Models On-Premises

    1. Why “Open Source” Does Not Mean “Cheap”

    When a team sees that a very large MoE model has been open-sourced, the first reaction is often “the weights are free, so the cost is zero.” In real engineering projects, however, weights are only one item in the cost structure, and usually not the item that gets underestimated most easily.

    Take the sample model in this article. Its key parameters are: roughly 743B total parameters, a Mixture-of-Experts (MoE) architecture, about 39B parameters actually activated per generated token, and native support for a 1M context length. These three numbers determine three things respectively: the lower bound on VRAM capacity, the compute throughput characteristics, and how fast the KV Cache grows.

    It is worth stressing that MoE’s “sparse activation” only reduces the compute required for a single forward pass. It does not reduce the need to keep weights resident in VRAM. All expert weights must either stay resident or be swapped in quickly; otherwise routing introduces unacceptable latency jitter. This is the first root cause of errors in many cost estimates.

    2. What Actually Consumes the VRAM

    On-premises VRAM usage can be broken into four layers:

    1. Model weights: At FP8 precision, 743B parameters theoretically need around 743GB of weight space; with BF16/FP16, this doubles to more than 1.4TB.
    2. Framework and runtime overhead: The inference engine, communication buffers, CUDA context, operator workspaces, and VRAM fragmentation typically require an extra 10% to 20% of headroom.
    3. KV Cache: Proportional to “layers × KV heads × head dimension × context length × concurrency × bytes per element,” this is the real VRAM black hole in long-context scenarios.
    4. Redundancy and fault-tolerance margin: Single-card failures, uneven expert load, and traffic spikes all require buffer.

    A quick illustrative calculation for self-checking (showing order-of-magnitude relationships only, not specific product parameters):

    1. # Weight VRAM (bytes)
    2. weight_mem = params_b * 1e9 * bytes_per_param
    3. # KV Cache per request (bytes)
    4. kv_per_req = 2 * layers * kv_heads * head_dim * ctx_len * bytes_per_elem
    5. # Total VRAM requirement
    6. total = (weight_mem + runtime_overhead) * (1 + safety_margin) \
    7. + kv_per_req * concurrency

    Scaling ctx_len from 4K to 1M amplifies the KV Cache term by 256x. This is why “being able to run” and “being able to stably support million-token context at high concurrency” are two completely different budget tiers.

    3. The Real Boundaries of Three Budget Tiers

    Tier 1: A single node with 8 high-end GPUs, around 3.5 million CNY. This tier is positioned for “validation and low-concurrency pilots.” It can load FP8 weights and run inference, but under long context plus multiple concurrent requests it quickly hits the VRAM ceiling. Stability usually comes from limiting the maximum context, reducing concurrency, or enabling chunking/offloading mechanisms, at the cost of higher latency.

    Tier 2: Two nodes with 16 GPUs, around 7.3 million to 8 million CNY. The goal is to stably support the full 1M context. Two nodes mean high-speed inter-node interconnect must be introduced, making the network a new bottleneck and a new failure point. Tuning parallel strategies (tensor parallelism + pipeline parallelism + expert parallelism) becomes significantly more complex.

    Tier 3: Hidden costs that are easy to overlook. These include data center and power upgrades, cooling, spare parts and warranties, the labor for model quantization and distillation, load-testing and tuning cycles, monitoring/alerting and logging systems, and at least one or two engineers capable of diagnosing distributed inference failures. Over a three-year period, this portion often accounts for 30% to 50% of the hardware investment.

    4. Decision Framework: Build On-Premises or Use the Cloud

    Four questions are recommended for making the call:

    • Is the workload stable over the long term? For businesses with obvious tidal patterns, the static capacity of an on-premises deployment will have very low utilization.
    • Must data stay within a defined boundary? Only strong compliance requirements genuinely justify self-hosting.
    • Does the team have distributed inference operations capability? Without it, failure recovery time will far exceed expectations.
    • Do you need to iterate multiple model versions in parallel? The switching cost of elastic resource pools is far lower than that of a self-built cluster.

    In most scenarios, a more pragmatic path is hybrid: route core sensitive data to a small on-premises model or a dedicated private zone, and hand elastic peaks and long-context heavy tasks to general cloud capabilities such as container platforms, object storage, and monitoring/alerting, paying by usage and avoiding a one-time sink of heavy assets.

    5. Conclusion

    For a 743B-class MoE model like this one, 3.5 million CNY is only the entry ticket. What truly determines success or failure is a complete accounting of KV Cache, interconnect bandwidth, and operations labor. Calculate the two variables of concurrency and context length first, then decide whether to buy hardware or buy a service. That is the rational engineering decision.