Zero-Cost Local AI Coding: Ollama + Continue.dev Setup Guide (Mac/Windows/Linux 2026)
Don't want to push your code to the cloud, don't want to pay a monthly subscription, but still want AI to help you write code? Running an AI coding assistant locally is the only answer. But what specs do you actually need to run AI locally, how do you set it up, and is it even worth it once it's installed? This guide walks you from zero to a fully free, local AI coding environment on your own machine.
📜 Table of Contents
📖 Keep reading
Zero-Cost Local AI Coding: Ollama + Continue.dev Setup Guide
Everything below is something you can verify on your own machine. Where speed is mentioned, you measure it — I am not going to invent tok/s numbers for hardware I do not own.
Why run a coding model locally
Three honest reasons, in order of how much they actually matter to most people:
- No per-token cost. After the download, inference is free. If you code with an assistant for hours a day, this is the difference between $20-100/month and $0.
- Code never leaves the machine. Relevant if your employer forbids sending source to third parties, or if you work on anything under NDA.
- Works offline. Planes, trains, bad hotel wifi.
One thing it does not buy you: better code. A frontier cloud model still writes better code than a 7B model running on your laptop. The trade is privacy and cost against quality.
What hardware you actually need
The binding constraint is not CPU speed, it is memory. A quantised model must fit in RAM (or VRAM) or it swaps and becomes unusable.
| Model size | Q4 size on disk | Minimum realistic RAM |
|---|---|---|
| 1.5B | ~1 GB | 4 GB |
| 7B | ~4.7 GB | 8 GB |
| 14B | ~9 GB | 16 GB |
| 32B | ~19-20 GB | 32 GB |
The download size column is what ollama list prints after you pull a model. Leave headroom for your editor, browser and OS — filling RAM to 100% with a model is how people conclude "local LLMs are too slow" when the real problem was swapping.
GPU is optional. With an NVIDIA card, Ollama offloads layers automatically and generation gets several times faster. Apple Silicon uses Metal and works well from 16 GB unified memory. On CPU alone, expect short completions to feel responsive and long generations to feel slow. Which brings us to the only benchmark worth having.
Measure your own speed first
Do this before you pick a model. It takes two minutes and tells you more than any blog post.
# Ollama prints an eval rate (tokens/sec) after the run
ollama run qwen2.5-coder:7b --verbose "Write a Python function that merges two sorted lists"
Read the eval rate line at the end of the output. That number, on your hardware, is your baseline. Pull a 14B and run the same command; the ratio between the two tells you whether a bigger model is worth the latency.
Two practical notes:
- First run is always slow because the model loads into memory. Run the same prompt twice and look at the second number.
- Keep the model resident so you are not paying that load cost on every keystroke:
export OLLAMA_KEEP_ALIVE=30m # keep the model in memory for 30 minutes idle
Install Ollama
# macOS
brew install ollama
# Linux
curl -fsSL https://ollama.com/install.sh | sh
# Windows: download the installer from https://ollama.com/download
Verify it is running:
ollama --version
ollama list # empty on a fresh install
Pull a coder model
Start with 7B. It fits almost any machine and is the right size for autocomplete.
ollama pull qwen2.5-coder:7b
ollama list # confirm the download size on disk
If you have 16 GB or more free, also pull a 14B and compare with --verbose. Keep both — switching per task is the whole point of local inference being free.
Check the licence before you build anything commercial on top:
ollama show qwen2.5-coder:7b
The Qwen2.5-Coder family is Apache 2.0, which permits commercial use without a user cap. CodeLlama uses the Llama 2 licence, which carries a 700M monthly-active-user clause and naming requirements. This is a five-second check that people routinely skip until it matters.
Wire it into your editor (Continue.dev)
Continue is open source and runs in VS Code and JetBrains.
# In VS Code: install the "Continue" extension, then edit its config
Minimal config pointing everything at your local model:
{
"models": [
{
"title": "Local Coder 7B",
"provider": "ollama",
"model": "qwen2.5-coder:7b"
}
],
"tabAutocompleteModel": {
"title": "Local Autocomplete",
"provider": "ollama",
"model": "qwen2.5-coder:7b"
}
}
The tabAutocompleteModel entry is the one that matters for daily feel. Autocomplete fires on nearly every keystroke pause, so latency here dominates your experience far more than model quality. Use your smallest usable model for this field and save the bigger one for chat.
Where local models fall short
Being specific, because "it depends" is not useful:
- Cross-file refactors. A 32K context window does not hold a 15-file module. It will confidently edit two files and silently miss the other thirteen.
- Long PR reviews. Same cause — context, not intelligence.
- Unfamiliar ecosystems. A 7B model writing idiomatic Rust or Elixir tends to produce plausible-looking code that does not compile. Test before trusting.
- Anything requiring current information. The weights have a cutoff. No exceptions.
What it does well: single-function generation, adding types, writing tests for code you paste in, explaining an unfamiliar file, fixing a syntax error you point at directly.
The hybrid setup that actually works
Keep both paths configured:
- Autocomplete and small edits → local 7B. Free, private, no network round-trip.
- Multi-file work and architecture → cloud API. Worth the money precisely because these tasks are where local models fail.
- Fallback rule of thumb: if you find yourself pasting the same error three times, switch to the cloud model instead of re-prompting the local one.
The savings are real but they are not the main argument. The main argument is that autocomplete at 50ms feels like an editor feature, and autocomplete at 1.5s feels like waiting for a website. Local inference on a small model is how you get the former.
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.