How to run AI locally
By The AI Loadout editors · How we pick
The easiest way to run AI locally is Ollama: install it, then run one command such as ollama run gemma4:e4b. Gemma 4 E4B (about 7 GB) is the best starting model for a 16 GB laptop. With 24 to 32 GB, step up to Gemma 4 26B or Qwen 3.5 27B. Prefer a desktop app? LM Studio does the same with a model browser and a built-in chat.
| Slot | Pick |
|---|---|
| Tool | Ollama |
| Model | Gemma 4 E4B |
| Skill | Agent Project Manager |
| Persona | The Local Assistant |
Free, no signup needed.
Full local list in one table: best local models for Ollama and LM Studio.
The loadout (why each pick)
Tool: Ollama
Ollama installs on Mac, Windows and Linux, pulls a model with one command and serves a local API on port 11434 that most coding agents can use. Its library lists download sizes and context windows for every tag.
Model: Gemma 4 E4B
Gemma 4 is Apache 2.0, takes image input on every size and ships in sizes from E2B to 31B, so you can move up without changing tools. E4B is a 6.6 GB download at Q4 with a 128K context window, which fits a 16 GB laptop.
Agent skills
- Agent Project Manager: Routes easy tasks to your local model and only sends hard ones to a paid cloud model, so local AI saves real money.
Bot persona: The Local Assistant
Small local models do better with short, explicit instructions.
Comparison table
| Option | Best for | Model(s) | Price | Free plan | Last checked |
|---|---|---|---|---|---|
| Gemma 4 (E4B to 31B) | Best all-rounder at every size | Google, Apache 2.0 | Free, 6.6 GB (E4B Q4) | Yes | |
| Qwen 3.5 (0.8B to 122B) | Coding and many languages, widest size range | Alibaba, Apache 2.0 | Free, 6.6 GB (9B Q4) | Yes | |
| Qwen 3.8 27B | Newest Qwen for agentic work on 32 GB | Alibaba, Apache 2.0 | Free, 18 GB (Q4) | Yes | |
| gpt-oss 20B | Reasoning on a 16 GB GPU or Mac | OpenAI, Apache 2.0 | Free, 14 GB | Yes | |
| Muse Glimmer 30B | Always-on local agents with tools | Meta, Apache 2.0 | Free, 18 GB (Q4) | Yes | |
| Nemotron 3.5 Bolt E4B | Fast local voice assistants and tool calls on 16 GB, Mac or PC | NVIDIA, OpenMDW 1.1 | Free, 7.2 to 7.9 GB | Yes | |
| Nemotron 3.5 Bolt 74B-A9B | Local agents on one 24 GB NVIDIA GPU (no Apple Silicon yet) | NVIDIA, OpenMDW 1.1 | Free, 25 GB (2-bit) | Yes | |
| LFM2.5 24B-A2B | Fast local agents: about 2B of its 24B parameters run per token | Liquid AI, LFM Open License v1.0 | Free, 15 GB (Q4) | Yes | |
| Devstral Small 2 24B | Local coding agent, 384K context | Mistral, Apache 2.0 | Free, 15 GB (Q4) | Yes | |
| Mistral Small 3.2 24B | General assistant with vision | Mistral, Apache 2.0 | Free, 15 GB (Q4) | Yes | |
| Ministral 3 (3B to 14B) | Low-memory laptops | Mistral, Apache 2.0 | Free, 3.0 GB (3B Q4) | Yes | |
| Bonsai 2 (2B to 27B) | Smallest files with vision and tools, for 8 GB laptops | PrismML, Apache 2.0 | Free, 3.2 GB (9B) | Yes | |
| LFM3-1.7B | Tiny tool-calling agents and 256K context on almost any machine; not for coding (Ollama 0.40.13+ on Mac, Linux and Windows) | Liquid AI, LFM Open License v1.0 | Free, 1.1 GB (Q4_K_M GGUF) | Yes | |
| NVIDIA Dory 1.0 4B | Tinkerers: adjustable thinking (1 to 4 loops) in a 4B model; needs llama.cpp or vLLM built from source | NVIDIA, OpenMDW 1.1 | Free, 3.7 GB (Q5_K_M GGUF) | Yes | |
| d3 decision models (2B to 27B) | Routing, yes/no checks and scoring with probabilities, not chat | vLLM Semantic Router, Apache 2.0 | Free, 5.6 GB (4B) | Yes | |
| DeepSeek-R1 8B | Step-by-step reasoning and math | DeepSeek, MIT | Free, 5.2 GB (Q4) | Yes | |
| Nanbeige4.3-33B | Agentic coding and office tasks on a 24 GB GPU or 32 GB Mac; llama.cpp or LM Studio, not Ollama | Nanbeige LLM Lab, Apache 2.0 | Free, 20.8 GB (Q4_K_M GGUF) | Yes | |
| Recursive Flint 40B | Local coding agents with 48 GB of memory (Mac, Linux or Windows) | Recursive, Apache 2.0 | Free, 23 GB | Yes | |
| Llama 3.3 70B | Proven general model for 48 GB and up | Meta, Llama 3.3 Community License | Free, 43 GB (Q4) | Yes | |
| Carbon-X 14B | Questions about DNA sequences, kept on your own machine | Hugging Face, Apache 2.0 | Free, 15.8 GB (Q8_0 GGUF) | Yes | |
| Nemotron 3.5 Super VL 120B | Document, chart and PDF agents on big workstations | NVIDIA, OpenMDW 1.1 | Free, 80 to 90 GB | Yes |
Prices come from the linked vendor or source page and can change. Check the vendor before you buy.
Copy this setup
Paste this persona into your tool's custom instructions or project instructions:
You are a concise local assistant. Answer in plain language. If a task needs facts you may not know or data newer than your training, say so instead of guessing. Keep answers under 200 words unless asked for more. No em dashes.- Check your memory: the model download size plus 2 to 4 GB should fit in your RAM (Mac) or GPU VRAM (PC).
- Install Ollama from ollama.com, or LM Studio from lmstudio.ai if you prefer a desktop app.
- Run ollama run gemma4:e4b, or search Gemma 4 in LM Studio and click download.
- Point your tools at the local API: http://localhost:11434 for Ollama, or start LM Studio with lms server start and use http://localhost:1234/v1.
- Try a bigger model only if the small one is too weak for your task.
Alternatives by situation
- 8 GB laptop: Ministral 3 3B (3.0 GB), Gemma 4 E2B (4.6 GB) or Bonsai 2 9B (3.2 GB), which fits a 9B model with vision and tool calling into a small file by using ternary weights. Expect simple chat and summaries, not hard coding. For a small agent that calls tools, LFM3-1.7B (Liquid AI, Oct 27, 2026) is about 1 GB at 4-bit with a 256K context: ollama run lfm3, which works on Linux and Windows as well as Macs since Ollama 0.40.13 (Oct 28, 2026), or llama-cli -hf LiquidAI/LFM3-1.7B-GGUF:Q4_K_M with an LFM3-compatible llama.cpp build.
- 16 GB: Gemma 4 E4B, Qwen 3.5 9B or DeepSeek-R1 8B. gpt-oss 20B fits if little else is open. For a voice assistant or a small agent that calls tools, try Nemotron 3.5 Bolt E4B (Oct 23, 2026): NVIDIA tuned Gemma 4 E4B for conversation and tool use, and it runs on Apple Silicon too. ollama run nemotron-3.5-bolt:e4b (7.2 to 7.9 GB).
- 24 to 32 GB: Gemma 4 26B, Qwen 3.5 27B, Qwen 3.8 27B, Devstral Small 2 or Muse Glimmer 30B. On a 24 GB NVIDIA GPU, also try Nemotron 3.5 Bolt (released Oct 15, 2026), which NVIDIA built to fit 24 GB. It does not run on Apple Silicon yet. For speed, LFM2.5 24B-A2B (15 GB) runs only about 2B parameters per token. For agent work, Nanbeige4.3-33B (Oct 24, 2026) is a 20.8 GB Q4_K_M download; its makers report it ahead of Qwen3.8-27B on most agent benchmarks but slightly behind on SWE-Bench Pro. It is not in the Ollama library, so use llama.cpp b11845 or newer (llama-server -hf bartowski/Nanbeige_Nanbeige4.3-33B-GGUF:Q4_K_M) or the same GGUF in LM Studio.
- 48 GB and up: Llama 3.3 70B or Qwen 3.5 122B (81 GB). gpt-oss 120B needs about 65 GB plus context. Nemotron 3.5 Super VL is an 80 to 90 GB download in Ollama, and LM Studio lists 70 GB minimum memory.
- Yes/no and routing: Decision models answer typed questions (pick a label, yes or no, a score) with probabilities instead of writing text. Ollama serves them at /v1/systemone, or from the terminal with ollama run <model> --ask. Perplexity Decider v1.2 is now in the Ollama library as pplx-decider (17 GB). Liquid AI d1 (3.7 GB) and d1-omni (850 MB, which also takes a short voice clip) are the small options, and Ollama 0.40.12 (Oct 27, 2026) added d1:2b, built on LFM3, with a 125K context (Apple hardware only for now): ollama run d1:2b "I was charged twice for order 4417." --ask "Is this a billing issue?" Ollama 0.40.9 (Oct 21, 2026) added d3 from vLLM Semantic Router in 2B, 4B, 9B and 27B sizes; the 4B default is 5.6 GB and the 9B and 27B also take images.
- Read replies aloud: Ollama can also speak (Phonon needs 0.40.9 or later; speech was announced in v0.40.11 on Oct 23, 2026). ollama run phonon "Hello" plays Gradium Phonon text-to-speech as it generates, on Apple Silicon only. Apps can stream the same audio from the OpenAI compatible endpoint http://localhost:11434/v1/audio/speech (WAV or raw PCM, up to 4,096 characters per request). The default 31M English voice is Apache 2.0; the 40M French, German, Spanish, Portuguese and multilingual voices are CC BY-NC 4.0, so noncommercial use only.
- DNA and genomics: Carbon-X (Hugging Face, Oct 22, 2026) reads raw DNA pasted into a chat and answers in English, so sensitive sequences never leave your machine. The Q8_0 GGUF is 15.8 GB, so a 24 GB GPU or a Mac with 32 GB is comfortable. It is not in Ollama or LM Studio: use llama.cpp b11742 or newer (older builds get the DNA tokens wrong) with llama-server -hf HuggingFaceBio/Carbon-X-GGUF:Q8_0 --jinja and thinking turned off. Hugging Face says it is not clinically validated.
- Claude Code or Codex through Ollama: Update to Ollama v0.40.14 (Nov 2, 2026) if you start agents with ollama launch. ollama launch claude now applies the model's own output token limit, so cloud models no longer hit the 128K default cap, and ollama launch codex checks that ChatGPT routing works before it configures anything. The OpenAI-compatible endpoints also stop overriding a model's packaged temperature and top_p when your client sends none, so local models answer with the settings their makers chose.
- Local agent adapters: Hugging Face published harness adapters on Nov 6, 2026: small LoRA adapters trained with reinforcement learning inside pi, OpenCode and Hermes, with safeagents inspecting tool calls before they run. The post says the adapters use fewer tool calls while keeping or improving accuracy in smoke tests, and includes TwIL-8B as a model that was not trained as an agent. It is research code and results, so treat the reported gains as early evidence.
- Local or cloud: the money: Local costs nothing per token, but it is not free if you buy hardware for it. A cloud agent task of 200K tokens in and 20K out costs about $0.45 on Gemini 4 Hydrogen and $0.90 on Gemini 4 Neon at list price. At ten of those a day that is roughly $135 to $270 a month, which is when a 32 GB machine running Qwen 3.8 27B starts to pay off. At one or two a day, keep the cloud model for hard tasks and run local for private or bulk work.
- Your first hour: Install Ollama, run ollama run gemma4:e4b, and give it a real task from your week, not a test prompt. Then run ollama ps to see how much memory it uses. If it shows part of the model on CPU, it did not fit in GPU memory and will be slow: pick a smaller tag or shorter context. Only then try a bigger model.
- Coding agents: Both Ollama and LM Studio expose an OpenAI compatible API on localhost, so agents and editors that accept a custom base URL can use a local model. Devstral Small 2 is built for this. With 48 GB, Recursive Flint (added to Ollama Oct 21, 2026, 23 GB) is a newer option, and since Ollama 0.40.9 it runs on Linux and Windows as well as macOS: ollama launch claude --model flint runs Claude Code on it.
What changed
- : Added a local versus cloud cost comparison, a first-hour checklist and a fit rule. Rechecked tier picks against vendor download sizes. Default pick unchanged.
- : Added a note on Hugging Face harness adapters, LoRA adapters trained inside local agent harnesses with safeagents tool-call checks. Default pick unchanged.
- : Added a note on Ollama v0.40.14: ollama launch claude respects model output limits, ollama launch codex checks ChatGPT routing, and the OpenAI-compatible API keeps model sampler defaults. Default pick unchanged.
- : Ollama 0.40.13 runs the LFM3 models on Linux and Windows, not just Macs. Updated the 8 GB note and the comparison table. Default pick unchanged.
- : Added LFM3-1.7B (Liquid AI, released Oct 27, 2026) to the comparison table and the 8 GB picks, and the d1:2b decision model from Ollama v0.40.12 to the routing note. Default pick unchanged.
- : Added Nanbeige4.3-33B (Nanbeige LLM Lab, released Oct 24, 2026, Apache 2.0) to the comparison table and the 24 to 32 GB picks. Default pick unchanged.
- : Added Carbon-X 14B (Hugging Face, released Oct 22, 2026, Apache 2.0) to the comparison table and a DNA and genomics note. Default pick unchanged.
- : Added Nemotron 3.5 Bolt E4B (NVIDIA, released Oct 23, 2026, in Ollama v0.40.10) to the comparison table and the 16 GB picks, and the Ollama /v1/audio/speech endpoint (v0.40.11) to the read-aloud note. Default pick unchanged.
- : Ollama 0.40.9: added the d3 decision models to the table, a note on Phonon text-to-speech, and Flint now runs on Linux and Windows. Default pick unchanged.
- : Added Recursive Flint 40B (Apache 2.0, in Ollama v0.40.8 on Oct 21, 2026) to the comparison table and the coding agents note. Default pick unchanged.
FAQ
Is running AI locally free?
Yes. Ollama, LM Studio and the models listed here cost nothing to download and use. You pay only for your hardware and electricity.
What is the best local model right now?
For most people, Gemma 4: E4B on a 16 GB laptop and 26B A4B on a 32 GB machine, rechecked Nov 24, 2026. Qwen 3.5 and Qwen 3.8 are the main alternatives, especially for coding.
How much RAM do I need?
Roughly the model download size plus 2 to 4 GB. A 7 GB model wants about 10 GB free; on a Mac that is shared memory, on a PC it should be GPU VRAM for good speed.
Ollama or LM Studio?
Ollama if you live in the terminal or want an API for agents. LM Studio if you want a desktop app with a model browser. Both serve an OpenAI compatible API, so tools work with either.
Are local models as good as ChatGPT or Claude?
Not for the hardest tasks. The best cloud models still lead on complex coding and reasoning. Local models are strong for private data, offline work, summaries and routine edits.
What is NVIDIA Dory and can I run it?
Dory 1.0 4B is a looped model NVIDIA released on Oct 16, 2026: the same file can run its shared layers one to four times per token, trading speed for accuracy. NVIDIA reports SWE-bench Verified rising from 50.3 at one loop to 61.8 at four. It is not in Ollama or LM Studio yet. The model card shows how to build llama.cpp from the Dory pull request and run the 3.7 GB Q5_K_M GGUF.
Can I run Meta's Muse Spark Open locally?
Only on very large hardware. Meta's model card says it needs at least 700 GB of GPU memory (NVFP4), or two Mac Studios with M5 Ultra using MLX. Ollama offers it as a cloud model instead (muse-spark-open:cloud).
Sources
- Ollama library: Gemma 4
- Ollama library: Qwen 3.5
- Ollama library: gpt-oss
- LM Studio: Gemma 4
- LM Studio docs: OpenAI compatibility endpoints
- Ollama docs: API
- NVIDIA: Nemotron 3.5 Super VL and Bolt (Oct 15, 2026)
- Ollama library: Nemotron 3.5 Bolt
- LM Studio: Nemotron 3.5 Bolt 74B-A9B
- Ollama library: Nemotron 3.5 Super
- Hugging Face: Muse Spark Open model card
- Ollama library: Bonsai 2
- PrismML: Ternary Bonsai 2 2B, 4B and 9B (Oct 15, 2026)
- Hugging Face: NVIDIA Dory 1.0 4B model card (Oct 16, 2026)
- Liquid AI: LFM2.5-24B-A2B (Oct 13, 2026)
- Ollama library: LFM2.5
- Ollama library: pplx-decider
- Ollama v0.40.8 release notes: Recursive Flint (Oct 21, 2026)
- Ollama library: Flint
- Ollama library: d1-omni
- Hugging Face: Carbon-X model card (Oct 22, 2026)
- Hugging Face: Carbon-X GGUF
- Hugging Face: Harness adapters (Nov 6, 2026)
- Ollama v0.40.9 release notes: d3, Phonon, Flint on Linux and Windows (Oct 21, 2026)
- Ollama library: d3
- Ollama library: Phonon
- Ollama v0.40.10 release notes: Nemotron 3.5 Bolt E4B (Oct 23, 2026)
- NVIDIA: Nemotron 3.5 Bolt E4B 4GB (Oct 23, 2026)
- LM Studio: Nemotron 3.5 Bolt E4B
- Ollama v0.40.11 release notes: speech and d3
- Hugging Face: Nanbeige4.3-33B model card (Oct 24, 2026)
- Hugging Face: Nanbeige4.3-33B GGUF (bartowski)
- Ollama docs: Speech
- Liquid AI: Introducing LFM3 (Oct 27, 2026)
- Hugging Face: LFM3-1.7B GGUF
- Ollama v0.40.12 release notes: LFM3 and d1 2B (Oct 27, 2026)
- Ollama library: LFM3
- Ollama v0.40.13 release notes: LFM3 on Linux and Windows (Oct 28, 2026)
- Ollama v0.40.14 release notes (Nov 2, 2026)
Disclosure: links marked "affiliate" may earn us a commission, and sponsored slots are always labeled. Neither affects our picks. Read our methodology.
Guides that go deeper
How-to guides for this setup
Related setups
Related skills and personas
Agent skills and bot personas that pair well with running AI models locally on your own computer.
GraphQL Schema & Query Optimization Skill
Solve N+1 query problems with DataLoader, design federated schemas, and add query complexity caps.
stack-diagram
Describe your stack in one sentence and get an architecture diagram with the official logos.
WCAG 2.2 AA Accessibility & ARIA Audit Skill
Comprehensive keyboard navigation, ARIA attributes, contrast ratios, and screen-reader tests.
NVIDIA SkillSpector
Free scanner that checks an agent skill or MCP server for prompt injection, data theft, risky code and supply-chain problems before you install it.
The Red-Team Security Auditor
Assume breach, probe attack vectors, verify input sanitization and zero-trust.
The Translation QA Lead
Keeps meaning, terminology and edge cases visible while scoring a translation before it ships.