Why run AI models locally?
Privacy, no usage bills and working offline are the big three. Here is what local models can do for coding today, and what they can't.
Running an AI model locally means downloading an open model and running it on your own computer instead of sending requests to a provider's servers. A few years ago this was a hobbyist's project. Today, free tools make it a download and a click, and small open models are genuinely useful for coding.
1. Your code stays on your computer
When you use a cloud model, your prompt and the parts of your code it needs are sent to another company's servers. That company receives them, processes them and handles them under its own terms, which decide how long they are kept and who can see them. Privacy settings can stop your code being used for training, but the company still receives it. That is fine for many projects, but not for all of them: client work under a confidentiality agreement, unreleased products, or code that simply isn't anyone else's business.
A local model processes everything on your machine. Apart from downloading the model, your code doesn't need to go anywhere. Ollama's documentation, for example, says that when you run models locally it does not see your prompts or data. (Ollama also offers optional cloud models, which run on its servers, so pick a local one when privacy matters.)
2. No usage bills, credits or limits
Cloud coding plans meter usage. Most Claude plans have usage limits that reset every few hours and every week; ChatGPT plans give Codex different amounts of usage per plan; browser-based app builders such as Lovable and Bolt sell monthly credits or tokens. A local model has none of that. Once it is downloaded, you can run it as often as you like. The only limits are your computer's speed and memory.
3. It works offline
On a plane, in a café with poor Wi-Fi or during a provider outage, a local model keeps working. You need an internet connection only to download the model in the first place.
4. You choose the model
The open model world moves fast. Families such as Qwen, Llama, Gemma, Mistral, DeepSeek and Phi each come in several sizes, and you can switch between them freely. You are not tied to one company's model or its pricing decisions.
What you need
The main requirement is memory. A model has to fit in your computer's memory with room left for its working context. Ollama's library gives a sense of scale: Qwen3 at 4 billion parameters is about a 2.5 GB download, 8B about 5 GB, 14B about 9 GB and 30B about 19 GB.
- 8 GB of memory: only the smallest models, and it will be tight. Fine for trying things out.
- 16 to 24 GB: mid-sized models (8B to 14B), noticeably more capable.
- 32 GB and up: larger models (30B and beyond), the closest local models get to cloud quality.
Apple silicon Macs are well suited to this because the processor and graphics share one pool of memory. Apple's open-source MLX framework is built for exactly that design. Our guide to local AI coding on a Mac covers the apps, the models and what each Mac can run.
Where local models fall short
Be realistic about quality. The largest cloud models from Anthropic and OpenAI are generally stronger at complex, multi-step coding work, big refactors and unfamiliar codebases. Small local models are best at clear, contained tasks. Speed depends on your hardware, and a large model on a small machine will be slow. Licences also vary: Qwen3, Mistral 7B and Gemma 4 are Apache 2.0, DeepSeek-R1 and Phi-4 are MIT, while Llama and earlier Gemma versions come with their own terms that you should read before commercial use.
The practical answer: use both
For most people the best setup is not either-or. Use a local model for everyday, private or offline work, and reach for a cloud agent such as Claude Code or Codex when a task needs the strongest model. That keeps cloud usage, and its cost, for the jobs that justify it.
Running local models in Nexus
Nexus is a native Mac app for building with AI. It has a built-in engine based on Apple's MLX, so you can download an open model inside Nexus and use it in the chat, or connect Ollama if you already use it. You can switch to Claude Code by Anthropic or the Codex app by OpenAI, with your own account, whenever you want a cloud model; that company then receives what each request needs. Nexus will be a one-time purchase of $199 USD with no Nexus subscription, runs on Apple silicon Macs with macOS 12 or later (macOS 14 or later for local models and the Codex app, 13 or later for Claude Code), and is coming soon. Connecting third-party AI services such as Claude Code or Codex is optional and at your own expense (see Nexus pricing).
Frequently asked questions
How much memory do I need to run an AI model locally?
It depends on the model. As a rough guide, small models of around 4 billion parameters are a 2 to 3 GB download and run on an 8 GB Mac, while 30-billion-parameter models are around 19 GB and need a Mac with 32 GB or more.
Do local AI models need the internet?
Only to download the model. After that, a model running through a local runner such as Ollama or Apple's MLX answers without an internet connection. (Ollama's optional cloud models are the exception: they run on Ollama's servers.)
Can I use local models for commercial projects?
Many can, but licences differ. Qwen3, Mistral 7B and Gemma 4 use Apache 2.0, DeepSeek-R1 and Phi-4 use MIT, and Llama and earlier Gemma versions have their own licence terms. Check the licence of the exact model you use.