★ Reading this for free? Get 25 structured AI courses + per-chapter AI tutor — the first chapter of every course free, no card.Start free in 30 secondsOr own it all: Lifetime $149, pay once
Performance Comparison

Best Local AI Models for Coding 2026: Ranked by VRAM Tier

September 25, 2025
16 min read
Local AI Master

Want to go deeper than this article?

Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.

📚AI Learning Path

Picked your coding model? Build a real AI dev workflow. From local copilots to agents that ship code — the structured path, running on your hardware. First chapter free.

Start free
Or own it for life — Lifetime $149, pay once

Published on November 6, 2025 • Updated September 19, 2026 • 16 min read

The short answer

The best local AI for coding depends on your GPU memory, so pick by tier. On an 8GB card run Qwen 2.5 Coder 7B (qwen2.5-coder:7b, 4.7GB). On 12GB run Qwen 2.5 Coder 14B (qwen2.5-coder:14b, 9.0GB). On 16GB run Devstral Small 2 24B (devstral-small-2:24b, 15GB), the strongest coding-agent model that fits. On 24GB run Qwen 2.5 Coder 32B (qwen2.5-coder:32b, 20GB), or Qwen3-Coder 30B (qwen3-coder:30b, 19GB) when you want a 256K context for repo-scale agent work. All of them are free, run offline through Ollama, and never send your code anywhere.

Every model below is verified against the Ollama library as of September 2026: the tag exists, and the download size quoted is the one Ollama lists for the default Q4 build. Sizes and context windows come from the library pages; benchmark figures, where quoted, are the model vendors' own published numbers, not ours. We do not run a benchmark rig, so you will find no tokens-per-second claims here, only the physics that bounds them.

Launch checklist

  • • Install Ollama, then pull the model for your tier: qwen2.5-coder:7b, qwen2.5-coder:14b, devstral-small-2:24b or qwen2.5-coder:32b. Browse the full family on ollama.com/library/qwen2.5-coder.
  • • Wire Continue.dev (autocomplete and chat) or Cline (autonomous agent) to Ollama.
  • • Set the context window on purpose. Ollama defaults to a small context; agents need 32K or more, and context is what spills a tight fit into system RAM.
  • • Keep a 3B coder resident for inline completions and let the big model handle chat and refactors.

Quick start: a local coding assistant in five minutes

To set up a local AI coding assistant:

  1. Install Ollama: curl -fsSL https://ollama.com/install.sh | sh
  2. Pull the model for your GPU, for example the 12GB pick: ollama pull qwen2.5-coder:14b (9.0GB download)
  3. Try it: ollama run qwen2.5-coder:14b "Write a Python unit test for a function that parses ISO dates"

That is a working, free, offline coding assistant. The rest of this guide is about choosing the right model for your hardware and wiring it into your editor.


Reading articles is good. Building is better.

Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.

Best local AI for coding: the short list by VRAM

The strongest local coding models you can run in 2026 are Qwen 2.5 Coder (7B, 14B and 32B), Qwen3-Coder 30B, Devstral Small 2 24B, gpt-oss:20b, Codestral 22B and DeepSeek-Coder-V2 Lite. Which one is best for you is almost entirely a question of how much GPU memory you have, because a model that spills out of VRAM into system RAM slows down by an order of magnitude.

If you are running these through Ollama specifically, our best Ollama model for coding page gives the verdict and the pull command for each VRAM tier.

Top pick per tier:

Your GPUBest local coding modelOllama tagDownloadContext
8GB (RTX 4060, RTX 3070)Qwen 2.5 Coder 7Bqwen2.5-coder:7b4.7GB32K
12GB (RTX 3060 12GB, RTX 4070)Qwen 2.5 Coder 14Bqwen2.5-coder:14b9.0GB32K
16GB (RTX 4080, RTX 5080)Devstral Small 2 24Bdevstral-small-2:24b15GB384K
24GB (RTX 3090, RTX 4090)Qwen 2.5 Coder 32Bqwen2.5-coder:32b20GB32K
24GB, agentic workQwen3-Coder 30B A3Bqwen3-coder:30b19GB256K

Recommendation: start with the model for your tier, connect it to Continue.dev, and only move up a tier if you find yourself waiting on multi-file refactors. If your projects are mostly agentic (tool calling, repo-wide edits, running tests in a loop) read the next section first.


Newest local coding models for agentic work

The biggest change since this guide first published is the wave of agent-trained coding models: Qwen3-Coder, Devstral Small 2 and gpt-oss. The CodeLlama and WizardCoder generation is still on the Ollama library and still fine for single-file completion, but none of those models has been updated in two years, and none was trained for the read-edit-test loop that tools like Cline and OpenHands run. To get autocomplete and chat from the newer models inside VS Code, wire them up with the Continue extension; our Continue.dev + Ollama setup guide has a working config.yaml.

ModelParamsContextBest atDownload (Ollama)License
Qwen3-Coder 30B (A3B)30B total, about 3B active (MoE)256K nativeRepo-scale and agentic coding, fast for its size19GB (qwen3-coder:30b)Apache 2.0
Devstral Small 2 (24B)24B dense384K listed on OllamaCoding agents (Cline, OpenHands), multi-file edits15GB (devstral-small-2:24b)Apache 2.0
gpt-oss:20b21B total, about 3.6B active (MoE)128KFast general model with tool use and reasoning14GB (gpt-oss:20b)Apache 2.0
DeepSeek-Coder-V2 Lite 16B16B total, about 2.4B active (MoE)160KFast multi-language completion on 12GB cards8.9GB (deepseek-coder-v2:16b)DeepSeek License
Qwen 2.5 Coder 32B32B dense32KHighest code quality in a single dense open model20GB (qwen2.5-coder:32b)Apache 2.0

A note on the agentic scores: Devstral Small 2 is the model Mistral built for software-engineering agents, and Mistral reports 68.0% on SWE-bench Verified for it, a much harder test than HumanEval because the model has to navigate a real repository and make a passing patch. Treat every vendor figure as version-dependent and check the model card before you quote it. For a deeper teardown of every current option ranked side by side, see our dedicated local AI coding models ranking.

Which should you pull? With 24GB, start with Qwen 2.5 Coder 32B for everyday coding and add Qwen3-Coder 30B when you wire up an agent like Cline running on Ollama and need the long context. With 16GB, Devstral Small 2 is the agentic pick and Qwen 2.5 Coder 14B the context-heavy pick. On 12GB, Qwen 2.5 Coder 14B or DeepSeek-Coder-V2 Lite. We break down exactly which of the 14B-class models wins at code quality in our best 14B coding models comparison. These are code-specialised models; for the prose half of the job (release notes, README copy, design docs) a general model reads better, and our best local AI models for writing ranking covers those separately.


Developer cost note: GitHub Copilot starts at $120/year per developer, and since June 2026 heavy agentic usage bills on top of the subscription. A local model trades that recurring spend for hardware you may already own, with no per-token meter and no code leaving your machine.

What this guide covers:

  • The 10 current local coding models, with the exact Ollama tag and download size for each
  • Which model fits 8GB, 12GB, 16GB and 24GB cards, and what spills over
  • How to compare models on your own machine instead of trusting anyone's leaderboard
  • VS Code and terminal setup, plus two-model configurations for autocomplete and chat

Table of contents

  1. How to test a local coding model on your own machine
  2. All 10 local coding models ranked
  3. Top 5 local coding models reviewed
  4. Best local AI for coding by language
  5. Best local AI for coding on 8 GB, 12 GB, 16 GB and 24 GB
  6. Published benchmark numbers, vendor-reported
  7. Setup: Ollama plus VS Code in five minutes
  8. Local AI vs GitHub Copilot: what it costs
  9. Two-model setups for different workflows

How to test a local coding model on your own machine

We do not publish our own benchmark scores, because a score measured on one rig, one quantization and one Ollama version tells you very little about your machine. What we can give you is the method, so a 20-minute session answers the question for your hardware.

Two public test sets

The standard academic sets are OpenAI's HumanEval (164 Python functions with hidden unit tests) and Google's MBPP (Mostly Basic Python Problems). Vendors quote pass rates on these, and both are easy to run locally against an Ollama endpoint. They test single-function generation only, so they say nothing about repo navigation or tool use.

What to score yourself

Pull two candidate models for your tier and run the same eight prompts through each, drawn from your own codebase:

  1. Completion: finish a half-written function in your primary language
  2. Bug fixing: paste a failing test and its function, ask for the fix
  3. Code review: ask what is wrong with a 60-line file you know has two issues
  4. Documentation: generate a docstring and a README section
  5. Refactoring: extract a class from a long function without changing behaviour
  6. Algorithm: implement something with a known optimal answer (an LRU cache, a rate limiter)
  7. API integration: call a library you actually use, and check the imports exist
  8. Tests: write unit tests for a function, then run them

Score correctness first, then whether the code follows your project's conventions, then speed. Watch ollama ps while the model runs: if it reports anything other than 100% GPU, the model spilled into system RAM and every speed impression you form is about the spill, not the model.

The only speed number worth knowing

Generation speed for a local model is bounded by memory bandwidth divided by model size. An RTX 5080 has 960 GB/s of bandwidth; dividing that by Devstral Small 2's 15GB weights gives a ceiling of roughly 64 tokens per second, and by Qwen 2.5 Coder 14B's 9GB about 107. Real throughput lands well below the ceiling because of compute, context length and the KV cache, so treat these as upper bounds. Our RTX 5080 model guide works through the footprints for every model that fits a 16GB card.


All 10 local coding models ranked

Ranked by capability, with the tier each one fits

Ranking is by the vendor's own published capability and by what the model was trained to do, ordered so the strongest model appears first. The tier column is the smallest common GPU memory size that holds the default Ollama build with a usable context.

RankModelOllama tagDownloadContextFitsBest for
1Qwen 2.5 Coder 32Bqwen2.5-coder:32b20GB32K24GBHighest single-model code quality
2Qwen3-Coder 30B A3Bqwen3-coder:30b19GB256K24GBRepo-scale agents, MoE speed
3Devstral Small 2 24Bdevstral-small-2:24b15GB384K16GB (tight)Coding agents (Cline, OpenHands)
4gpt-oss:20bgpt-oss:20b14GB128K16GBFast MoE generalist with tool use
5Codestral 22Bcodestral:22b13GB32K16GBFill-in-the-middle completion
6Qwen 2.5 Coder 14Bqwen2.5-coder:14b9.0GB32K12GBBest 12GB pick, context headroom on 16GB
7DeepSeek-Coder-V2 Lite 16Bdeepseek-coder-v2:16b8.9GB160K12GBFast MoE completion, long context
8Qwen 2.5 Coder 7Bqwen2.5-coder:7b4.7GB32K8GBBest 8GB pick
9DeepSeek-Coder 6.7Bdeepseek-coder:6.7b3.8GB16K8GBFill-in-the-middle autocomplete on 8GB
10Qwen 2.5 Coder 3Bqwen2.5-coder:3b1.9GB32K4GB to 6GBInline autocomplete, runs beside a big model

These models still pull from Ollama and still work, but none has been updated in about two years and every one has a current replacement in the table above:

Legacy modelOllama tagDownloadReplace with
CodeLlama 7B / 13B / 34Bcodellama:7b, codellama:13b, codellama:34b3.8GB / 7.4GB / 19GBQwen 2.5 Coder 7B / 14B / 32B
StarCoder2 15Bstarcoder2:15b9.1GBQwen 2.5 Coder 14B
DeepSeek Coder 33Bdeepseek-coder:33b19GBQwen 2.5 Coder 32B or Qwen3-Coder 30B
WizardCoder 13B / 33Bwizardcoder:13b-python, wizardcoder:33b7.4GB / 19GBQwen 2.5 Coder 14B / 32B
Magicoder 7Bmagicoder:7b3.8GBQwen 2.5 Coder 7B
Stable Code 3Bstable-code:3b1.6GBQwen 2.5 Coder 3B
Phind CodeLlama 34B, CodeBooga 34Bphind-codellama:34b, codebooga:34b19GB eachQwen 2.5 Coder 32B

One correction from earlier versions of this guide: there is no wizardcoder:15b tag on the Ollama library and there never was. The WizardCoder family on Ollama ships as 7B, 13B, 33B and 34B builds.


Top 5 local coding models reviewed

1. Qwen 2.5 Coder 32B, the quality pick for 24GB cards

Why it is #1: the strongest dense open-weight coder you can hold on one consumer GPU, and Alibaba's own Qwen2.5-Coder report puts the 32B instruct model at the top of the open field on HumanEval and the multi-language benchmarks it publishes.

Strengths

  • Code quality: the model people compare cloud assistants against
  • Language breadth: Qwen reports training coverage across 92 programming languages
  • Well supported: Apache 2.0, first-class in Continue.dev, Cline, Aider and Open WebUI
  • Fill-in-the-middle: supports FIM tokens, so it works for autocomplete as well as chat

Weaknesses

  • Needs a 24GB card at Q4; 20GB of weights leaves roughly 4GB for context
  • 32K native context, smaller than the newer agent-trained models
  • Dense, so slower per token than the MoE models at the same tier

Installation:

ollama pull qwen2.5-coder:32b

Facts from the library: 20GB download at the default quantization, 32K context, Apache 2.0.


2. Qwen3-Coder 30B A3B, the agentic pick for 24GB cards

Why it is #2: a mixture-of-experts model that keeps all 30B parameters in memory but activates roughly 3B per token, so it generates far faster than the dense 32B while carrying a 256K native context. Alibaba positions it as the most agentic model in the Qwen line.

Strengths

  • Context: 256K native, which is what lets an agent hold a real repository in view
  • Speed for its size: MoE routing means small-model generation speed from a 30B download
  • Tool use: trained for function calling and the agent loop, not just completion
  • License: Apache 2.0

Weaknesses

  • Still a 19GB download, so it is a 24GB pull, not a 16GB one
  • MoE models quantize less gracefully than dense ones; stay at Q4_K_M or above
  • For single-shot code quality the dense 32B is the safer choice

Installation:

ollama pull qwen3-coder:30b

Facts from the library: 19GB download, 256K context, tagged qwen3-coder:30b and also served as qwen3-coder:latest.


3. Devstral Small 2 24B, the pick for 16GB cards

Why it is #3: Mistral built Devstral specifically for software-engineering agents, and Mistral reports 68.0% on SWE-bench Verified for Devstral Small 2, the strongest agentic score of anything that fits a 16GB card. It replaces the original Devstral Small (devstral:24b, 14GB), which is still on the library but superseded.

Strengths

  • Built for agents: trained on the explore-edit-test loop that Cline and OpenHands run
  • Multi-file edits: navigates a codebase rather than completing one file
  • Context: Ollama lists 384K for the default build
  • License: Apache 2.0

Weaknesses

  • A tight 16GB fit: 15GB of weights leaves about a gigabyte for KV cache, so set the context deliberately and keep the card to itself
  • Dense 24B, so slower than gpt-oss:20b on the same card
  • Overkill for plain autocomplete; pair it with a 3B coder for that

Installation:

ollama pull devstral-small-2:24b

Facts from the library: 15GB download at Q4_K_M, 26GB at Q8_0, tagged devstral-small-2:24b.


4. Qwen 2.5 Coder 14B, the pick for 12GB cards

Why it is #4: the largest Qwen coder that fits a 12GB card, and a clear step up from every 7B coder on multi-file work. On a 16GB card it is the context-heavy alternative to Devstral, because 9GB of weights leaves about 7GB for KV cache.

Strengths

  • Fits 12GB with headroom: 9.0GB download, room for a 16K to 32K context
  • Refactors: handles the cross-file changes the 7B models fumble
  • Same family as the 32B: same tokenizer and FIM support, so you can swap tiers without changing your editor config
  • License: Apache 2.0

Weaknesses

  • 32K native context
  • Qwen has not shipped a 2026 coder in the 14B class, so this remains a 2024 model
  • Overtaken on agentic benchmarks by Devstral Small 2 and the 30B MoE

Installation:

ollama pull qwen2.5-coder:14b

Facts from the library: 9.0GB download, 32K context, tagged qwen2.5-coder:14b.


5. Qwen 2.5 Coder 7B, the pick for 8GB cards

Why it is #5: the best coder that fits an 8GB GPU with room for a working context, and the default tag for the whole qwen2.5-coder family on Ollama.

Strengths

  • Fits 8GB: 4.7GB download, room for an 8K to 16K context
  • Complete and chat: FIM support for autocomplete plus a capable instruct model
  • Runs on laptops: the 8GB RTX 4060 and RTX 3070 class, and Apple silicon with 16GB unified memory
  • License: Apache 2.0

Weaknesses

  • Multi-file refactors are where 7B models run out of road
  • Pair with the 3B for inline completions if you want the editor to feel instant
  • For fill-in-the-middle on an 8GB card, DeepSeek-Coder 6.7B (deepseek-coder:6.7b, 3.8GB) is the alternative worth trying

Installation:

ollama pull qwen2.5-coder:7b

Facts from the library: 4.7GB download, 32K context, tagged qwen2.5-coder:7b and served as qwen2.5-coder:latest.


Best local AI for coding by language

Language rankings you see online are mostly noise, because the code-specialised models above were all trained on the same large multi-language corpora. Two facts from the model vendors are worth knowing, and the rest you should test with your own code.

Python and JavaScript / TypeScript

Every model in the top 10 is strongest here, because these two dominate the training data. Use the pick for your VRAM tier. For fill-in-the-middle autocomplete in a TypeScript project, Codestral 22B and Qwen 2.5 Coder 14B both handle React and Node patterns well in the editor.

Go, Rust and C++

Qwen reports 92 programming languages in Qwen 2.5 Coder's training coverage, and Go, Rust and C++ are among them. For systems work where correctness matters more than speed, the 32B is the model to run if you have the memory; the 14B is the compromise on 12GB.

Less common languages

StarCoder2 was trained on The Stack v2, which BigCode reports covers more than 600 programming languages, so starcoder2:15b (9.1GB) remains a reasonable fallback for niche languages even though it has not been updated in two years. Run a quick head-to-head against Qwen 2.5 Coder 14B on your own files before committing.

Mixed-language repositories

The agent-trained models (Devstral Small 2, Qwen3-Coder) handle repositories that mix a TypeScript front end with a Python or Go back end better than the completion models, because they were trained to read across files rather than complete one.


Best local AI for coding on 8 GB, 12 GB, 16 GB and 24 GB

Fit matrix

The numbers below are the Ollama download sizes for the default build of each model. A model needs its weights plus KV cache for the context you set, so leave 2GB to 4GB of headroom on any tier.

GPU memoryTypical cardsBest coding modelDownloadAlso fitsDoes not fit
8GBRTX 4060, RTX 3070, RTX 3060 TiQwen 2.5 Coder 7B4.7GBDeepSeek-Coder 6.7B (3.8GB), Qwen 2.5 Coder 3B (1.9GB)Qwen 2.5 Coder 14B (9.0GB)
12GBRTX 3060 12GB, RTX 4070, RTX 4070 SuperQwen 2.5 Coder 14B9.0GBDeepSeek-Coder-V2 Lite (8.9GB), Qwen 2.5 Coder 7BCodestral 22B (13GB), gpt-oss:20b (14GB)
16GBRTX 4080, RTX 5080, RTX 4060 Ti 16GBDevstral Small 2 24B15GBgpt-oss:20b (14GB), Codestral 22B (13GB), Qwen 2.5 Coder 14BQwen3-Coder 30B (19GB), Qwen 2.5 Coder 32B (20GB)
24GBRTX 3090, RTX 4090Qwen 2.5 Coder 32B20GBQwen3-Coder 30B (19GB), everything above at higher quantizationQwen 2.5 Coder 32B at Q8 (about 35GB), the 100B-plus models

Reading the tiers

Green: comfortable fit, room for a long context

Amber: fits, but set the context size deliberately

Red: the top of the consumer range; one card, one big model

Apple silicon: unified memory counts as VRAM, so a 32GB Mac sits between the 16GB and 24GB rows

Which card to buy

If you are choosing hardware for local coding rather than fitting a model to what you own, the honest summary is that 16GB is the first tier where an agent-trained model fits and 24GB is where the argument stops. Our local AI hardware guide covers the GPU options at each price point, and the 16GB tier page above lists what a 16GB card gains and what it misses by a gigabyte.


How much RAM do I need for a local coding model?

As a rule of thumb, budget roughly 0.6GB of VRAM per billion parameters at Q4 quantization, plus 2GB to 4GB of headroom for context. A 7B coding model runs comfortably in 8GB, a 14B model wants 12GB, a 24B dense model wants 16GB, and the 30B to 32B coders need 24GB. Mixture-of-experts models like Qwen3-Coder 30B A3B are the exception in speed but not in memory: they store all 30B weights (so you still need the 19GB to load them) but only activate about 3B per token, so they run much faster than a dense 30B for the same footprint.

Your GPU memoryRecommended coding modelWhy
8GBQwen 2.5 Coder 7B, or the 3B for autocomplete onlyThe best coders that fit with room for an IDE
12GBQwen 2.5 Coder 14B, DeepSeek-Coder-V2 LiteThe 14B class is a real step up from 7B
16GBDevstral Small 2 24B, gpt-oss:20b, Qwen 2.5 Coder 14BAgent-trained model fits, tightly
24GBQwen 2.5 Coder 32B, Qwen3-Coder 30BThe strongest open coders fit one card

Quantization is the lever that makes bigger models fit: a Q4_K_M build is roughly a quarter the size of FP16 for a small loss in quality, which is why almost everyone runs Q4 or Q5 locally rather than full precision. For code, avoid Q3 and below; the quality loss shows up as subtle syntax errors. If you are still deciding between a small fast model and a large accurate one, our guide on what LLM size you actually need for coding (7B vs 14B vs 32B vs 70B) walks through the trade-offs; the short version is that a well-quantized 14B often beats a badly-quantized 32B on everyday tasks.


Published benchmark numbers, vendor-reported

These are the figures the model vendors publish. We have not reproduced them and you should read each as "the vendor's number on the vendor's setup". They are useful for ranking models against each other within one benchmark, and nearly useless for predicting how a model behaves on your codebase.

ModelBenchmarkVendor-reportedSource
Qwen 2.5 Coder 32B InstructHumanEval92.7%Alibaba, Qwen2.5-Coder technical report
Devstral Small 2 24BSWE-bench Verified68.0%Mistral AI, Devstral 2 announcement

Why only two rows: HumanEval scores above 90% no longer separate models, since most current coders cluster there, and SWE-bench Verified is the one benchmark that measures the agentic loop most people actually want. When a vendor publishes a new number, the model card on Hugging Face is the place to confirm it before repeating it.

What matters more than either number: whether the model fits your card at a context size your workflow needs. A 92.7% model that spills into system RAM is slower and more frustrating than an 85% model that stays on the GPU.


Setup: Ollama plus VS Code in five minutes

Install and pull

  1. Install Ollama:

    # Windows/Mac: download from https://ollama.com
    # Linux:
    curl -fsSL https://ollama.com/install.sh | sh
    
  2. Pull the model for your tier:

    # 8GB card:
    ollama pull qwen2.5-coder:7b
    
    # 12GB card:
    ollama pull qwen2.5-coder:14b
    
    # 16GB card (agentic):
    ollama pull devstral-small-2:24b
    
    # 24GB card:
    ollama pull qwen2.5-coder:32b
    
  3. Test it:

    ollama run qwen2.5-coder:14b "Write a Python function to reverse a string, with tests"
    

VS Code with Continue

Install the Continue extension, then give it two models: the big one for chat and edits, the 3B for autocomplete. Continue reads a config.yaml:

name: Local coding
version: 0.0.1
schema: v1
models:
  - name: Qwen 2.5 Coder 14B
    provider: ollama
    model: qwen2.5-coder:14b
    roles: [chat, edit, apply]
  - name: Qwen 2.5 Coder 3B
    provider: ollama
    model: qwen2.5-coder:3b
    roles: [autocomplete]

The full walkthrough, including context providers and the Ollama endpoint settings, is in our Continue.dev + Ollama guide.

Set the context window

Ollama's default context is small, and a coding agent blows through it in a few tool calls. Raise it with a Modelfile:

# Modelfile
FROM qwen2.5-coder:14b
PARAMETER num_ctx 32768
PARAMETER temperature 0.1
SYSTEM "You are a senior engineer. Prefer small, correct changes and say when you are unsure."
ollama create qwen-coder-32k -f ./Modelfile

Then check ollama ps after the first request. It should report 100% GPU; if it shows a CPU share, the context you set pushed the model past your VRAM, and the fix is a smaller context or a smaller model, not a faster card.


Local AI vs GitHub Copilot: what it costs

Individual developer, annual

ServiceSubscriptionUsage limitsWhere your code goes
GitHub Copilot Pro$120Monthly credit allotment, then meteredGitHub / Microsoft
ChatGPT Plus$240Message caps by tierOpenAI
Claude Pro$240Usage caps by tierAnthropic
Cursor Pro$240Request caps by tierCursor
Local model via Ollama$0NoneStays on your machine

🔄 June 2026 pricing update: GitHub Copilot now runs Pro at $10/mo, Pro+ at $39/mo, Business at $19/user/mo, and Enterprise at $39/user/mo, and as of June 1, 2026 every plan moved to usage-based billing — each tier includes a monthly allotment of AI Credits and heavy agentic usage bills on top. That makes the "unlimited local usage" argument stronger than ever: a local model has no per-token meter, so intensive agent runs (the kind that now eat Copilot credits fastest) cost nothing extra once your hardware is paid off.

The honest caveat: a local model is only free if you already own a suitable GPU. If you are buying one for this purpose, the subscription comparison becomes a hardware question, and our local AI vs ChatGPT cost comparison works through it.


Two-model setups for different workflows

The pattern every editor integration now supports is one big model for chat and edits plus one small model kept resident for autocomplete. Here is how that maps to each tier.

8GB card

  • Chat and edits: Qwen 2.5 Coder 7B
  • Autocomplete: Qwen 2.5 Coder 3B, or DeepSeek-Coder 6.7B if you prefer its fill-in-the-middle

12GB card

  • Chat and edits: Qwen 2.5 Coder 14B
  • Autocomplete: Qwen 2.5 Coder 3B
  • Fast alternative: DeepSeek-Coder-V2 Lite for chat when you want MoE speed

16GB card

  • Agent (Cline, OpenHands): Devstral Small 2 24B, on its own; there is no room for a second model beside it
  • Chat plus autocomplete: Qwen 2.5 Coder 14B with the 3B resident
  • Fast generalist: gpt-oss:20b when you want reasoning and tool use at MoE speed

24GB card

  • Chat and edits: Qwen 2.5 Coder 32B
  • Agent: Qwen3-Coder 30B for the 256K context
  • Autocomplete: Qwen 2.5 Coder 3B, still resident beside either

Scripting the models from the terminal

Ollama is a plain HTTP server, so a shell script can route each step to the model that suits it:

#!/bin/bash
# Two-model review: the agent-trained model finds the problem, the coder writes the fix
review_file() {
    local file="$1"

    echo "=== Review ==="
    ollama run devstral-small-2:24b "Review this file for bugs and security issues: $(cat $file | head -c 4000)"

    echo "=== Tests ==="
    ollama run qwen2.5-coder:14b "Write unit tests for this file: $(cat $file | head -c 4000)"
}

For an autonomous agent that runs this loop itself, edits files and executes tests, see our Cline + Ollama setup.


Conclusion: your next steps

Pick by the memory on your card, not by a leaderboard:

8GB: Qwen 2.5 Coder 7B

The best coder that fits with room to work. ollama pull qwen2.5-coder:7b

12GB: Qwen 2.5 Coder 14B

The tier where multi-file refactors start working. ollama pull qwen2.5-coder:14b

16GB: Devstral Small 2 24B

The first agent-trained coder that fits a consumer card. ollama pull devstral-small-2:24b

24GB: Qwen 2.5 Coder 32B, or Qwen3-Coder 30B for agents

The strongest open coders on one GPU. ollama pull qwen2.5-coder:32b

Getting started checklist

  1. Check your VRAM and pick the row above
  2. Pull the model and confirm ollama ps shows 100% GPU
  3. Install Continue (autocomplete and chat) or Cline (agent) and point it at Ollama
  4. Set the context size with a Modelfile before you run an agent
  5. Run the eight-prompt test from the methodology section on your own code

Not sure which tier you are in? Run nvidia-smi on Linux or Windows, or check About This Mac on Apple silicon, and read the memory figure.


Frequently asked questions

Q: What is the best local AI model for coding right now?

A: By tier: Qwen 2.5 Coder 7B on 8GB, Qwen 2.5 Coder 14B on 12GB, Devstral Small 2 24B on 16GB, Qwen 2.5 Coder 32B on 24GB. Qwen3-Coder 30B is the 24GB pick when you want a 256K context for agent work.

Q: What is the best free local AI model for coding?

A: All of the above are free and open-weight. Qwen 2.5 Coder, Qwen3-Coder, Devstral Small 2 and gpt-oss are Apache 2.0; DeepSeek-Coder-V2 Lite is under the DeepSeek license, which permits local use. The only cost is hardware and electricity.

Q: What is the best 14B local model for coding and general use?

A: Qwen 2.5 Coder 14B for code. If one model has to cover general chat as well, run a general 14B and keep Qwen 2.5 Coder 3B beside it for autocomplete. See our best 14B coding models comparison.

Q: Can these models really replace GitHub Copilot?

A: For autocomplete, tests, explanations and single-file edits, yes, with no per-token meter and your code staying local. For the hardest multi-repo agent tasks the cloud frontier models are still ahead of anything that fits one consumer GPU.

Q: How much does the electricity cost?

A: A GPU drawing 200W to 300W under load for a few hours a day adds a few dollars a month at typical residential rates. Your local tariff decides the exact figure.

Q: Can I run two models at once?

A: Yes, if both fit in VRAM together. A 14B coder (9GB) plus a 3B autocomplete model (1.9GB) fits a 12GB card; Devstral Small 2 (15GB) leaves no room for a second model on 16GB.

Q: What about the latest frameworks and language features?

A: Open models have a training cutoff and lag cloud services on brand-new APIs. Paste the relevant docs into context, or use a Continue context provider, and the gap mostly closes.


Ready to set up local AI for coding? Our installation guide gets Ollama running in ten minutes, and the tier pages linked at the top of this article list every model that fits your card.

🎯
AI Learning Path

Picked your coding model? Build a real AI dev workflow.

From local copilots to agents that ship code — the structured path, running on your hardware. First chapter free.

Or own it for life — Lifetime $149 $599, pay once

Liked this? 25 full AI courses are waiting.

From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.

Reading now
Join the discussion
TagsProgrammingCodingAI ModelsOllamaDevelopment

Local AI Master

Local AI Master writes hands-on courses and hardware guides for running AI on machines you own. Content is checked against current releases and corrected when readers tell us it is wrong.

Build Real AI on Your Machine

RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.

Want the structured version?

Hands-on courses on local AI, from $8.99 a month. The first chapter of each is free.

AI Learning Path
More on AI Models for Coding
See the full Best Local AI for Coding guide.

Comments (0)

No comments yet. Be the first to share your thoughts!

Free cheatsheet

Which local AI model should you run?

Get the Local AI Model Picker — the right model for your RAM and your use-case, plus the 2 commands to run it. Free, instant.

No spam — the cheatsheet plus the occasional local-AI tip. Unsubscribe anytime.

📅 Published: September 25, 2025🔄 Last Updated: September 19, 2026✓ Manually Reviewed
LM

Written by the Local AI Master Team

The team behind Local AI Master

We build Local AI Master around practical, testable local AI workflows: model selection, hardware planning, RAG systems, agents, and MLOps. The goal is to turn scattered tutorials into a structured learning path you can follow on your own hardware.

✓ Local AI Curriculum✓ Hands-On Projects✓ Open Source Contributor

Recommended Hardware for Programming AI

Hardware that fits each VRAM tier above, from an 8GB card for the 7B coders to 24GB for the 32B class:

NZXT BLD AI Workstation

$1899

i7-13700K, RTX 4070, 32GB RAM, 1TB SSD

Key Benefits:
  • Pre-built and tested
  • AI-optimized
  • 2-year warranty
Best for: Users who want a complete AI-ready system

Need Help Choosing?

Not sure which hardware is right for your needs? Get our free Hardware Selection Guide with detailed recommendations for every budget.

🎯
AI Learning Path

Go from reading about AI to building with AI

25 structured courses. Hands-on projects. Runs on your machine. Start free.

Or own it for life — Lifetime $149 $599, pay once

Get Advanced Programming AI Tips

Get weekly tips on local AI for programming, model comparisons, and optimization techniques.

Build Real AI on Your Machine

RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.

Level Up Your Local AI Setup

Was this helpful?

📚
Free · no account required

Grab the AI Starter Kit — career roadmap, cheat sheet, setup guide

No spam. Unsubscribe with one click.

🎯
AI Learning Path

Picked your coding model? Build a real AI dev workflow.

From local copilots to agents that ship code — the structured path, running on your hardware. First chapter free.

Or own it for life — Lifetime $149 $599, pay once
Free Tools & Calculators