Local LLM Deployment Doesn't Mean Free Tokens: A Cost Breakdown
Local deployment changes the cost structure of running large language models, not the cost itself. This article breaks down the real cost per million tokens using a practical formula covering hardware depreciation, electricity, and your own time, and shows why low utilization can make self-hosted inference several times more expensive than a comparable API. It also explains which workloads genuinely benefit from local deployment, such as offline batch processing and data-residency requirements, and offers a decision checklist for choosing between local hardware and cloud APIs.
1. The Bottom Line: Local Deployment Changes the Cost Structure, Not the Cost
Many people assume that once you run a large language model locally, tokens become an unlimited, free resource after a one-time investment, and you can work without holding back. That intuition feels right, but it does not hold up when you look at the actual cost accounting.
The accurate statement is this: local deployment does not eliminate the cost of tokens. It replaces a usage-based operating expense with a one-time hardware purchase, ongoing electricity bills, and the time you invest yourself. Once the hardware is bought, the marginal cost of generating one more token is indeed close to zero, but the average cost is driven by another variable: how many hours per day the machine is actually producing at full load.
Typical personal usage looks like this: a few hours during the day, one request at a time, and the machine sitting idle the rest of the time. The denominator (the actual number of tokens produced) is small, so the effective price per million tokens is often higher than calling an API for a model in the same class.
Whether a setup can “get work done” is not something VRAM capacity alone can answer. It depends on what kind of work you need: long-context summarization, batch offline processing, low-latency interaction, and structured extraction all place very different demands on hardware and concurrency.
2. Do the Math: The Cost Formula per Million Tokens
Any local inference setup can be plugged into the same formula:
Unit cost (per million tokens) = (hardware depreciation + electricity + time cost) / actual tokens produced (millions)Actual tokens produced = throughput (tokens/s) × effective full-load seconds
This equation tells us three things:
- All three terms in the numerator are real expenses. Depreciation is usually the largest and the most easily overlooked.
- The denominator has a linear effect on the result: double the utilization and the unit price is cut in half.
- Time cost (deployment, tuning, troubleshooting, keeping up with versions) is often severely underestimated by individual users.
3. Electricity Only: How Utilization Creates a 10x+ Gap
Consider a common DIY route: a used server paired with an inference accelerator card, totaling about 256G of VRAM, with a single-stream generation speed of roughly 60 tokens/s and about 450 tokens/s combined across 16 concurrent streams. Daily whole-machine power consumption is around 11 kWh. At a residential rate of 0.55 per kWh, the daily electricity cost is about 6.
- Scenario A (light personal use): 4 hours of actual generation per day, with only one stream.
Output ≈ 60 × 3600 × 4 ≈ 860,000 tokens, or about 7 per million tokens in electricity. - Scenario B (sustained full load): 24 hours at 16 concurrent streams.
Output ≈ 450 × 86400 ≈ 39 million tokens. Power draw here is clearly higher than the daily average, so estimating electricity at 2–3x, the cost is only 0.3–0.5 per million tokens.
The same machine shows a 10–20x difference in electricity cost per million tokens, and the difference comes almost entirely from the denominator, meaning effective utilization. This is also why “my electricity is cheap” does not directly lead to “my tokens are cheap.”
4. Adding Depreciation: The Overlooked Main Cost
Depreciate hardware over 3 years, using two tiers of 20,000 and 80,000 (80,000 roughly corresponds to a high-end laptop workstation or two small inference appliances; throughput varies greatly across hardware, so the same throughput figures are used here simply to observe the effect of hardware price):
| Hardware investment | Daily depreciation | 4 hours single stream (per million tokens) | 24 hours full concurrency (per million tokens) |
|---|---|---|---|
| 20,000 | ≈18 | depreciation ≈21, total ≈28 | depreciation + electricity ≈1 |
| 80,000 | ≈73 | depreciation ≈90, total ≈97 | depreciation + electricity ≈2+ |
The conclusion is straightforward: at low utilization, depreciation pushes the unit price into the tens; at high utilization, hardware cost is diluted to the 1–2 range.
5. Align the Comparison: Matching a Flash-Class Model to a Flagship Is a Mismatch
Locally, limited by VRAM and bandwidth, you can usually only run lightweight or small-parameter models. Comparing their cost against the API of the strongest flagship model does not hold up. The cloud services corresponding to this class of open-source models are priced at roughly a few per million output tokens, while stronger models reach the teens (prices change constantly; only the order of magnitude is given here).
Once the comparison is aligned, the picture is clear: whether the hardware costs 20,000 or 80,000, under a personal pattern of “a few hours during the day, one request at a time,” the local unit price is several times that of an API in the same class. Only in near-continuous full-load batch scenarios can local possibly come out ahead.
6. Where Local Deployment Genuinely Pays Off
- Offline batch processing: Running full corpus cleaning, batch summarization, and batch labeling overnight can push utilization high.
- Data residency: Compliance requires data to stay on the internal network, ruling out public API calls.
- Experimentation and learning: Repeatedly changing inference parameters, quantization schemes, and sampling strategies.
- Stable long-tail throughput: Tasks that can be queued, are latency-insensitive, and prioritize predictable long-term cost.
Conversely, interactive Q&A, occasional calls, and tasks that need the strongest model capability are better served by cloud APIs on both cost and quality.
7. Decision Checklist and Optimization Tips
- First estimate your actual average daily full-load hours, then plug them into the formula. Do not judge “cheap” by feel.
- Include all three items: depreciation, electricity, and time. Depreciate over 3 years with a conservative residual value.
- Use continuous batching and sensible concurrency to raise utilization. This is the most sensitive lever for unit price.
- Use quantization and VRAM optimization to fit more concurrency on the same card, rather than chasing more VRAM alone.
- Adopt a hybrid strategy: route routine interaction to cloud APIs, and push peak and batch workloads down to local, using cloud container platforms, object storage, logging services, and monitoring alerts for unified scheduling and observability.
- If you go the cloud route, you can look at general inference and compute services such as those offered by Baidu AI Cloud, controlling cost with elastic scaling.
In one sentence: local deployment buys you “near-zero marginal cost” and “data control,” not “free tokens.” Calculate utilization first, then talk about freedom.
