Local LLMs get pitched as "free" inference once you've bought the hardware. That's technically true and practically misleading. There's electricity, amortized hardware cost, ops time, and the not-insignificant quality gap between a 7B model running on your RTX 3090 and GPT-4o. Let's do the actual math.

The Hardware Baseline

For local inference, the GPU is everything. The rule of thumb: you need ~2GB of VRAM per billion parameters for FP16 models, ~1GB per billion for 4-bit quantized models.

GPU VRAM Models that fit (4-bit) Price (used, mid-2026)
RTX 3090 24GB Up to ~24B params ~$700
RTX 4090 24GB Up to ~24B params ~$1,600
RTX 3090 x2 (NVLink) 48GB Up to ~48B params ~$1,500
Mac Studio M2 Ultra 192GB unified Up to ~130B params ~$4,000
A100 80GB (cloud rent) 80GB Up to ~65B params ~$2–3/hr

For the "is local cheaper?" question, the RTX 3090 at $700 used is the reference case. It runs Llama 3.1 8B at full quality and Llama 3.1 70B in 4-bit quantization with acceptable degradation.

The Cost Math

Cloud baseline: Claude Haiku 3.5

Assume a moderate workload: 500K tokens/day (300K input, 200K output). At Claude Haiku 3.5 pricing:

At GPT-4o pricing (same volume): - Input: 300K × $2.50/M = $0.75/day - Output: 200K × $10.00/M = $2.00/day - Total: $2.75/day = $1,004/year

Local baseline: RTX 3090 + Llama 3.1 8B

Hardware: $700 amortized over 3 years = $0.64/day Electricity: RTX 3090 draws ~350W under load. 12h active inference/day = 4.2 kWh. At $0.15/kWh = $0.63/day Total local cost: $1.27/day

Break-even vs. Haiku: you need to be spending more than $1.27/day on cloud to save money going local. At Haiku's rate of $1.04/day at 500K tokens, you're close — local starts winning at roughly 650K tokens/day against Haiku.

Against GPT-4o at $2.75/day for the same volume, local wins at around 230K tokens/day.

The break-even is highly sensitive to which cloud model you're comparing against. Local beats expensive frontier models quickly. Local barely beats cheap models like Gemini Flash or GPT-4o-mini even at high volume.

Scaling Up: High Volume Operations

At 5M tokens/day (a medium-traffic production system):

Option Daily cost Annual cost
GPT-4o API $27.50 $10,038
Claude Haiku API $10.40 $3,796
Gemini 2.5 Flash API $0.94 $343
RTX 3090 local (Llama 8B) $1.27 $464
2× RTX 3090 local (Llama 70B) $2.10 $767

At this scale, local Llama 8B is near-equivalent cost to Gemini Flash. The 70B model costs more than Flash but delivers materially better quality for complex tasks.

The Quality Gap

This is where honest assessments get uncomfortable. Llama 3.1 8B running locally is not GPT-4o. On MMLU benchmarks, 8B models score roughly 65–70%. GPT-4o scores 88%+. That's a 20+ point gap on standardized tasks, which translates to real quality differences on:

Llama 3.1 70B in 4-bit quantization closes much of that gap — scoring 78–82% on MMLU — and handles most production tasks acceptably. But "acceptably" needs to be validated with your actual workload, not assumed.

Tasks where 7–8B models perform near-frontier quality: - Short summarization - Classification with clear categories - Template filling - Simple extraction - FAQ-style Q&A with retrieval

Tasks where you'll notice the gap: - Complex code generation - Nuanced content moderation - Long document analysis - Anything requiring recent knowledge (local models are frozen at training cutoff)

The Tooling Stack

Ollama is the easiest entry point. One-command setup, model downloads from a registry, OpenAI-compatible API on localhost:11434.

# Install Ollama, then:
ollama pull llama3.1:8b
ollama pull llama3.1:70b

# It's now an OpenAI-compatible API:
curl http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama3.1:8b",
    "messages": [{"role": "user", "content": "Summarize this: ..."}]
  }'

llama.cpp gives more control — quantization options, CPU offloading, and performance tuning. Useful if you're trying to squeeze a 70B model onto limited VRAM.

vLLM is for production deployments. Continuous batching, paged KV cache attention, and 2–4x higher throughput than naive inference. If you're running local inference for a team or product, vLLM is the right choice.

Decision Matrix

Situation Recommendation
< 200K tokens/day Cloud API. Local hardware doesn't pay off.
200K–1M tokens/day Hybrid: local for simple tasks, cloud for complex.
> 1M tokens/day with acceptable quality from 8B Local (vLLM + Llama 3.1 8B or Qwen 2.5 7B).
> 1M tokens/day requiring frontier quality Cloud with optimization (caching, routing).
Data privacy / no-egress requirement Local regardless of cost.
Team < 5 people Cloud subscription. Ops overhead isn't worth it.

The Operational Overhead Nobody Talks About

Local inference requires someone to manage it. Model updates, hardware failures, VRAM OOM errors, version compatibility, driver updates — these aren't dramatic, but they take time. A solo developer spending 2 hours/month maintaining a local inference server is burning $100–300 in opportunity cost.

For teams with dedicated ML infrastructure, local inference is worth building. For a small team where "AI" is one feature among many, the operational overhead often exceeds the cost savings until you're at significant scale.