Is Self-Hosting Large Language Models Worth It?

    Self-hosting open-source LLMs is technically easy, but running them long-term is a different commitment. This article explains the three cases that justify self-hosting—data compliance, offline or ultra-low-latency requirements, and large, stable token volume—breaks down the hidden ongoing costs of power, occupied VRAM, version maintenance, and on-call incident response, and provides a VRAM sizing formula plus a minimum viable operations checklist to help you decide before you deploy.

    The Bottom Line: Most People Shouldn’t Self-Host

    Downloading open-source LLM weights and running them on your own server is technically straightforward now. But “it runs” and “it’s worth running long-term” are two completely different questions. The real dividing line isn’t the installation step—it’s whether you’re willing to take on ongoing operational responsibility.

    Only three situations justify the investment:

    • Data compliance rules forbid content from leaving the internal network.
    • The use case has no reliable network, or an extremely tight latency budget.
    • Call volume is large and stable enough that the amortized unit cost is clearly lower than pay-as-you-go pricing.

    If none of these apply, calling a cloud API is the more economical choice.

    Deployment Is the Cheapest Step; the Cost Comes Later

    Downloading weights, installing an inference framework, and starting an HTTP-compatible service usually takes half a day. The real spending begins accumulating on day two:

    • Power and cooling are a continuous cash outflow.
    • VRAM stays locked up and can’t be reused for other tasks.
    • Model version updates are yours to track and regression-test.
    • Service failures are yours to diagnose—if it goes down at 3 a.m., you’re the one getting up to fix it.

    A significant portion of API pricing pays for operations and fallback capability. Self-hosting doesn’t eliminate that cost; it just moves it from your bill onto your schedule. The decision criterion becomes simple: people with a high hourly rate are not good candidates for self-hosting.

    “Token Freedom” Is an Illusion

    Self-hosting does eliminate per-token billing, but your freedom is hard-bounded by VRAM and compute. A large model after 4-bit quantization can fit on a single machine, at the cost of reduced throughput, concurrency, and usable context length simultaneously. Want a larger parameter count or longer context? The only path is adding VRAM, and adding VRAM means adding capital expenditure.

    The shift in cost structure can be understood like this:

    1. API: linear variable cost = unit price × token volume, with ops externalized
    2. Self-host: fixed cost (hardware) + ongoing cost (power / ops labor) + opportunity cost (occupied VRAM)

    The curves only cross when the fixed cost is amortized over a large enough, stable volume.

    The Three Groups That Genuinely Need Self-Hosting

    First, data cannot leave the internal network. Classified material, customer privacy, internal documents—sending them through an external endpoint is itself a violation. Here the motivation for self-hosting is compliance, not saving money, and it must be done no matter how high the cost.

    Second, it must work offline. Field environments with no network, physically isolated networks, and edge scenarios with hard latency budgets simply can’t reach a remote service. Edge and server-side are two different forms: small models in the hundreds of KB to hundreds of MB range can run on embedded boards, processing over a thousand tokens per second in the prefill stage and around twenty tokens per second in the decode stage. The absolute speed isn’t high, but offline availability alone is enough to make it the only viable solution.

    Third, usage is large enough that the bill becomes unbearable. A steady load of millions of tokens per day may bring the amortized local unit cost below the API. Note the keyword “steady”: bursty workloads let idle capacity eat up all the savings.

    Quantify Before You Start

    You can size VRAM requirements with the formula below (illustrative; actual results depend on the framework and caching strategy):

    1. Weight VRAM ≈ parameter count × bytes per parameter
    2. FP16: 2 B/param 8-bit: 1 B/param 4-bit: 0.5 B/param
    3. KV Cache ≈ 2 × layers × hidden dim × context length × batch size × bytes per element
    4. Total VRAM ≈ weight VRAM + KV Cache + runtime overhead

    For a 70B-class model, FP16 weights need about 140GB, and 4-bit quantization brings that to roughly 35GB. Add KV Cache and runtime overhead, and a single 64GB to 128GB accelerator card is a realistic starting point. A 30B-class model can run on a single 24GB to 48GB card with quantization.

    When serving, prefer inference frameworks that support continuous batching and PagedAttention-style memory paging—they typically improve throughput far more than swapping hardware.

    Minimum Viable Operations Checklist

    For a self-hosted deployment to survive long-term, you need at minimum: containerized packaging with pinned-version images; health checks and automatic restarts; structured logging and metrics collection; monitoring and alerts for VRAM, temperature, and queue wait time; version control for model weights and configuration; and an executable rollback plan. Baidu AI Cloud offers mature capabilities in container platforms, log services, and monitoring and alerting that can serve as a reference for a self-built operations stack; if compliance allows, you can also evaluate a fully managed inference service and hand operational responsibility back to the platform.

    Decision Checklist

    Consider self-hosting if any one of these holds: data must stay on the internal network; the network is unavailable or the latency budget is extremely tight; daily token volume is stable and large.

    Don’t self-host if any one of these holds: the workload fluctuates sharply; you need the newest models on day one; no one on the team is available for on-call. The last one is the most underestimated—self-hosting without operational capability often costs more overall than an API.