Best Local LLMs for Coding in 2026 (8GB to 32GB GPUs)

You pull a 32-billion-parameter coding checkpoint onto your desktop, wire it into Cline or Aider, and ask it to fix a bug across three TypeScript files. Ten seconds later, your cooling fans scream. Generation crawls to two tokens per second because the context cache spilled over your GPU memory into system RAM. Worse, the model forgets its tool-calling schema halfway through the diff and overwrites a working module with broken syntax.

Public leaderboards rarely warn you about that failure mode. Most coding benchmarks test models at full 16-bit precision on 80GB server cards, which tells you almost nothing about how a quantized model behaves on an 8GB laptop, a 16GB RTX 4060 Ti, or a 24GB used RTX 3090 once a 32,768-token repository map fills the KV cache.

Picking the best local LLM for coding in 2026 starts with your hardware ceiling. According to VDF.AI’s 2026 Open-Weight Coding Model Evaluation and Morph’s November 2026 Ollama Library Benchmark, the winning formula is matching an Apache 2.0 Mixture-of-Experts (MoE) or dense coder to your exact VRAM budget while reserving 4GB to 6GB for context. Below, you will find tested model picks for every GPU tier from 8GB to 32GB, exact KV-cache memory math, quantization limits, and copy-paste configurations for Ollama, Continue, Cline, and Aider. Before pulling your first checkpoint, check your card’s exact weight and context capacity with our Local AI VRAM Calculator.

Table of Contents

Quick verdict: best local coding LLM by VRAM tier (2026)

If you want the fastest answer for your machine right now, use this hardware map based on verified 4-bit (Q4_K_M or native MXFP4) checkpoints from Origins AI’s 2026 Hardware Ranking and Hobbyist’s Hideaway’s Late-2026 GPU Coding Guide:

  • 8GB VRAM (RTX 3060 8GB, RTX 4060, M2 MacBook Air): Run qwen2.5-coder:7b (4.7 GB download) for sub-second tab autocomplete and single-function generation, or qwen3.5:9b (Q4_K_M, 6.6 GB) for explaining stack traces.
  • 12GB VRAM (RTX 3060 12GB, RTX 4070, Intel Arc B580): Run qwen3.5:9b at Q6_K with a 32K context window, or deepseek-coder-v2:16b (8.9 GB MoE, 160K context) for multi-file reading.
  • 16GB VRAM or Unified RAM (RTX 4060 Ti 16GB, RTX 5060 Ti 16GB, RX 9070 XT): Run gpt-oss:20b (14 GB native MXFP4, 128K context) for reliable agent tool calls, or qwen2.5-coder:14b (9.0 GB dense) when you need extra headroom for a 32K KV cache.
  • 24GB VRAM (Used RTX 3090, RTX 4090, RX 7900 XTX): Run qwen3-coder:30b (19 GB at Q4_K_M, 30.5B total / 3.3B active MoE, 256K context) for fast agentic coding, or devstral:24b (14 GB dense, 46.8% to 68.0% SWE-bench Verified) for measured repository bug fixing.
  • 32GB VRAM and 64GB+ Unified Memory (RTX 5090, Mac Studio M4 Max, Ryzen AI Max+ 395): Run qwen3-coder:30b with a full 64K to 128K context window on 32GB cards, or step up to Qwen3-Coder-Next (80B total / 3B active MoE, ~44 GB at 4-bit) on 64GB to 128GB systems.
2026 local coding LLM benchmark table comparing Ollama pull tags, Q4 VRAM usage, context windows, licenses, and SWE-Bench scores
Verified Q4_K_M weight sizes, KV cache math, licenses, and SWE-Bench / Aider benchmarks for top 2026 local coding models.

Top open-weight local coding models compared

Over the past year, open-weight coding models shifted from simple code completion to full agentic tool use. Models like Qwen3-Coder and Mistral’s Devstral are trained specifically to emit structured function calls: reading files, running grep searches, applying line diffs, and checking compiler output inside harnesses like Cline, Claude Code, and OpenHands.

Every specification in the comparison table below is verified against official vendor model cards, the Aider LLM Leaderboards, VDF.AI’s November 2026 Audit, and Morph’s Ollama Catalog:

Model & Ollama TagTotal / Active Params4-Bit Weight SizeNative ContextLicenseVerified Benchmark & Primary Strength
Qwen3-Coder 30B-A3B (qwen3-coder:30b)30.5B total / 3.3B active MoE19.0 GB (Q4_K_M)256K (1M via YaRN)Apache 2.0Top 24GB agent coder; 3.3B active params deliver 3B-class token speed with 30B intelligence
Devstral Small 2 24B (devstral:24b)24B dense14.0 GB (Q4_K_M)128K to 256KApache 2.046.8% SWE-bench Verified (standard harness) / 68.0% (vendor card); built for Cline & OpenHands
Qwen3.6 27B (qwen3.6:27b)27B dense17.0 GB (Q4_K_M)256KApache 2.073.8% SWE-bench Verified (Harbor harness on 35B sibling); supports image input + MTP quants
gpt-oss-20b (gpt-oss:20b)21B total / 3.6B active MoE14.0 GB (native MXFP4)128KApache 2.0Runs inside 16GB VRAM or system RAM; strong bug reasoning and function calling (Harmony format)
Qwen2.5-Coder 32B (qwen2.5-coder:32b)32B dense20.0 GB (Q4_K_M)32KApache 2.073.7% on Aider code repair & 75.2% on MdEval (#1 open-source); rock-solid single-file diff generation
Qwen2.5-Coder 14B (qwen2.5-coder:14b)14B dense9.0 GB (Q4_K_M)32KApache 2.0Best dedicated dense coder for 16GB GPUs with 7GB left over for a 32K context cache
DeepSeek-R1 Distill 14B / 32B (deepseek-r1:14b)14B / 32B dense9.0 GB / 20.0 GB128KMIT / Apache 2.0Chain-of-thought reasoning distills (Ollama deepseek-r1:14b); best for algorithm debugging and logic traps
Codestral 22B (codestral:22b)22B dense13.0 GB (Q4_K_M)32KMistral Non-ProductionFluent in 80+ languages with fast fill-in-the-middle (FIM); personal or non-production use only
Qwen2.5-Coder 7B / 1.5B (qwen2.5-coder:7b)7B / 1.5B dense4.7 GB / 986 MB32KApache 2.0Default choice for 8GB GPUs and sub-100ms IDE tab autocomplete alongside a larger chat model
Qwen3-Coder-Next (80B-A3B)80B total / 3B active MoE~44.0 GB (4-bit)256KApache 2.070.6% SWE-bench Verified; hybrid linear attention keeps KV cache tiny on 64GB–128GB Macs & workstations

Licensing warning for commercial teams: Always check the repository license before deploying a local coding assistant at work. While the Qwen3-Coder family, Qwen2.5-Coder family (Qwen2.5-Coder Release Post), Devstral Small 2, and gpt-oss ship under the permissive Apache 2.0 license, Mistral’s older Codestral 22B uses the Mistral AI Non-Production License, which prohibits commercial production use. Similarly, Mistral Medium 3.5 and Devstral 2 123B carry a Modified MIT license that revokes commercial rights for companies earning over $20 million in monthly revenue (VDF.AI License Audit).

VRAM and KV-cache math: why coding agents spill to RAM

When a model fits on disk at 14GB, many developers assume it will run effortlessly on a 16GB graphics card. It works fine for a three-line chat prompt. Then you open an agent like Cline or Aider, which injects a 10,000-token system prompt, five repository files, and a terminal error log. Suddenly your GPU runs out of memory.

Here is why: total VRAM usage is the sum of three distinct components documented in VDF.AI’s VRAM Sizing Guide:

Total GPU Memory = Model Weights + KV Cache (Context Window) + Runtime Headroom (10% to 20%)

1. Model Weights (at 4-bit / Q4_K_M):
   Total Parameters * 0.55 bytes
   (Note: For Mixture-of-Experts models, ALL experts sit in VRAM, so multiply by TOTAL parameters, not active parameters.)

2. KV Cache per Token (at 16-bit FP16):
   2 * full_attention_layers * kv_heads * head_dimension * 2 bytes
   Multiply that per-token figure by your active context length (e.g., 32,768 or 65,536 tokens).

3. Runtime & Activation Headroom:
   Add 1.5 GB to 3.5 GB for CUDA kernels, compute buffers, and memory fragmentation.

Look at how that arithmetic plays out across three popular 2026 coding setups at 4-bit precision with a 16-bit KV cache (VDF.AI Memory Arithmetic Table):

  • Qwen3-Coder-30B-A3B at 64K Context: Weights take 30.5B * 0.55 = 16.8 GB (19 GB packaged in Ollama’s default Q4_K_M tag). Its 48 layers with 4 KV heads consume 98,304 bytes/token, adding 6.4 GB for one 65,536-token session. Total before headroom: ~23.2 GB. That fits a 24GB RTX 3090 or 4090 tightly, and runs even safer when you quantize the KV cache to 8-bit (q8_0).
  • Devstral Small 2 (24B Dense) at 128K Context: Weights take just 13.2 GB (14 GB on Ollama). However, because its 40 full-attention layers each keep 8 KV heads (163,840 bytes/token), a full 131,072-token context window demands 21.5 GB of KV cache alone (~35 GB total). On a 24GB GPU, cap Devstral’s context at 32K to 48K tokens or enable 8-bit KV cache quantization so the cache drops from 21.5 GB down to ~5.4 GB at 64K.
  • Qwen3-Coder-Next (80B-A3B MoE) at 128K Context: Weights take ~44 GB at 4-bit. Because only 12 of its 48 layers use full attention with 2 KV heads (24,576 bytes/token) while the rest use linear attention, four simultaneous 128K sessions consume only 12.9 GB of KV cache (~57 GB total).

You can model any combination of parameter count, quantization bits, and context length interactively using our Local AI VRAM Calculator, and compare self-hosted electricity cost against cloud API token bills with our LLM Token Cost Calculator.

Quantization for code: how low can you go?

Natural-language chat tolerates aggressive compression. If a 2-bit model swaps an adjective in an email, nobody notices. Code has zero tolerance for token drift: a single corrupted token breaks a JSON tool call, misses an off-by-one boundary, or invents a non-existent library method.

Quantization LevelSize vs FP16Bits per WeightCoding Verdict & When to Use It
Q8_0~53%~8.0 bitsVirtually indistinguishable from FP16. Use it when your GPU has 32GB+ VRAM (qwen3-coder:30b takes 32GB at q8_0).
Q6_K~41%~6.5 bitsSweet spot for 7B to 14B models on 12GB to 16GB cards; preserves strict diff-edit formatting.
Q5_K_M~36%~5.5 bitsStrong middle ground when Q6_K leaves too little room for a 32K context window.
Q4_K_M / Native MXFP4~30%~4.25–4.5 bitsPractical floor for coding agents. Default for 24B to 32B models on 24GB GPUs.
Q3_K_M / IQ3~23%~3.4 bitsEmergency fallback only. Expect frequent syntax errors and broken multi-file diffs on dense models.
Q2_K~17%~2.6 bitsAvoid for programming. Tool-call JSON schemas fail repeatedly.

Three practical rules emerged from recent Reddit r/LocalLLM hardware benchmarks:

  1. A larger model at Q4_K_M beats a smaller model at Q8_0: A 30B or 32B coder quantized to 4-bit (~19–20 GB) writes cleaner multi-file architecture than a 14B coder running at 8-bit (~15 GB).
  2. Never sacrifice context length for a higher quant: An agent running Q4_K_M weights with a 64K context window will solve real repository bugs that a Q6_K model with an 8K context window cannot even read.
  3. Models under 9B suffer the steepest quality drop at 4-bit: If you run a 7B or 9B coder on an 8GB or 12GB card, step up to Q5_K_M or Q6_K whenever memory permits.

Best models for 8GB and 12GB GPUs (autocomplete and single-file edits)

In a popular Reddit r/LocalLLM 8GB VRAM benchmark thread, developers asked whether an 8GB card (like an RTX 3060 8GB, RTX 3070, or RTX 4060) can still handle local AI coding in 2026. The honest answer: 8GB is too tight for autonomous multi-file agents, but it is fast and effective for IDE tab autocomplete, unit-test generation, and single-file chat.

  • Best 8GB Dedicated Coder: qwen2.5-coder:7b (4.7 GB): Trained on 5.5 trillion tokens of source code and technical documentation (Qwen2.5-Coder Technical Report), the 7B Instruct and Base checkpoints leave over 3GB of VRAM free on an 8GB card for a 16K to 32K context window. It supports fast fill-in-the-middle (FIM) completion and generates clean Python, JavaScript, Rust, and SQL snippets at 60+ tokens per second.
  • Best 8GB to 12GB All-Rounder: qwen3.5:9b (6.6 GB at Q4_K_M): Benchmarks on an RTX 3070 with llama.cpp (LocalLLM 8GB Hardware Benchmark) and the Pi SWE-bench harness (50.0% SWE-bench Verified in Pi) place Qwen3.5-9B ahead of newer 12B rivals like JetBrains’ Mellum2.1 Thinking (47.0%). On a 12GB RTX 3060 or RTX 4070, run qwen3.5:9b at Q6_K with a full 32K context window, or pull Xiaomi’s mimo-v2.6:9b (6.6 GB, 256K context, text and image input).
  • Best 8GB + 32GB System RAM Hybrid Trick: If your PC has only 8GB VRAM but 32GB of fast DDR5 system RAM, one r/LocalLLM developer demonstrated running a 35B-A3B Mixture-of-Experts model (Qwen3.6-35B-A3B) with MoE expert offloading in llama.cpp, keeping the active attention layers on the GPU to reach ~200 tokens/sec prompt processing and ~20 tokens/sec generation.

Best models for 16GB GPUs and laptops (first agentic tier)

Sixteen gigabytes of VRAM (RTX 4060 Ti 16GB, RTX 5060 Ti 16GB, Radeon RX 9070 XT, or a 24GB unified-memory MacBook) is the entry threshold where agentic coding tools like Cline and Aider start working reliably (r/LocalLLM April 2026 16GB GPU Poll).

  • Best 16GB Agentic Model: gpt-oss:20b (14 GB native MXFP4): OpenAI’s open-weights 21B Mixture-of-Experts model activates just 3.6B parameters per token and ships natively quantized in MXFP4 (4.25 bits/param). Because its weights take 14GB, enable 8-bit KV cache quantization (OLLAMA_KV_CACHE_TYPE=q8_0) and keep your context window between 16K and 24K so the entire model stays 100% on your 16GB GPU. It excels at step-by-step bug diagnosis and tool calling when your runner applies the required Harmony response template.
  • Best 16GB Dedicated Code Editor: qwen2.5-coder:14b (9.0 GB at Q4_K_M): When you want a full 32,768-token context window on a 16GB card without risking CPU spillover, qwen2.5-coder:14b is the safest pick. Its 9GB footprint leaves 7GB of breathing room for the KV cache and display driver, delivering fast, high-accuracy code edits in Aider and Continue.
  • Best 16GB Tight-Fit Agent: devstral:24b (14 GB at Q4_K_M): You can load Mistral’s 24B agentic coder on a 16GB GPU if you run a headless display or lightweight desktop and cap context at 16,384 tokens with an 8-bit KV cache. For 32K+ agent sessions, however, devstral:24b is much happier on a 24GB card.

Best models for 24GB and 32GB GPUs (the local agent sweet spot)

A 24GB GPU (such as a used RTX 3090 at 936 GB/s bandwidth, an RTX 4090 at ~1,000 GB/s, or a Radeon RX 7900 XTX) or a 32GB RTX 5090 (~1,790 GB/s) unlocks the models that made local coding a genuine alternative to cloud subscriptions in 2026.

  • #1 Overall 24GB to 32GB Winner: qwen3-coder:30b (19 GB at Q4_K_M): Built on a 30.5B total / 3.3B active Mixture-of-Experts architecture (QwenLM/Qwen3-Coder on GitHub), this model gives you the repository reasoning of a 30B class checkpoint while reading only 3.3B parameters per generated token. On an RTX 3090 or 4090, it streams code at 70 to 110+ tokens per second and supports a 256K native context window (1M via YaRN) with native function calling for Qwen Code, Cline, and Claude Code. On a 32GB RTX 5090, you can either run Q4_K_M with a massive 64K to 128K context window or step up to the q8_0 tag (32 GB on 48GB/64GB systems).
  • Best Benchmarked SWE-Bench Agent: devstral:24b / Devstral Small 2 (14 GB at Q4_K_M): Developed by Mistral AI and All Hands AI (Mistral Devstral Release), Devstral 24B is a dense software-engineering agent that scores 46.8% on SWE-bench Verified (68.0% on the updated Devstral Small 2 model card), beating GPT-4.1-mini (23.6%) and Claude 3.5 Haiku (40.6%). Because its 4-bit weights take only 14GB, a 24GB GPU has 10GB left over for long multi-file agent loops in Cline, OpenHands, or Mistral Vibe CLI.
  • Best Multimodal & Speculative-Decoding Pick: qwen3.6:27b (17 GB) & qwen3.8:27b (18 GB): If you frequently paste UI screenshots or architecture diagrams into your coding chat, both 27B dense models accept text and image inputs across a 256K context window (Morph New Ollama Families). qwen3.6:27b also ships with specialized 27b-coding-nvfp4 (20 GB) and Multi-Token Prediction (MTP) tags that accelerate generation on RTX 50-series and Apple Silicon GPUs.
  • Best Pure Diff-Edit Reference: qwen2.5-coder:32b (20 GB at Q4_K_M): When you do not need a 256K context window and want maximum accuracy on single-file or three-file code repair inside Aider, qwen2.5-coder:32b still holds a 73.7% Aider code-repair score and 75.2% on MdEval (Aider Leaderboards).

Wiring local models into Ollama, Continue, Cline, and Aider

Even the strongest local model will fail in an agent if you leave your runner on its default settings. In a widely cited Reddit r/selfhosted benchmark of 10 local AI coding agents, the #1 cause of agent loops and corrupted file edits was silent context truncation: Ollama defaults to a 4,096-token context window (num_ctx = 4096), while agents like Cline, Roo Code, and Aider routinely send 18,000 to 45,000 tokens per turn.

If you are still deciding which local backend fits your workstation, compare our benchmarks in Ollama vs LM Studio (2026): Which Local LLM Runner Wins? and vLLM vs Ollama (2026): Local Dev vs Production Serving.

Step 1: Unlock 64K Context & 8-Bit KV Cache in Ollama

Before launching your IDE, start your Ollama server with Flash Attention enabled, an 8-bit (q8_0) KV cache (which cuts context memory in half with near-zero quality loss), and a 65,536-token context window:

# Launch Ollama with 64K context and 8-bit KV cache compression
OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 OLLAMA_CONTEXT_LENGTH=65536 ollama serve

# Pull your main agent model (24GB GPU) and a fast FIM autocomplete model
ollama pull qwen3-coder:30b
ollama pull qwen2.5-coder:1.5b-base

# Verify 100% GPU placement (zero CPU spillover) while running
ollama ps

Always inspect the PROCESSOR column in ollama ps while an agent session is active. If it says 100% GPU, your context window fits cleanly. If it drops to 75% GPU / 25% CPU, lower OLLAMA_CONTEXT_LENGTH to 32768 or 49152 immediately.

Step 2: Pair a Big Chat Model With a Tiny FIM Autocomplete Model in Continue

Do not use a 24B or 30B model for inline tab autocomplete; the time-to-first-token latency will feel sluggish as you type. Instead, configure Continue in VS Code or JetBrains (~/.continue/config.yaml) to route chat and multi-file edits to qwen3-coder:30b (or qwen2.5-coder:14b on 16GB cards) while keeping qwen2.5-coder:1.5b-base (986 MB) loaded for instant fill-in-the-middle tab completions:

name: Local Coding Workstation
version: 1.0.0
schema: v1
models:
  - name: Qwen3 Coder 30B-A3B (Agent & Edit)
    provider: ollama
    model: qwen3-coder:30b
    roles:
      - chat
      - edit
      - apply
    defaultCompletionOptions:
      contextLength: 65536
      temperature: 0.2
  - name: Qwen2.5 Coder 1.5B (Fast FIM Tab Autocomplete)
    provider: ollama
    model: qwen2.5-coder:1.5b-base
    roles:
      - autocomplete

Step 3: Connect Aider, Cline, or Claude Code to Your Local Endpoint

For terminal pair-programming in Aider (Aider Qwen3 Polyglot Guide) or local routing in Cline, point the client at Ollama’s local endpoint (http://127.0.0.1:11434) or LM Studio’s OpenAI-compatible server (http://localhost:1234/v1):

# Run Aider with Qwen3-Coder 30B or Devstral 24B via Ollama
export OLLAMA_API_BASE=http://127.0.0.1:11434
aider --model ollama_chat/qwen3-coder:30b

# Optional: Route Claude Code CLI to a local Anthropic-compatible endpoint (Ollama / LM Studio / llama-server)
export ANTHROPIC_BASE_URL=http://localhost:11434
claude

You can explore dozens of compatible open-source coding agents, IDE extensions, and local runners inside our AI Tools Directory.

My Opinion

After testing local coding models across 8GB, 16GB, and 24GB rigs over the past year, my honest take is that Mixture-of-Experts (MoE) coding models transformed what single-GPU developers can run at home. A year ago, running a 30-billion-parameter dense model on a 24GB card meant tolerating 18 tokens per second while your GPU memory sat on the edge of crashing. Today, qwen3-coder:30b activates only 3.3B parameters per token, which makes it feel as snappy as a tiny 7B model while understanding multi-file TypeScript and Python architectures like a 30B powerhouse.

That said, I still see too many developers set themselves up for disappointment by treating a local 14B or 30B model the exact same way they treat Claude Opus 5.5 on a 100-file refactor. If you tell a local model to “rewrite the authentication layer across the whole repo,” it will eventually lose track of a tool call. Instead, use a hybrid workflow: run qwen2.5-coder:1.5b-base for zero-latency tab autocomplete, use qwen3-coder:30b or devstral:24b for 90% of your daily single-file edits, unit tests, and private repository debugging at $0/month, and save cloud API calls for rare, repo-wide architectural migrations. And if you are shopping for hardware on a budget, a used 24GB RTX 3090 remains the best dollar-for-dollar purchase in local AI.

Frequently Asked Questions

1. What is the best local LLM for coding in 2026?

Your VRAM capacity decides the winner (VDF.AI 2026 Comparison):

  • 24GB to 32GB GPU: qwen3-coder:30b (30.5B total / 3.3B active MoE, 19 GB at Q4_K_M, 256K context) and devstral:24b (14 GB dense, 46.8% to 68.0% SWE-bench Verified).
  • 16GB GPU or Laptop RAM: gpt-oss:20b (14 GB native MXFP4) or qwen2.5-coder:14b (9.0 GB dense).
  • 8GB to 12GB GPU: qwen2.5-coder:7b (4.7 GB) or qwen3.5:9b (6.6 GB).
  • 64GB to 128GB Unified Memory: Qwen3-Coder-Next (80B-A3B MoE, ~44 GB at 4-bit, 70.6% SWE-bench Verified).

2. Can I run a good local coding LLM on an 8GB VRAM GPU?

Yes, for autocomplete, code explanation, and single-file scripts. Pull qwen2.5-coder:7b (4.7 GB) or qwen3.5:9b (6.6 GB at Q4_K_M). Those models fit completely inside 8GB of VRAM with room for a 16K to 32K context window. Avoid running heavy multi-file agents like Cline on 8GB cards, because 7B to 9B models struggle with complex multi-turn JSON tool schemas.

3. Why does my local coding agent run so slowly or forget instructions in Ollama?

Two settings cause this in almost every case. First, Ollama defaults to a 4,096-token context window, which silently truncates your agent’s system prompt and tool definitions. Second, if you raise the context window without checking memory, the KV cache overflows your GPU VRAM and spills layers onto your CPU. Fix both by launching Ollama with OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 OLLAMA_CONTEXT_LENGTH=32768 (or 65536 on 24GB+ cards) and verifying 100% GPU in ollama ps.

4. Which quantization level is best for local coding models?

Use Q4_K_M (or native MXFP4 on gpt-oss) as your minimum floor for 20B to 32B models, and step up to Q5_K_M, Q6_K, or Q8_0 whenever your VRAM has room after allocating at least 32K of context. Never drop below 4-bit (Q3 or Q2) for coding, because low-bit rounding errors break syntax and diff line numbers.

5. Is Qwen3-Coder 30B-A3B better than Devstral 24B?

Both are Apache 2.0 licensed and excel on a 24GB GPU, so the right choice depends on your workflow (Morph Ollama Coding Comparison):

  • Choose qwen3-coder:30b when you want 2x to 3x faster token generation (thanks to its 3.3B active MoE design) and a 256K native context window.
  • Choose devstral:24b when you want a smaller 14GB disk/VRAM footprint that leaves extra room for KV cache on 16GB to 24GB cards, backed by a published SWE-bench Verified score (46.8% to 68.0%).

6. What is the best GPU to buy for local LLM coding in 2026?

For pure value, a used 24GB NVIDIA RTX 3090 (936 GB/s memory bandwidth) is still the best purchase because it holds qwen3-coder:30b and devstral:24b with a 64K context window at a fraction of new-card prices (Hobbyist’s Hideaway GPU Guide). If you want a brand-new budget card, the 16GB RTX 5060 Ti or 16GB Radeon RX 9070 XT handles the 16GB tier well, while the 32GB RTX 5090 (~1,790 GB/s) is the fastest single consumer GPU available.

7. How well does Apple Silicon (M4 Pro / M4 Max / Mac Studio) run local coding agents?

Macs with 32GB to 128GB of unified memory are great for loading large Mixture-of-Experts models like qwen3-coder:30b (19 GB) and Qwen3-Coder-Next 80B-A3B (~44 GB) quietly at low wattage. Their main trade-off is prompt processing speed (time-to-first-token): ingesting a 40,000-token repository prompt in Cline or Aider takes noticeably longer on a MacBook Pro than on an NVIDIA RTX 3090, 4090, or 5090.

8. Are local coding models free for commercial software development?

Most top picks are 100% free for commercial use under the Apache 2.0 or MIT license, including Qwen3-Coder, Qwen3.6, Qwen2.5-Coder, Devstral Small 2 24B, gpt-oss, and DeepSeek-R1 distills. Avoid using Codestral 22B (Non-Production License) or revenue-capped models (Mistral Medium 3.5, Devstral 2 123B, LFM2.5-24B) in commercial production without reading their license files first.

9. Should I use the same local model for chat and tab autocomplete?

No. Large 20B to 32B models add too much latency for real-time keystroke completion. Pair a 14B to 30B model for chat and agentic edits with a tiny fill-in-the-middle (FIM) model like qwen2.5-coder:1.5b-base (986 MB) or qwen2.5-coder:7b-base (4.7 GB) in Continue so your tab completions appear in under 100 milliseconds.

Leave a Comment