EN

Language

Our editions

Written for each audience, not translated word for word.

Local coding assistant in VS Code with Ollama: autocomplete and chat without sending your code out

How-toBy Lucas Matías García TorresUpdated Data checked 5 min read

Reviewed on . How we work.

Leer en español

A dark mechanical keyboard with three edge-lit glass tiles floating above it

Short answer

A local coding assistant in VS Code needs two pieces: a model running in Ollama on your computer and an extension that talks to it. Continue's documentation recommends Qwen2.5-Coder 1.5B or 7B for autocomplete; the 1.5B is a 986 MB download and, by our VRAM calculator's formula, needs about 2.2 GB of memory at the 4K context Ollama uses by default on GPUs under 24 GiB. For chat, Ollama's own extension brings local models into VS Code Chat, but Ollama asks for a context of at least 64k tokens and the model in its example is a 23 to 24 GB download. The model's requests stay on your computer unless you pick a cloud model, the Codestral API or an Ollama server on another machine. Checked on October 29, 2026; we did not install or test either extension.

Prices and limits change often: check the vendor's page before you pay. How we make money.

A local coding assistant in VS Code can complete your code without sending it anywhere, as long as the model runs in Ollama on your own computer. On October 29, 2026 we read the documentation of Continue, a VS Code extension that handles autocomplete, and of Ollama, which now has its own extension for VS Code Chat. Then we worked out how much memory each setup needs with the formula behind our VRAM calculator. We did not install or test either extension, so this guide follows their documentation and says where it leaves gaps. If Ollama is new to you, start with how to run an LLM locally.

Two jobs, two extensions

Autocomplete and chat ask very different things of a model. Autocomplete has to be fast, because it suggests the rest of a line while you type. Continue's documentation recommends two open models for it, Qwen2.5-Coder 1.5B and 7B, and advises against thinking models because they generate more slowly. It also explains why a bigger model is not better here: general models such as GPT-5 or Claude are not trained with the prompt format that completion uses, and most autocomplete models have no more than 10 billion parameters.

Chat is where you ask questions about your code or request changes. Ollama's extension adds the models you have in Ollama to the model picker of VS Code Chat. That part needs a much larger model and a long context, as the next section shows. For how local tools compare with paid ones, see our guide to the best coding assistants.

How much memory each setup needs

Table: Memory for local coding models (download sizes from Ollama's library, estimates with our VRAM calculator's formula, checked October 29, 2026)

Model Use Download Context window Estimated memory at 4K context Estimated memory at 32K context
qwen2.5-coder:1.5b Continue's local pick for autocomplete 986 MB 32K 2.2 GB 3.0 GB
qwen2.5-coder:7b Continue's larger open pick for autocomplete 4.7 GB 32K 6.0 GB 7.7 GB
qwen3.6:27b Chat 18 to 19 GB 256K not estimated not estimated
qwen3.6 (latest, the 35b) The example in Ollama's VS Code guide 23 to 24 GB 256K not estimated not estimated

Each estimate adds three things: the download size, the KV cache that holds the context and the 1 GiB margin our calculator assumes for the engine. The cache comes from each model's config.json (28 layers, 2 or 4 key-value heads and a head dimension of 128) at 16-bit precision. For Qwen3.6 we give only the download size, which on its own is more than a 16 GB graphics card holds.

Three things follow from the table:

  1. Autocomplete fits almost any machine. The 1.5B model needs about 2.2 GB at the 4K context that Ollama uses by default on GPUs with less than 24 GiB of VRAM.
  2. Chat needs a long context. Ollama's documentation says coding tools should be set to at least 64,000 tokens, and its VS Code page asks for at least 64k for local models. Qwen2.5-Coder's window is 32K, so on our reading the chat setup needs a model with a longer window, such as Qwen3.6, and a longer context also needs more memory.
  3. Check the size before you pull. ollama pull qwen3.6, the command in Ollama's guide, downloads the 35b version. If the model does not fit in your graphics card, part of it runs on the processor, which Ollama says to avoid for best performance. ollama ps shows the split, and our page on Ollama not using the GPU explains what to check.

Set up autocomplete with Continue

These steps follow Continue's pages on autocomplete and on Ollama.

  1. Install Ollama and download the model with ollama run qwen2.5-coder:1.5b. Our list of Ollama commands covers the rest of the command line.
  2. Add the model to Continue's config.yaml with the autocomplete role:
name: My Config
version: 0.0.1
schema: v1
models:
  - name: Qwen 1.5b Autocomplete Model
    provider: ollama
    model: qwen2.5-coder:1.5b
    roles:
      - autocomplete
  1. Turn on "Enable Tab Autocomplete" by clicking the Continue button in the status bar.
  2. Turn off other completion providers such as Copilot, which Continue says may interfere, and check that the VS Code setting editor.inlineSuggest.enabled is on.
  3. If Ollama runs on another machine, add apiBase: http://<host>:11434 to the model. Your code then travels to that machine.

If you only get single-line suggestions, Continue's setting for multiline completions accepts always, never or auto, and auto is the default. If Continue reports "Model requires more system memory", its page explains that Continue may ask for a longer context than other Ollama tools: lower contextLength under defaultCompletionOptions or try a smaller model.

Set up chat with Ollama's extension

Ollama's VS Code page lists three requirements: Visual Studio Code 1.127 or newer, because earlier versions do not reliably cancel requests, Ollama installed and running, and at least one model. Ollama 0.17.6 or newer is recommended for cloud sign-in, and older versions may still work with local models.

  1. Install the Ollama extension from the VS Code Marketplace.
  2. Open Chat, open the model picker below the chat input and choose a model from the Ollama section. The extension looks for Ollama at http://127.0.0.1:11434, which is your own computer.
  3. In Ollama's Settings, set the context length to at least 64k, reload the VS Code window and send your prompt again. Without the app, OLLAMA_CONTEXT_LENGTH=64000 ollama serve sets it when Ollama starts.
  4. If no Ollama models appear, check that Ollama is running, run ollama list, then run Ollama: Refresh Models and Ollama: Diagnose Models from the Command Palette.

When your code leaves your computer

With a local model, the model's requests go to Ollama on your own machine. Three choices change that:

  • Cloud models. Names ending in :cloud, such as kimi-k2.6:cloud, need ollama signin. Local models do not require sign-in, so if VS Code asks you to sign in to Ollama, check which model you picked.
  • The Codestral API. Continue calls Codestral, through Mistral's API with an API key, its recommended route to the best autocomplete. The code around your cursor then goes to Mistral.
  • A remote Ollama. An apiBase that points to another computer sends your code there.

We did not audit what else VS Code or the extensions send, such as usage data. If that matters to you, read each extension's settings before you start.

How we checked

On October 29, 2026 we read Continue's pages on autocomplete and on Ollama, Ollama's pages on VS Code and on context length, the qwen2.5-coder and qwen3.6 tag lists in Ollama's library and the config.json files of Qwen2.5-Coder 1.5B and 7B Instruct on Hugging Face. The memory figures use our VRAM calculator's formula: download size, plus the KV cache at 16-bit precision, plus a 1 GiB margin that is our assumption. We did not install either extension, did not run these models and did not measure how fast the suggestions arrive.

What we checked

  • Continue's autocomplete page lists QwenCoder2.5 1.5B and 7B as the best open models for autocomplete and Codestral and Mercury Coder as the best closed ones, noting that closed models are slightly better; it recommends Codestral, available through the Mistral API with an API key, for the best experience, and Ollama with qwen2.5-coder:1.5b, configured with the autocomplete role, for running autocomplete locally. (Continue, )
  • The same page says thinking-type models are typically not recommended for autocomplete because they generate more slowly, that thinking-switchable models can be used with thinking turned off, that models such as GPT-5 or Claude are not trained with the completion prompt format and that most state-of-the-art autocomplete models are no more than 10b parameters; its troubleshooting steps are enabling Enable Tab Autocomplete from the Continue button in the status bar, disabling other completion providers such as Copilot, checking the logs in Toggle Developer Tools and checking that editor.inlineSuggest.enabled is true; multiline completions can be set to always, never or auto, the default. (Continue, )
  • Continue's Ollama page configures a model in config.yaml with provider ollama, the model id and an optional apiBase on port 11434 for a remote instance of Ollama; capabilities such as tool_use and image_input can be set when auto-detection fails; and the error Model requires more system memory can appear because Continue may set a higher default context length than other Ollama tools, fixed by reducing contextLength or trying a smaller model variant. (Continue, )
  • Ollama's VS Code page says the Ollama extension brings Ollama models into VS Code Chat; it requires Visual Studio Code 1.127 or newer, because earlier versions do not reliably cancel requests from language model providers, Ollama installed and running and at least one model; Ollama 0.17.6 or newer is recommended for cloud model sign-in and older versions may still work with local models; models are discovered at http://127.0.0.1:11434 by default; local models do not require sign-in; for local models the context length should be set to at least 64k in Ollama's Settings before reloading the VS Code window; and the troubleshooting steps include ollama list and the Ollama: Refresh Models and Ollama: Diagnose Models commands. (Ollama, )
  • Ollama's context length page says Ollama defaults to a 4k context with under 24 GiB of VRAM, 32k with 24 to 48 GiB and 256k with 48 GiB or more; that coding tools should be set to at least 64000 tokens; that a larger context increases the memory required; that it can be set with the slider in the app's settings or with OLLAMA_CONTEXT_LENGTH when serving; and that ollama ps shows the allocated context and whether the model is offloaded to the CPU. (Ollama, )
  • Ollama's library listed qwen2.5-coder:1.5b at 986MB and qwen2.5-coder:7b, the latest tag, at 4.7GB, both with a 32K context window. (Ollama, )
  • Ollama's library listed qwen3.6:latest, the same file as qwen3.6:35b, at 23GB to 24GB and qwen3.6:27b at 18GB to 19GB, both with a 256K context window. (Ollama, )
  • The config.json of Qwen2.5-Coder-1.5B-Instruct lists 28 hidden layers, 2 key-value heads, a hidden size of 1536 with 12 attention heads, which gives a head dimension of 128, and 32768 maximum position embeddings. (Qwen (Hugging Face), )
  • The config.json of Qwen2.5-Coder-7B-Instruct lists 28 hidden layers, 4 key-value heads, a hidden size of 3584 with 28 attention heads, which gives a head dimension of 128, and 32768 maximum position embeddings. (Qwen (Hugging Face), )

What may change

  • Extension versions, recommended models and Ollama's defaults change often. The memory figures are our estimates with the formula of our VRAM calculator, not measurements. This page is reviewed every quarter.

Frequently asked questions

Can I have code autocomplete in VS Code without sending my code out?

Yes, if the model runs in Ollama on your own computer. Continue's documentation sets this up with Qwen2.5-Coder 1.5B, a 986 MB download, in the autocomplete role.

Which model should I use for autocomplete?

Continue recommends Qwen2.5-Coder 1.5B or 7B among open models. It advises against thinking models, which are slower, and says general models such as GPT-5 or Claude are not trained for completion.

How much memory does a local autocomplete model need?

By our VRAM calculator's formula, Qwen2.5-Coder 1.5B needs about 2.2 GB at a 4K context and 3.0 GB at its full 32K, and the 7B needs about 6.0 GB and 7.7 GB.

Why does Ollama say to set the context length to 64k?

Ollama's documentation says coding tools and agents should use at least 64,000 tokens, and VS Code may show a longer context than Ollama actually allocates. A longer context needs more memory.

Does Ollama's VS Code extension need an account?

Ollama's page says local models do not require sign-in. Cloud models, whose names end in :cloud, need ollama signin and do not run on your computer.

Why does autocomplete not work in Continue?

Continue's checklist: turn on Enable Tab Autocomplete from the status bar, check that the model is downloaded, disable other completion providers such as Copilot and make sure editor.inlineSuggest.enabled is on.

Sources

  1. Continue: autocomplete setup and configuration (recommended models, Ollama, troubleshooting), Continue. Accessed October 29, 2026.
  2. Continue: how to configure Ollama (config.yaml, apiBase, capabilities, context length), Continue. Accessed October 29, 2026.
  3. Ollama: VS Code (Ollama extension for VS Code Chat), Ollama. Accessed October 29, 2026.
  4. Ollama: context length (defaults by VRAM, at least 64000 tokens for coding tools), Ollama. Accessed October 29, 2026.
  5. Ollama library: qwen2.5-coder (tags and download sizes), Ollama. Accessed October 29, 2026.
  6. Ollama library: qwen3.6 (tags and download sizes), Ollama. Accessed October 29, 2026.
  7. Qwen2.5-Coder-1.5B-Instruct config.json (layers, attention heads, context), Qwen (Hugging Face). Accessed October 29, 2026.
  8. Qwen2.5-Coder-7B-Instruct config.json (layers, attention heads, context), Qwen (Hugging Face). Accessed October 29, 2026.

Spotted an error or an outdated price? Tell us and we will fix it.

Change history

  • : First published. Checked against the documentation of Continue and Ollama, Ollama's model library and the Qwen2.5-Coder configuration files on October 29, 2026. Nothing was installed or tested.

Next review: .

Part of our Coding Assistants guide.

Other topics