You can get a capable AI coding assistant — a free, local GitHub Copilot alternative — without a subscription, and without sending your code to the cloud, by running an open Qwen coding model locally and connecting it to your editor. This guide shows how to do it in VS Code with Continue or Cline, explains what works (and what doesn’t) in Cursor, and helps you pick a model your hardware can handle in 2026.
Which Qwen Model Should You Use?
| Model | Size | Approx. memory at 4-bit | Best for |
|---|---|---|---|
| Qwen2.5-Coder 1.5B / 7B | Dense | ~1–5GB | Fast tab autocomplete (fill-in-the-middle) |
| Qwen3-Coder-30B-A3B-Instruct | 30.5B MoE (~3.3B active) | ~18–20GB | Chat, edits and agentic coding. Fast for its size because few parameters are active. |
| Qwen3.8-27B (Aug 2026) | 27.8B dense | ~17GB | Strong general and coding model if you have 24GB+ of fast memory |
All three are released under the Apache 2.0 licence. A good setup pairs a small model for autocomplete with a larger model for chat and edits. Check what fits your machine with the VRAM Calculator, or see the Local LLM Directory.
Step 1: Install Ollama and Download the Models
- Install Ollama from ollama.com.
- Pull a chat model and an autocomplete model, for example:
ollama pull qwen3-coder:30bollama pull qwen2.5-coder:1.5b - Increase the context window. Coding tools send large amounts of code, so raise Ollama’s context length, for example by setting the
OLLAMA_CONTEXT_LENGTHenvironment variable to 32768 before starting Ollama. That uses more memory, so check your headroom first.
You can use LM Studio instead of Ollama. It also serves an OpenAI-compatible API locally; the trade-offs either way are set out in Ollama vs LM Studio.
Step 2 (VS Code): Continue for Chat and Autocomplete
Continue is an open-source VS Code and JetBrains extension that works with local models. After installing it, add your models to its config.yaml:
name: Local Assistant
version: 1.0.0
schema: v1
models:
- name: Qwen3 Coder 30B
provider: ollama
model: qwen3-coder:30b
roles: [chat, edit, apply]
- name: Qwen2.5 Coder 1.5B
provider: ollama
model: qwen2.5-coder:1.5b
roles: [autocomplete]
Save the file and Continue will use your local models for chat, inline edits and tab completion.
Step 2 (alternative): Cline for Agentic Coding
Cline is an open-source coding agent for VS Code that can read your project, edit files and run commands, asking for approval at each step. In Cline’s settings, choose Ollama as the API provider, keep the base URL as http://localhost:11434, and select your model. Agents send long prompts, so give the model a large context window and prefer a capable model such as Qwen3-Coder-30B-A3B.
What About Cursor?
Cursor can talk to any OpenAI-compatible endpoint through its Override OpenAI Base URL setting, but there are two important limitations:
- Cursor’s servers make the requests, not your computer, so
localhostwon’t work. You need to expose your local server through a public HTTPS tunnel (for example ngrok). Think about security before exposing an endpoint. - Tab autocomplete can’t use local models. It uses Cursor’s own model. Local models work for chat and edits.
If your goal is fully private, local coding, VS Code with Continue or Cline is the cleaner option. Before settling on a tool, it is worth checking which AI pair programming tools are still maintained — the most widely recommended terminal option has not shipped a release since August 2025.
What Speed to Expect
Using tokens/sec ≈ bandwidth × 0.6–0.75 ÷ active weights in GB, an MoE model like Qwen3-Coder-30B-A3B (~2GB of active weights per token at 4-bit) can generate text quickly even on unified-memory machines. Estimates run from roughly 50–60 tok/s on a Mac mini M6 to well over 100 tok/s on high-bandwidth GPUs, as long as the whole model fits in fast memory. A dense 27B model is several times slower on the same hardware. Long prompts also add “prompt processing” time before the first token appears. These are estimates, not measurements.
Hardware Recommendations
- 16GB: Qwen2.5-Coder 7B for chat plus 1.5B for autocomplete.
- 24–32GB: Qwen3-Coder-30B-A3B at 4-bit, the sweet spot for local coding.
- 48GB+: Qwen3-Coder-30B-A3B at higher precision or with longer context, or Qwen3.8-27B.
See our budget GPU guide and best Mac for local LLMs. To see whether local beats paying for an API, try the API Pricing Break-Even Calculator.
FAQ
What is the best free GitHub Copilot alternative?
If you want it private and free, a local model in your editor: Continue or Cline in VS Code, backed by Ollama. Which model is best for coding depends on your memory. A small Qwen2.5-Coder model handles fast tab autocomplete on almost any GPU, and Qwen3-Coder-30B-A3B is the stronger choice for chat, edits and agentic work if you have around 24GB of fast memory. See the model table above for sizes.
What is the best local LLM for coding?
The largest coding model that fits your memory with room left for context. That room matters because a coding assistant reads a lot of code into its context window. Use the VRAM calculator to check a model at the context length you need before downloading it. For a side-by-side of the current options, see our guide to the best local LLMs for coding, which compares them by size, licence and job.
Is a local model as good as GitHub Copilot or Claude?
Top cloud models are still stronger on hard tasks. Local 27–35B models are very capable for everyday coding and keep your code private.
Why does my local assistant forget earlier code?
The context window is probably too small. Increase it in Ollama or LM Studio, if you have the memory to spare.
Sources
Qwen3-Coder-30B-A3B model card, Qwen3.8-27B model card, Ollama: Cline integration, Cursor forum: local models.
Updated September 11, 2026: updated to current Qwen coding models and editor setups, with benchmark claims replaced by clearly labelled estimates.
Work out what your hardware can actually run
Free calculators and directories, sized from real model weights — before you download gigabytes or order a card:

