Self-Hosting LLMs Doesn't Mean Token Freedom
Self-hosting an LLM is often treated as a shortcut to token freedom, but it only removes metered billing rather than automatically delivering capability freedom or operational ease. This article explains why local inference is a shift in cost structure instead of a free alternative to cloud APIs, covering hardware depreciation, power and cooling, VRAM limits, KV Cache growth, quantization trade-offs, production metrics such as throughput and time to first token, and the ongoing operational burden. It also outlines which workloads genuinely benefit from local deployment and offers a four-step framework for comparing total local costs against pay-as-you-go cloud usage.
Introduction: The Oversimplified “Local Deployment = Token Freedom”
“The model runs locally, so token freedom is solved and we can work without limits.” This claim is only partly true, and it skips the most expensive prerequisites and trade-offs. A more accurate statement is that self-hosting can remove per-token bills, but it does not automatically deliver capability freedom or freedom from maintenance.
Local inference is not a free replacement for a cloud API. It is a shift in cost structure: upfront investment, ongoing operations, and engineering complexity are traded for data sovereignty, deterministic results, and cost advantages in specific scenarios. Understanding this is the first step toward a sound technology decision.
1. The Cost Doesn’t Disappear; It Changes Form and Timing
Cloud API spending is linear and can be stopped at any time. Self-hosting spending is upfront, largely sunk, and mostly unrelated to whether the system is actually doing useful work.
- Hardware depreciation: accelerators depreciate on an annual schedule, even when idle overnight.
- Power and cooling: a single card can draw hundreds of watts to over a kilowatt at full load, and data center cooling adds more.
- Facilities and networking: racks, power upgrades, cooling retrofits, and internal bandwidth are all hidden thresholds.
- Staff: model adaptation, inference framework tuning, monitoring, and troubleshooting require continuous investment.
A practical way to judge the economics is effective utilization. If daily request volume fluctuates sharply and peaks are short, a local cluster sits idle most of the time, and the cost per effective request may end up higher than a pay-as-you-go cloud option.
2. The VRAM Threshold: Fitting the Model Is Only the Start
Take a model in the 70-billion-parameter class. At 16-bit precision, the weights alone require roughly 140 GB of VRAM. Even compressed to 4-bit quantization, with weights down to about 40 GB, it takes two consumer accelerators with 24 GB of VRAM each to barely fit. That is only the threshold for starting the model, not for usable throughput.
If the goal is capability close to a top-tier closed-source model, the threshold jumps by another order of magnitude. Models at the trillion-parameter scale typically require dozens of data-center-class accelerators working together, with accelerator procurement alone reaching the tens of millions of yuan, not counting facilities, liquid cooling, and power upgrades. The tutorials circulating online that claim a consumer GPU can run a model in minutes usually run heavily compressed versions, with noticeably lower output quality and stability.
A VRAM budget cannot count weights alone. It must also reserve:
Total VRAM ≈ weights + KV Cache + framework and operator overhead + safety marginKV Cache ≈ layers × 2 × sequence length × hidden dimension × concurrency × bytes per precision
KV Cache grows linearly with context length and concurrency, making it the part most likely to exhaust VRAM in long-text scenarios.
3. Quantization Is Not a Free Lunch: The Triangle of Precision, Throughput, and Stability
Quantization significantly reduces VRAM and bandwidth pressure, but the gains come at a cost:
- Capability loss: low-bit quantization is more prone to format errors and logic drift on long-chain reasoning, code generation, and structured output.
- Non-linear returns: lower weight-read bandwidth improves throughput, but once the bottleneck shifts to compute or KV Cache, further precision reduction yields diminishing returns.
- Ecosystem friction: different precision formats vary in operator support, hardware generation compatibility, and inference framework support, raising troubleshooting costs.
Before going live, build a small evaluation set and run reproducible before-and-after comparisons of quantization rather than judging that results are “about the same” by subjective impression.
4. The Metrics That Matter in Production: Throughput, Time to First Token, and Concurrency
Whether a local deployment can do real work depends on service-level metrics, not on whether it starts:
- Time to first token: affects interactive feel and depends on queuing and prefill length.
- Output rate per user: determines waiting time for long answers.
- Concurrency capacity: determined jointly by VRAM and batching strategy; overload leads to rejected requests.
- Availability: single points of failure, VRAM leaks, and long-context jitter can cause intermittent failures.
An illustrative capacity estimation:
# Illustrates the calculation logic only, not specific product parametersdef capacity(gpu_mem_gb, weight_gb, kv_per_req_gb, safety=0.85):usable = gpu_mem_gb * safety - weight_gbreturn max(0, int(usable // kv_per_req_gb))print(capacity(48, 40, 0.6)) # Outputs the order of magnitude of concurrent requests
In engineering practice, dynamic batching, request queuing, and timeout degradation are usually needed to avoid a collapse when peaks arrive.
5. The Underrated Operational Burden: From “It Runs” to “It Stays Up”
There is a full operational system between running a demo once and staying stable for months:
- Monitoring and alerting: VRAM usage, batch queue length, error rate, and latency percentiles.
- Logging and tracing: determining whether an issue is abnormal model output, a configuration problem, or a resource bottleneck.
- Version management: the compatibility matrix of model weights, inference frameworks, drivers, and hardware generations.
- Elasticity and disaster recovery: degradation paths and traffic switching when a single card fails.
- Security and compliance: access control, auditing, data masking, and retention policies.
Cloud platforms typically provide these as managed services. Once localized, the team must build them itself, and the hidden staffing cost is often severely underestimated.
6. When Local Deployment Makes Sense
Self-hosting is not necessarily uneconomical; it simply applies to a narrower set of conditions:
- Data cannot leave the domain: compliance or privacy rules keep data inside the internal network.
- Stable, high-frequency, and predictable: long-term steady request volume, high utilization, and hardware costs spread thin.
- High demand for determinism: fixed versions, fixed parameters, and reproducible output are required.
- Controllable latency: direct internal-network connections avoid public-network jitter.
- Long-term and large-scale: marginal cost advantages appear only when usage is large enough.
Conversely, sparse requests, sharp peaks, varied tasks, and teams without operational experience are usually more economical with pay-as-you-go cloud calls.
7. A Decision Framework: Four Steps to Run the Numbers
- Define constraints: whether data can leave the domain, context length, peak concurrency, and latency targets.
- Estimate resources: derive VRAM and card count from weights + KV Cache + margin, then convert to power and facilities.
- Evaluate quality: compare precision and scale options using real business samples.
- Count total cost: hardware depreciation + power and cooling + operations staff + opportunity cost, compared on the same basis as pay-as-you-go fees.
A simplified comparison:
Total local cost/month ≈ hardware depreciation + power + cooling + staff + facility allocationTotal cloud cost/month ≈ price per request × monthly requests + transfer and storage fees
Local deployment holds up only when the left side stays reliably below the right side over a foreseeable period and quality and compliance requirements are met.
Conclusion
“Local deployment delivers token freedom” conflates billing freedom with capability freedom. The former can hold under specific conditions; the latter requires hardware, algorithms, engineering, and operations to work together. The rational approach is not an either-or choice but layering by scenario: sensitive data and stable high-frequency workloads run locally, while elastic and long-tail demand goes to the cloud. In practice on cloud platforms such as Baidu AI Cloud, a common combination is managed inference plus object storage plus logging plus monitoring and alerting, using managed capabilities to reduce operational burden and pushing sensitive paths down to local infrastructure as compliance requires, balancing cost, capability, and peace of mind.
