Skip to content
Back to the blog
AI Martin Pohl

Cloud AI tokens vs. local models at home: when a GPU next to your NAS pays off

What Claude, GPT and Gemini actually cost per token — and when it makes sense to buy your own hardware and run local AI right next to your Synology NAS.

This piece was first published on martinpohl.cz. This page is a copy and points at the original. Original article

Sdílet:

Two numbers have been converging faster than I expected over the last year — the per-token price of Claude/GPT/Gemini and the per-watt cost of small inference boxes you can happily park next to your Synology NAS. The question "should I keep paying OpenRouter, or buy my own box?" is no longer a hobbyist's toy; it's becoming reasonable for solid home setups and small businesses.

What cloud tokens cost today (July 2026)

Prices have moved, but the ballpark: Claude Sonnet 4.5 sits around 3 USD per million input and 15 USD per million output tokens, GPT-5 in a similar band, Gemini 2.5 Pro a bit cheaper. Free-tier and Flash/Haiku models are nearly free but not equivalent. Once you start pulling 100k+ context windows or running agents with dozens of tool calls per day, a single user's monthly bill can easily cross 100 USD — and that's the inflection point where doing break-even math against your own hardware starts to make sense.

When local AI is worth considering

  • You handle sensitive data (client email, HR, legal) you don't want leaving your LAN.
  • You have offline needs — cabin, lab, edge — without reliable connectivity.
  • You burn a lot of tokens daily (RAG over Obsidian, code assist, batch processing) and the cloud bill is growing.
  • You want to play with fine-tuning, LoRA, quantization or your own STT without rate limits.
  • You already have a NAS at home and like the idea of a small "AI shelf" next to it — Synology for storage, a second box for inference.

Hardware that makes sense in 2026

For home use next to a Synology NAS there are roughly three tiers. 1) Mac mini M4 Pro / M4 Max with 48–64 GB unified memory — quiet, efficient, runs 30–70B quantized models via MLX and Ollama. 2) A mini-PC or small tower with an RTX 4090 / 5090 (24–32 GB VRAM) — most tokens per dollar, but louder and hotter. 3) Framework Desktop or AMD Strix Halo with 128 GB unified memory — a new "AI appliance" class that handles 70B+ models without breaking the bank. All three can sit next to the NAS looking sensible and idle under 200 W.

A software stack that just works

  • Ollama or LM Studio for a fast start and an OpenAI-compatible local endpoint.
  • vLLM or llama.cpp server for production throughput and batching.
  • Open WebUI or LibreChat as a clean interface for the whole household.
  • Continue.dev / Zed as IDE integration that hits the local endpoint instead of the cloud.
  • Synology as NFS/SMB storage for models (Qwen, Llama, Mistral, DeepSeek) and the RAG index.

Break-even in numbers

A simplified example: an RTX 5090 build at ~3,800 USD, drawing ~250 W on average (0.25 USD/kWh) is roughly 45 USD/month in electricity. If you spend 150–250 USD/month on cloud tokens today, payback lands around 18–24 months — and that ignores the value of keeping data at home. A Mac mini M4 Pro is cheaper up front, idles at 10–20 W, so it pays back in under a year, at the cost of a lower ceiling on model size.

Where the cloud still wins

Frontier workloads (long-horizon reasoning, heavy tool use, image/video generation, multi-modal contexts) still beat a home rig on quality. A sensible 2026 hybrid: 70–80 % of daily volume (code, notes, RAG, email triage) runs locally, the top 20 % (deep analysis, image generation, complex agents) is routed to the cloud through a fallback layer (OpenRouter, LiteLLM). You tame the bill without giving up quality where it matters.

How to try it without committing

Start with what you already own — a Mac with 16+ GB or an older PC with an RTX 3090. Install Ollama, pull Qwen 2.5 14B or Llama 3.3 70B quantized, set up Open WebUI, mount the NAS over SMB for model storage. Watch for two weeks how many tokens you actually shift off the cloud. Only then decide whether a dedicated box is worth buying.

Local AI in 2026 isn't always cheaper. It's about moving control — of your data, latency and bills — back to you.

Wrap-up and how I can help

If you're seriously thinking about a home or small-office setup — hardware picks, quantization, RAG over your NAS, integration with Google Workspace or an internal tool — get in touch. I'm happy to help with the design, a purchase list and the first deployment.

Common questions

Which local model should I download first?

For general use, start with Qwen 2.5 14B or Llama 3.3 70B in 4-bit quantization. Qwen 14B runs smoothly even on 16 GB unified memory, Llama 70B needs 48+ GB VRAM or 64+ GB unified memory. For code, Qwen 2.5 Coder 32B is currently the strongest option.

Can I run local models directly on a Synology NAS?

Technically yes via Docker and llama.cpp CPU inference, but realistically only for small models (up to 7B) and slow responses. It's smarter to use the NAS as model storage and run inference on a second box with a GPU or Apple Silicon.

Which is better for home — a Mac mini M4 or a PC with RTX 5090?

The Mac mini M4 Pro/Max is quieter, more efficient and easier to manage — ideal for a household. A PC with RTX 5090 gives more tokens per second and better cost/perf under heavy load, but it's louder and hotter. For most people the Mac mini is the more sensible choice.

Do I have to drop Claude and GPT to go local?

No. The best pattern is hybrid: local model for everyday tasks (RAG, code, classification, transcripts), cloud for what local can't handle. Through OpenRouter or LiteLLM you can wire it up so the app doesn't even know the difference.

How do I secure remote access to a local model?

Don't expose the endpoint straight to the internet. Use Tailscale or a WireGuard VPN so you can reach your AI server from anywhere while it stays invisible to the world. Handle auth at the proxy layer (Caddy, Nginx) with an API key or mTLS.

Related guides and price pages

LLM Cost Calculator

Estimate across 11 models

GPT API cost

Per-token prices for OpenAI models

Claude API cost

Haiku, Sonnet, Opus pricing

How to calculate LLM cost

The formula, step by step

10 ways to save

Caching, routing, batch APIs

Prompt optimization

Cut tokens by 30–60%

Token window strategy

RAG, sliding window, pruning

Track real AI spend, not just estimates

Upload a CSV from Cursor, Grok Bot or OpenRouter and see daily spend in USD and CZK. The account is free and does not ask for a card.

Sdílet:

Written after hours. If this helped, support my work with a coffee ☕