In this categoryLocal AI · 24
- How to Install Ollama on macOSStart
- How to Install Ollama on Windows
- How to Run Llama 3 Locally with Ollama
- How to Pick the Right Local AI Model for Your Hardware
- Best GGUF Models to Run by VRAM Tier (8GB, 12GB, 16GB, 24GB, 48GB)
- Run LLMs in Your Browser With WebGPU: No Install, No Server (WebLLM)
- How to Use Ollama as a Drop-In OpenAI API
- GGUF vs MLX vs NVFP4: Local AI Quantization Formats Explained
Replace GitHub Copilot With a Local Coding Model (Qwen2.5-Coder + Continue.dev)
Drop the $10–19/month subscription and run your own coding assistant inside VS Code. This is the exact setup: Ollama plus Qwen2.5-Coder for chat and tab-autocomplete through the free Continue.dev extension, with honest notes on what you give up.
GitHub Copilot and Cursor are excellent, and they also cost $10–19 a month, send your code to a server, and stop working on a plane. If any of those bother you, you can build a close replacement that runs entirely on your own machine for $0: Ollama serving a Qwen2.5-Coder model, wired into VS Code through the free, open-source Continue.dev extension. You get inline chat and tab-autocomplete that look and feel like Copilot, with your code never leaving the laptop. This guide is the full setup, plus an honest section on where local still loses.
Why go local
- Cost: $0 forever instead of $10/month (Copilot) or $20/month (Cursor Pro). The model and the extension are both free and open source.
- Privacy: your code, prompts, and completions stay on your machine. Nothing is sent to a vendor, which matters for proprietary or client work under NDA.
- Offline: it keeps working on a plane, in a tunnel, or behind a locked-down corporate network with no outbound access.
- Control: you choose the model, the context size, and how warm it stays. No silent model swaps or rate limits.
Step 1 — Hardware check
Pick the model size your memory can hold. The model has to fit in VRAM (discrete GPU) or unified memory (Apple Silicon) to run fast; otherwise it spills to CPU and autocomplete gets sluggish.
| Model size | Memory it wants | Realistic hardware |
|---|---|---|
| Qwen2.5-Coder 7B | ~8 GB | RTX 4060 Ti / RTX 5070, or a 16 GB Apple Silicon Mac |
| Qwen2.5-Coder 14B | ~12–16 GB | RTX 4060 Ti 16 GB, RTX 5070 Ti, or a 24 GB+ unified-memory Mac |
| Qwen2.5-Coder 32B | 24 GB+ | RTX 5090 (32 GB), or a 32 GB+ unified-memory Mac |
Step 2 — Pick your model
Qwen2.5-Coder is the practical default. It is Apache 2.0 (so commercial use is fine), it was trained specifically for code, and it ships in 7B, 14B, and 32B sizes — plus it supports fill-in-the-middle (FIM), which is exactly what tab-autocomplete needs. If you would rather run a single generalist for both chat and code, Gemma 4 12B (Apache 2.0) is a solid fallback, though a dedicated coder model autocompletes better.
Step 3 — Install Ollama and pull the model
Ollama is the free runner that downloads and serves the model on a local OpenAI-compatible endpoint at localhost:11434. On macOS or Windows, grab the installer from ollama.com. On Linux, one command installs it. Then pull a coder model and verify it runs:
Step 4 — Install the Continue.dev extension
Continue is the open-source VS Code extension that gives you the Copilot-style sidebar chat and inline autocomplete, but lets you point it at any backend — including your local Ollama. In VS Code, open the Extensions panel (Cmd/Ctrl+Shift+X), search for "Continue", and install the one published by Continue.dev. A new Continue icon appears in the left activity bar.
Step 5 — Point Continue at your local model
Continue is configured with a YAML file at ~/.continue/config.yaml (open it from the gear icon in the Continue sidebar). Define a chat model and a separate autocomplete model, both using the ollama provider so nothing leaves your machine:
name: Local assistant
version: 1.0.0
models:
- name: Qwen2.5-Coder 7B (chat)
provider: ollama
model: qwen2.5-coder:7b
roles:
- chat
- edit
- apply
- name: Qwen2.5-Coder 1.5B (autocomplete)
provider: ollama
model: qwen2.5-coder:1.5b
roles:
- autocompleteSave the file. The chat model now answers in the Continue sidebar, and the autocomplete model drives the gray inline suggestions. Because Qwen2.5-Coder supports fill-in-the-middle, Continue knows how to feed it the code before and after your cursor, which is what makes the completions land in the right place instead of dumping a whole function at the end of the line.
Step 6 — Use codebase context with @-mentions
Copilot Chat's edge is that it knows your repo. Continue does the same through @-mentions: type @file to pull a specific file into the prompt, @code to reference a symbol, or @codebase to let it search the whole project and answer with repo-aware context. Highlight a block, hit Cmd/Ctrl+L to send it to chat, and ask for a refactor — the model sees exactly the code you mean instead of guessing.
Step 7 — Tune for speed
- Keep the model warm: set OLLAMA_KEEP_ALIVE so the model stays loaded in memory between requests instead of cold-starting on every completion. `export OLLAMA_KEEP_ALIVE=30m` before launching Ollama keeps it resident for half an hour.
- Right-size the context window: a smaller context (for example 8K instead of 32K) means less to process per keystroke, so autocomplete fires faster. Bump it up only for chat, where you actually need the repo context.
- Low temperature for code: keep the chat model deterministic (temperature around 0–0.2) so it stops inventing API calls that do not exist.
- Smaller = snappier autocomplete: if completions lag, drop the autocomplete model to the 1.5B coder. The intelligence gap barely shows on single-line completions but the latency difference is obvious.
Reality check: when to size up
On a fast GPU, local autocomplete is comparable to Copilot's; on CPU or a starved card it lags noticeably, and that lag is the main thing that makes people quit. If the 7B feels dumb on harder chat questions — weak refactors, shaky reasoning across files — that is the signal to move up to Qwen2.5-Coder 14B (if you have ~12–16 GB) or 32B (24 GB+). The jump from 7B to 14B is the one most people feel. Beyond that you are mostly buying marginal quality at a real speed cost.
Other editors, same backend
The Ollama server is editor-agnostic, so the same local model powers other IDEs. Continue ships a JetBrains plugin (IntelliJ, PyCharm, WebStorm, GoLand) that uses the identical config.yaml. For Neovim, plugins like codecompanion.nvim or avante.nvim point at the same localhost:11434 endpoint. Set the model up once; reuse it everywhere.
The bottom line — and the one hardware upgrade that helps
For autocomplete and single-file chat, a local Qwen2.5-Coder through Continue is a real, free replacement for Copilot, with privacy and offline use thrown in. The single thing that most improves the experience is enough VRAM to run the 14B model comfortably while keeping it warm. If you are buying a GPU for this, a current-gen card with 16 GB or more (an RTX 5070 Ti, or an RTX 5090 with 32 GB if you want to reach the 32B coder) is the sweet spot that turns local coding from a tolerable experiment into something you actually leave on all day.
Local models run better with more VRAM. CompareRTX GPUs on Amazonbefore you upgrade.(affiliate link. We may earn a commission at no extra cost. Disclosure)
Related guides
How to Pick the Right Local AI Model for Your Hardware
Match your GPU VRAM tier to concrete model recommendations, understand Q4/Q5/Q8 quantization, and use a simple rule of thumb to avoid out-of-memory crashes before you download.
Best GGUF Models to Run by VRAM Tier (8GB, 12GB, 16GB, 24GB, 48GB)
A current, no-nonsense map of which local models actually fit your GPU. Pick a VRAM tier, get the right GGUF model and the exact ollama pull command, plus the quant and context math that decides whether it loads or crashes.
Watch related tutorials
9:42
10:30
11:05
9:50
13:30
16:45Weekly local AI drops
New models, what runs on your hardware, and the guides to set them up. One email a week, unsubscribe any time.