Cloud-based AI assistants like GitHub Copilot or Cursor are slick, but they demand complete surrender of your codebase to remote servers. For teams bound by strict NDAs, proprietary algorithms, or developers working in air-gapped environments, shipping proprietary IP over external APIs is a dealbreaker. Continue paired with Ollama is the most practical self-hosted alternative available today. It delivers inline autocompletion, context-aware chat, and inline diff edits entirely inside VS Code, running directly on your machine's GPU or Apple Silicon.
However, 365Finds has seen far too many developers botch this setup by treating local models like cloud APIs. If you attempt to run a single monolithic 14B model for both chat and tab autocomplete on consumer hardware, VS Code will freeze, your keystrokes will lag, and you will abandon the experiment within fifteen minutes. Getting a fluid, production-ready local AI environment requires two things: adopting Continue's modern config.yaml schema and strictly separating your autocomplete model from your chat model.
The Architectural Rule: Split Your Models
Tab autocompletion and interactive chat require fundamentally different trade-offs:
- Autocomplete (Ghost Text): Latency is everything. It must generate completions within 150 to 300 milliseconds using Fill-in-the-Middle (FIM) formatting. 365Finds recommends
qwen2.5-coder:1.5b. It is lightning-fast, uses under 2 GB of VRAM, and predicts syntax additions without hitching your typing cursor. If you have 16 GB+ of dedicated VRAM,qwen2.5-coder:7bis an acceptable upgrade, but 1.5B remains the sweet spot for responsiveness. - Chat, Edit, and Refactoring: Depth of reasoning matters more than raw speed. A 2 to 4 second response delay is completely acceptable when rewriting functions or analyzing error traces. Here, 365Finds recommends
qwen2.5-coder:7b(ordeepseek-r1:8bfor exploratory thinking,qwen2.5-coder:14bif your rig has 24 GB+ VRAM). - Codebase Indexing (Embeddings): For semantic
@codebasesearch, assignnomic-embed-text.
Step 1: Prepare Ollama and Pull the Weights
Ensure Ollama is installed and active on your system. Before opening VS Code settings, download the models through your terminal:
ollama pull qwen2.5-coder:7b
ollama pull qwen2.5-coder:1.5b
ollama pull nomic-embed-text
Verify that the models exist and check the daemon:
ollama list
curl http://localhost:11434
If the terminal responds with Ollama is running, your local inference backend is active.
Step 2: Install Continue and Locate config.yaml
In VS Code, open the Extensions view (Ctrl+Shift+X or Cmd+Shift+X), search for Continue, and install the official extension (Continue.continue).
A critical trap to avoid: early versions of Continue used config.json. That format is now officially deprecated. Continue has standardized on config.yaml. If you have a legacy config.json lingering in your configuration directory, delete or rename it so Continue does not load stale definitions.
The configuration file is located at:
- Linux & macOS:
~/.continue/config.yaml - Windows:
%USERPROFILE%\.continue\config.yaml
You can also open it directly inside VS Code by clicking the gear icon at the bottom of the Continue side panel and selecting Open config.yaml.
Step 3: Write the Production Configuration
Replace the contents of config.yaml with the following configuration:
name: Local Ollama Environment
version: 0.0.1
schema: v1
models:
# Primary chat, inline edit, and code generation model
- name: Qwen2.5-Coder 7B
provider: ollama
model: qwen2.5-coder:7b
apiBase: http://localhost:11434
roles:
- chat
- edit
- apply
defaultCompletionOptions:
contextLength: 4096
# Lightweight Fill-in-the-Middle (FIM) model for inline Tab autocomplete
- name: Qwen2.5-Coder 1.5B Autocomplete
provider: ollama
model: qwen2.5-coder:1.5b
apiBase: http://localhost:11434
roles:
- autocomplete
# Semantic codebase embeddings provider
- name: Nomic Embed
provider: ollama
model: nomic-embed-text
apiBase: http://localhost:11434
roles:
- embed
Save the file. Continue watches config.yaml and reloads changes automatically without requiring a full IDE restart.
Step 4: Verification and Workflow in VS Code
Once saved, open the Continue panel in the VS Code sidebar:
- Interactive Chat & Edit: In the model selector dropdown at the bottom of the Continue chat window, verify that
Qwen2.5-Coder 7Bis selected. Highlight any block of code and pressCtrl+I(orCmd+I) to open inline editing. Type a prompt likerefactor this loop into a list comprehensionand inspect the diff. - Tab Autocomplete: Open any code file and start typing a function signature. Within moments, gray ghost text should appear ahead of your cursor. Press
Tabto accept the suggestion. - Status Bar Indicator: Check the VS Code status bar (bottom right). Ensure the Continue icon is enabled with a checkmark indicating tab autocomplete is active. Clicking the icon lets you toggle autocomplete on or off on the fly.
Troubleshooting: Four Gotchas That Trip Up Developers
Even with clean configurations, local inference introduces system-level friction. Here are the issues 365Finds encounters most often:
-
"Model requires more system memory than available" Continue defaults to a generous context window, but running a 7B or 14B model with an 8K or 16K context window can cause Ollama to spill from VRAM into regular system RAM, slashing tokens per second from 40 down to 2. If you see memory warnings or sluggish responses, explicitly cap the context window using
defaultCompletionOptions.contextLength: 2048or4096inside your model block. -
Connecting from Remote Machines or WSL2 If VS Code runs on Windows while Ollama runs inside WSL2 or on a dedicated home lab server,
http://localhost:11434will fail or get refused. On the host running Ollama, set environment variables before launching Ollama:
export OLLAMA_HOST="0.0.0.0:11434"
export OLLAMA_ORIGINS="*"
Then update your apiBase in config.yaml to point to the host machine's LAN or WSL virtual IP (for example, http://192.168.1.120:11434).
-
Autocomplete Latency Stutter If typing feels jittery, you are likely either running an autocomplete model that is too large (like a 7B model on a mid-tier GPU) or sharing the GPU while another background job runs. Drop the autocomplete model to
qwen2.5-coder:1.5b. If you still experience issues, check whether another extension (such as GitHub Copilot or built-in TypeScript IntelliSense) is fighting for tab completion focus. -
404 Model Not Found Errors Continue is literal about model tags. If your config specifies
model: qwen2.5-coder:7bbut you pulledqwen2.5-coder:latest, Ollama will return a 404. Match the string inconfig.yamlexactly to the output ofollama list.
365Finds Take
Running Continue with Ollama is not a turn-key consumer product; it is developer infrastructure. If you want magic that requires zero hardware awareness, stick with hosted cloud subscriptions. But if your priority is absolute code sovereignty, zero monthly seat licensing, and a development environment that continues working when Wi-Fi cuts out at 35,000 feet, this stack is remarkably capable. Keep your autocomplete model small, keep your chat model sensible, and let Continue handle the glue.