The Real Cost of Self-Hosting Large Language Models: From GPU Selection to Full Deployment Budget

    Self-hosting large language models is far more expensive than most teams expect. This article breaks down the full cost of deploying a 700B-class MoE model on-premises, starting from the true hard constraint—VRAM capacity rather than compute. It covers a complete VRAM breakdown (model weights, KV cache, and inference framework overhead), derives hardware requirements for three deployment scenarios, analyzes throughput and concurrency trade-offs, accounts for ongoing operational costs, and ends with a practical decision framework mapping budget ranges to what you can realistically achieve.

    1. The Starting Point of Cost Estimation: VRAM Is the Hard Constraint

    When discussing local deployment of large language models, the most critical hardware constraint is not GPU compute (FLOPS) but VRAM capacity. For large models built on Mixture-of-Experts (MoE) architectures, the picture is even more complicated: while the total parameter count is enormous, each token generation only activates a subset of the expert networks, creating an order-of-magnitude gap between “total parameters” and “active parameters.”

    Take today’s mainstream MoE architectures as an example. A model with roughly 700B total parameters may activate only about 5% of them per token. This leads to a seemingly contradictory fact: the model weights are massive, but the per-step compute requirement is relatively manageable. However, VRAM usage is not determined by the number of active parameters—it is determined by the full set of model weights. All expert parameters must remain resident in VRAM to support dynamic routing and switching.

    2. A Complete VRAM Breakdown: More Than Just Model Weights

    The VRAM footprint of a self-hosted LLM consists of three core components. Estimating any single dimension in isolation can cause your budget to deviate severely from reality.

    Part 1: Model weights themselves. For a 700B-class model, FP32 weights would occupy about 2.8TB—essentially impossible to deploy on a single machine. Switching to BF16 halves that to roughly 1.4TB, and FP8 quantization compresses it to about 700GB. FP8 is currently the most VRAM-efficient option with acceptable quality loss, which explains why quantization has become the mainstream choice for local deployment.

    Part 2: KV cache. This is the most commonly underestimated VRAM consumer. For models that natively support very long contexts (e.g., 1M tokens), KV cache overhead grows linearly with sequence length. Assuming a fixed number of bytes per token per layer, an architecture with 70+ layers and 40+ attention heads can consume hundreds of gigabytes of KV cache during long-sequence inference—potentially exceeding the model weights themselves. If you want to fully support million-token contexts, KV cache planning deserves the same attention as weight storage.

    Part 3: Inference framework and CUDA runtime overhead. This includes the CUDA context, cuBLAS handles, inference engine runtime buffers, and temporary scratch space for operators—typically 20GB to 60GB of VRAM, and it does not shrink significantly with model quantization. In multi-GPU inference, communication buffers require additional headroom.

    3. Deriving Hardware Requirements: From VRAM Demand to Server Count

    Based on the three components above, you can work backward to the total VRAM required and the server configuration needed.

    Scenario 1: Entry-level deployment (model just runs)

    Assume FP8 quantization: 700GB of model weights + roughly 100GB reserved for inference framework overhead + a small KV cache allowance, for a total VRAM requirement of about 850GB to 900GB. Mainstream enterprise-class AI accelerators today offer 80GB to 141GB of VRAM per card. At 141GB per card, you need 8 cards to reach about 1,128GB—barely meeting the minimum threshold. At 80GB per card, you need 12. This puts GPU hardware procurement alone in the range of roughly $420,000 to $560,000 (about RMB 3–4 million), and such a configuration supports only very short contexts and very low concurrency—essentially “it runs, but it’s unusable.”

    Scenario 2: Production-grade full capability (1M-token context)

    Fully supporting a 1M-token context window requires a substantial increase in KV cache headroom. A conservative estimate calls for an additional 300GB to 500GB of VRAM dedicated to caching. At that point, a single 8-GPU node is no longer sufficient; you need a two-node, 16-GPU cluster or even three nodes with 24 GPUs. High-bandwidth interconnects between nodes (such as InfiniBand or NVLink-class alternatives) become mandatory, adding roughly 40% to 60% to the per-node cost. Factoring in GPUs, high-speed networking, server chassis, storage, and cooling, the total budget lands in the range of roughly $980,000 to $1.26 million (about RMB 7–9 million).

    Scenario 3: High-concurrency production cluster

    Production environments demand not just that the model runs, but that it maintains acceptable response latency under many simultaneous users. High concurrency means a larger KV cache pool, higher memory bandwidth, and more sophisticated inference scheduling. Unless you adopt very aggressive batching strategies (such as dynamic batching and prefix caching), mainstream configurations typically need to scale beyond four nodes, pushing the budget past roughly $2.1 million (about RMB 15 million). Even then, system throughput may be limited by memory bandwidth rather than compute.

    4. The Trade-Off Between Inference Performance and Concurrency

    Many teams get excited about “low-budget options” while ignoring the hard constraints on concurrency. LLM throughput is governed by two key factors: memory bandwidth (which determines single-token generation speed) and total VRAM capacity (which determines how many requests can be processed in parallel).

    Even an 8-GPU configuration can achieve reasonable throughput at smaller context lengths (e.g., 32K tokens). But once user requests hit long-context scenarios such as document analysis or codebase comprehension at 1M tokens, the KV cache quickly fills VRAM, the inference engine starts queueing requests, and effective throughput can drop by more than an order of magnitude.

    In addition, MoE architectures face a communication bottleneck from expert parallelism in multi-GPU distributed inference. Different tokens may be routed to different experts on different GPUs, causing frequent cross-card communication. If interconnect bandwidth is insufficient, communication wait time can exceed actual compute time, and inference latency deteriorates sharply.

    5. Beyond Capital Costs: Operations and Technical Debt

    Hardware procurement is only the initial investment. The ongoing costs of self-hosting an LLM also include:

    • Power and cooling: A fully loaded 8-GPU server typically draws 6kW to 10kW. Annual electricity costs for a two-node cluster are conservatively estimated at $28,000 to $56,000 (about RMB 200,000–400,000).
    • Operations staff: Deploying, monitoring, and recovering distributed inference clusters requires dedicated personnel—an implicit cost that often exceeds hardware depreciation.
    • Framework adaptation: Open-source models ship with native weights, but adapting the inference engine, quantization strategy, and parallelism strategy to specific hardware typically takes weeks to months of engineering time—an investment that should not be overlooked.
    • Model update costs: LLMs iterate frequently. Every update may require re-running quantization calibration, benchmarks, and rollback planning.

    6. A Decision Framework: When Self-Hosting Makes Sense

    Bringing the analysis together, here is a clear decision reference:

    • Budget under ~$280,000 (RMB 2 million): Don’t attempt to self-host a full 700B-class model. Even with the hardware in hand, you’ll end up with “the model runs, the business doesn’t work.” At this stage, more pragmatic options are using an API service or choosing a model with a smaller VRAM footprint.
    • Budget around $420,000–$560,000 (RMB 3–4 million): Enough for entry-level deployment, but be clear about its limits: internal tool validation and non-real-time offline inference only, with context length capped at 32K tokens.
    • Budget around $980,000–$1.26 million (RMB 7–9 million): Covers full context capability and moderate concurrency. This is the starting point for a production-viable solution.
    • Budget over ~$2.1 million (RMB 15 million): Supports high-concurrency production environments, suitable for mission-critical business workloads with strict data privacy requirements.

    7. Conclusion: Open-Source Does Not Mean Free

    Open-source models have lowered the barrier to accessing algorithms, but not the hardware barrier. Overall, turning a 700B-class MoE model from public weights into a stable production service requires a minimum hardware investment of roughly $490,000 (about RMB 3.5 million), while a truly business-grade deployment costs more than double—over $980,000 (about RMB 7 million). At that scale, the investment is comparable to licensing premium commercial software. Open-source merely eliminates software licensing fees; the physics of compute infrastructure still dominates total cost of ownership. When planning your technology strategy, always start from a complete VRAM requirements analysis—not just the storage size of the model weights.