Local LLM Guide
Running a large language model on your own hardware went from a hobbyist experiment to a mainstream practice in 2026 — searches for "local LLM" grew over 50x in a year. Open-weight models like Llama, Qwen, and Mistral are now good enough for real work, and the reasons to run them locally are compelling: privacy (your code and data never leave your machine), cost (no per-token fees at high volume), latency (no network round-trip), and offline use.
This guide covers the practical path: which tools to use (Ollama, LM Studio, vLLM), which models to download, what hardware you actually need, and when a local model is good enough versus when you should still call a cloud API.
info
| Tool | Type | Best For | Difficulty |
|---|---|---|---|
| Ollama | CLI + local API server | Most users — easiest path to running models, OpenAI-compatible API | Easiest |
| LM Studio | Desktop GUI app | Non-technical users, browsing and chatting with models visually | Easiest |
| vLLM | Python inference server | Production serving, high throughput, teams | Advanced |
| llama.cpp | C++ inference engine | Maximum control, embedded, CPU-only setups | Advanced |
| Jan | Desktop GUI app | Open-source alternative to LM Studio | Easy |
Ollama is the standard way to run local models. It handles downloading, quantization, and serving, and exposes an OpenAI-compatible API on localhost:11434 — so most tools that work with the OpenAI API work with Ollama by changing one URL.
| 1 | # Install (macOS / Linux) |
| 2 | curl -fsSL https://ollama.com/install.sh | sh |
| 3 | |
| 4 | # Pull and run a model (one command) |
| 5 | ollama run qwen2.5-coder:14b |
| 6 | |
| 7 | # Chat with it, or use the API |
| 8 | curl http://localhost:11434/api/generate -d '{ |
| 9 | "model": "qwen2.5-coder:14b", |
| 10 | "prompt": "Write a Python function to merge two sorted lists" |
| 11 | }' |
| 12 | |
| 13 | # Use it with the OpenAI SDK — just change the base URL |
| 14 | # base_url="http://localhost:11434/v1", api_key="ollama" |
pro tip
The rule of thumb: you need roughly as much VRAM (or unified memory on Apple Silicon) as the model size after quantization. A 4-bit quantized 8B model needs ~5GB; a 70B model needs ~40GB.
| Model Size | Quantized (4-bit) | Works On | Quality Tier |
|---|---|---|---|
| 3–4B | ~2–3 GB | Any modern laptop, even CPU | Basic tasks, simple chat |
| 7–9B | ~5–6 GB | 16GB MacBook, RTX 3060+ | Solid general assistant |
| 14B | ~9 GB | 24GB+ Mac, RTX 4090 | Strong coding, reasoning |
| 32B | ~20 GB | 32GB+ Mac, RTX 4090 | Near-cloud quality |
| 70B+ | ~40+ GB | 64GB+ Mac, multi-GPU, DGX Spark | Frontier-adjacent |
note
Qwen 2.5 Coder (7B / 14B / 32B)
Best local coding model — rivals cloud models for code generation, completion, and debugging.
Llama 3.1 / 3.3 (8B / 70B)
Best general-purpose open weights — strong reasoning, chat, and instruction following.
Mistral / Mixtral (7B / 8x7B)
Fast and efficient — great quality-per-GB, good for lower-end hardware.
DeepSeek Coder V2
Excellent at code understanding and repo-level tasks.
Phi-4 (14B)
Microsoft's small model — surprisingly strong reasoning for its size.
Gemma 3
Google's open weights — good multimodal options, runs well on modest hardware.
Use local when…
Privacy is required (client code, medical, legal), you're offline, volume is high enough that API costs hurt, or you're experimenting and learning.
Use cloud APIs when…
You need frontier-level quality (complex agents, hard reasoning), long context (128K+), structured output reliability, or multimodal (vision, audio) at production scale.
The hybrid pattern most teams use
Local models for autocomplete, drafting, and high-frequency calls; cloud APIs for final review, complex agents, and anything customer-facing.
best practice
Community
Get help on Slack, Discord or VIP
Stuck on a guide? Join the community and ask.