Compare like with like, or the decision is noise
Most self-hosting debates compare a four-bit 8B model against a frontier API and conclude that open weights are cheaper. They are cheaper, and they are also a different product. The comparison that matters is within a quality tier: an open 8B against a hosted 8B-class model, or an open 70B against a hosted 70B-class model, measured on your own evaluation set. Frontier closed models remain better at hard multi-step reasoning, unfamiliar codebases, long-horizon agentic work and low-resource languages, and no amount of quantization closes that gap.
The practical framing is task substitution. For classification, extraction, summarisation, routing, embedding and retrieval-grounded answering, an open 8B or 30B model is usually sufficient, and the decision becomes purely economic and operational. For work where a wrong answer costs more than the tokens, the frontier model is often cheaper per completed task even at ten times the price per token, because it needs fewer retries and less human review. Run the comparison per task, not per model.
The cost model, with the arithmetic exposed
The unit that matters is cost per million output tokens at realistic utilisation, and it is GPU hourly price divided by tokens per hour, adjusted for how busy the GPU actually is. An A100 80 GB at $2 per hour serving an 8B model at 2,500 tokens per second produces 9 million tokens per hour, which is $0.22 per million at full load. At 30 percent average utilisation, the same GPU costs $0.74 per million, and 30 percent is a normal number for a product with a diurnal traffic curve and no batching across tenants. A four-GPU node serving a 70B model at 700 tokens per second costs about $3.20 per million at $8 per hour.
Against those figures, hosted 8B-class APIs price around $0.05 to $0.20 per million output tokens and hosted 70B-class APIs around $0.60 to $1.20. On list prices and mid-range utilisation, the API wins for both tiers. Self-hosting wins when utilisation is high and sustained, when you own depreciated hardware, when you can commit to reserved instances at 30 to 50 percent off, or when the workload is batch and can run at 100 percent utilisation overnight. That is a narrower set of conditions than the enthusiasm suggests.
The hidden line items are what turn a close call into a clear loss. A production deployment needs redundancy, so two GPUs where one would do; capacity for peak, so the average is well below 100 percent; an engineer who understands inference serving, at $150,000 to $250,000 fully loaded per year; electricity at roughly 10 kW for an eight-GPU node, about $730 a month at $0.10 per kWh; colocation or cloud networking; and replacement of the hardware every three to four years. A $250,000 node depreciated over three years is about $6,900 a month before it serves a token, and the engineer costs more than the node.
Privacy is the reason that usually decides it
If the data cannot leave your infrastructure, the argument is over. That includes regulated health and financial records, government work, source code for some organisations, and anything covered by a contractual clause that names the jurisdictions where processing may occur. Self-hosting keeps prompts and completions inside your VPC, subject to your own logging, retention and access controls, and removes the provider from your sub-processor list. For a company selling into India under the DPDP Act, or into the EU under GDPR, that simplification can be worth more than the cost difference.
It is not automatic compliance. Self-hosting moves the obligation rather than removing it: you still need a data processing agreement with the GPU cloud, encryption at rest and in transit, access logs, retention limits and a deletion path. A self-hosted model that logs every prompt to an unsecured volume is worse than a hosted API with a signed DPA and a documented retention policy. The genuine advantage is that you can answer the question of where the data went without asking a vendor.
Control, versioning and the deprecation problem
A closed API is a dependency with a roadmap you do not control. Models get retired, prices change, rate limits tighten, and acceptable-use policies can block a legitimate use case with no appeal path. Anyone who built on a model that was deprecated with ninety days notice knows the cost of that exposure. Open weights let you pin a version indefinitely, keep serving it after the author moves on, and reproduce a result two years later. For products with regulatory audit requirements or long support lifetimes, that reproducibility is a feature in itself.
The control extends to customisation. Fine-tuning an open model on your own data, merging adapters, distilling a larger model into a smaller one, or modifying the chat template are all routine with open weights and unavailable or restricted with closed APIs. Some providers offer fine-tuning, but you are still renting the result and cannot export the weights.
Read the licence rather than the blog post. Apache 2.0 and MIT covers many Qwen, Mistral and DeepSeek releases with no meaningful restriction. The Llama community licence permits commercial use but adds an acceptable-use policy, an attribution requirement and a 700 million monthly active user threshold that triggers a separate agreement. Gemma ships under Google's own terms. Licences also attach to the model weights, not to your fine-tune in every case, so check whether the derivative is covered before you build a business on it.
Latency and geography, which are often overlooked
A closed API call from Mumbai to a US region carries 150 to 250 milliseconds of round-trip time before the model starts thinking. For a chat product that streams, that delay is tolerable; for an autocomplete, a voice agent or an interactive coding tool, it is the difference between usable and not. Hosting an open model in the same region as your application removes most of that, and self-hosting inside the same VPC removes the public internet from the path entirely.
Self-hosting also removes queueing you cannot see. A hosted API under load may add seconds of invisible queue time before the first token, and you have no lever except retrying another provider. Your own server gives you a measurable queue, a scheduler you can tune and a capacity plan you can act on. The trade is that the queue is now yours to manage, including the 3 a.m. page when it grows.
The operational bill nobody puts in the spreadsheet
- On-call for a stateful service that fails differently from a web app: CUDA errors, driver mismatches and out-of-memory kills.
- Capacity planning with cold starts measured in minutes, which rules out naive scale-to-zero.
- Model upgrades that require a full re-evaluation, because a new checkpoint changes outputs even at identical settings.
- GPU supply: lead times, generation transitions and the fact that the card you standardised on may be unavailable next quarter.
- Driver, CUDA and framework version compatibility, which consumes days whenever the stack is upgraded.
- Security patching for the serving stack and the container image, plus network isolation for a service that often has no authentication by default.
- Multi-tenant isolation, because one customer's traffic spike should not degrade another's latency.
- Evaluation infrastructure, which you need either way but which matters more when you are the one who changed the model.
Break-even, worked through
Take a product doing one million requests a month at 1,500 output tokens each, which is 1.5 billion tokens. At $0.50 per million that is $750 a month on an API. A dedicated A100 at $2 per hour is $1,460 a month before utilisation is considered, and it will not be fully utilised at that volume. The API wins by a wide margin, and the engineering time saved is a bonus.
Now scale to twenty billion tokens a month, which is a real consumer product. At $0.50 per million the API bill is $10,000 a month. Two A100s at $2 per hour cost $2,920 and can serve that volume with headroom, so self-hosting saves roughly $7,000 a month, which pays for a substantial part of an engineer. That is the shape of the decision: self-hosting is a fixed-cost business and APIs are a variable-cost business, so the crossover is a volume threshold that depends on your utilisation and your token mix. Compute your own number rather than borrowing one.
The hybrid answer most teams converge on
Route by task and by sensitivity. Send extraction, classification, summarisation, embeddings and high-volume RAG synthesis to a self-hosted model, and send hard reasoning, code review, planning and anything customer-facing and high-stakes to a frontier API. Add a cascade: try the small model first, check the answer with a validator or a confidence signal, and escalate only when it fails. Cascades routinely cut cost by half while preserving quality, because most requests are easy.
The second half of the hybrid is fallback. When the self-hosted cluster is saturated or a provider returns 429s, the other path absorbs the traffic, degraded but functional. A gateway is what makes that policy explicit and testable instead of a hard-coded conditional. The strategic point is that neither path is a religion; the routing table is the product decision, and it should be revisitable every quarter as prices and open-weight quality move.
What open weights include, and what they do not
Open weights give you the trained parameters and, usually, the inference code and tokeniser needed to run them. They do not give you the training data, the data pipeline, the recipe in enough detail to reproduce the model, or any guarantee of support. That distinction matters when you are evaluating risk: you can run the model forever, but you cannot retrain it from scratch, and you depend on the author for architecture fixes and for the tokeniser that your prompts are tuned to. It is source-available inference, not open-source development.
The ecosystem around a model is part of the package. A checkpoint with quantised builds for every runtime, a well-tested chat template, adapters published by the community and a serving engine that already supports the architecture is worth more in practice than a marginally better model that requires patching vLLM to load. Check that support before committing: the cost of adding a new architecture to a serving stack can exceed the cost of the GPUs.
Three deployment shapes and what each costs
The first shape is a single GPU under a desk or in a small cloud instance, serving an internal tool or a low-volume product. It costs $300 to $1,500 a month depending on the card and whether you own it, has no redundancy, and is operated by whoever built the feature. It is the right starting point for most teams, because it turns an abstract cost debate into a real number and surfaces the operational work early.
The second is a multi-GPU deployment behind a load balancer, with two replicas for availability and a gateway in front. Four 80 GB GPUs across two nodes at $2 per GPU-hour is roughly $5,800 a month, before storage and egress, and it buys you failover and the ability to drain one node during upgrades. This is the shape that most production self-hosting actually takes, and it is roughly four times the cost of the single-GPU version once redundancy and headroom are included.
The third is serverless GPU capacity, billed per second, with models pre-loaded or loaded on demand. It removes the idle-capacity problem for spiky traffic, at a higher per-hour rate and with cold starts that can run from thirty seconds to several minutes for a large model. It suits batch jobs, internal tools and early products where traffic is unpredictable, and it stops being economical once utilisation is high enough that a reserved instance is cheaper. Choose the shape from your traffic curve, not from a preference for owning hardware.
A decision checklist
- Does the task need frontier reasoning, or would a mid-sized open model pass your evaluation at acceptable quality?
- Is there a legal or contractual requirement that data not leave your infrastructure?
- What is your sustained token volume at peak and average, and what utilisation could you realistically keep?
- Do you have someone who can own inference serving, or would you be learning on production?
- How bad is a provider deprecation or price change for your business, and can you absorb it in a quarter?
- Is the open model's licence compatible with your commercial model and your jurisdiction?
- Can you get the GPUs you need in the region you need them, at a price that survives a three-year plan?
- Have you measured quality on your own tasks, with the same prompts and scoring, rather than on a leaderboard?
Common mistakes
- Comparing a four-bit small model with a frontier API and calling the price difference a saving.
- Ignoring utilisation and quoting the fully loaded cost per token as if the GPU were always busy.
- Forgetting redundancy, so the self-hosted path has a single point of failure that the API did not have.
- Budgeting for GPUs but not for the engineer who will operate them.
- Assuming open weights mean no vendor dependency, when you still depend on the model author, the GPU vendor and the cloud.
- Choosing a model by benchmark score instead of running your own evaluation with your own prompts.
- Skipping the licence review until after the product ships.
- Self-hosting for cost reasons at a volume where the API is still cheaper, then discovering it two quarters later.