This guide was drafted with AI assistance and checked against the cited sources.
Key facts
Fit before the leaderboard
A coding model you can load beats a larger one that spills to RAM
16 GB practical band
About 14B dense at Q4, or Codestral 22B (15.2 GB) at a short context
24 GB practical band
Qwen3.6-27B Q4 is 18.2 GB (ollama run qwen3.6:27b). Qwen3-Coder 30B-A3B Q4 is 20.3 GB (ollama run qwen3-coder:30b). The 35B Qwen3.6 tag is 23 GB and is tight.
RTX 4070
12 GB fits Granite 4.2-8B and ColGrep Q8, not Qwen3.6-27B.
Checked
2026-10-13
Checked 2026-10-13. Author: LLM Hardware team. Amazon prices are not stored or shown on this site.
Manufacturer MSRP (launch list price)
These are NVIDIA’s launch MSRPs from NVIDIA’s own pages, checked 17 October 2026. This is not Amazon’s price. Current prices are on Amazon, and partner cards often list higher.
Manufacturer MSRP (launch list price), checked 17 October 2026
Checked 17 October 2026 against the linked manufacturer pages. Not Amazon’s price; current prices are on Amazon.
Citeable facts
Key fact: Qwen3.6-27B is the 24 GB local coder. Qwen3.6-35B-A3B is not a 16 GB model, even though only 3B parameters are active.
How we got it: Qwen cards, Apache-2.0. 27 × 0.5 × 1.2 + 2 = 18.2 GB. 35 × 0.5 × 1.2 + 2 = 23.0 GB. Unsloth files on 2026-10-05: Q4_K_M 16.82 GB and UD-Q4_K_M 22.13 GB. Ollama qwen3.6:27b is 18–19 GB; qwen3.6:latest is the 23–24 GB tag.
Checked:
Key fact: Granite 4.2-8B fits an 8 GB GPU at Q4. Granite 4.2-30B does not fit 16 GB.
How we got it: IBM GGUF repos: granite-4.2-8b Q4_K_M 5.35 GB, granite-4.2-30b Q4_K_M 17.72 GB.
Checked:
Key fact: Mellum2.1 Thinking is a 12B MoE with 2.5B active. Q4 is 9.2 GB, so a 12 GB GPU fits it and an 8 GB GPU does not. JetBrains has not published an Ollama tag.
How we got it: Card JetBrains/Mellum2.1-12B-A2.5B-Thinking, Apache-2.0, safetensors 12,149,923,072 parameters. Formula 12 × 0.5 × 1.2 + 2 = 9.2. Community Q4_K_M file Mellum2.1-12B-A2.5B-Thinking-Q4_K_M.gguf was 8,819,358,432 bytes (8.82 GB) on 11 October 2026. The official card still says Ollama and LM Studio builds are coming soon.
Checked:
Key fact: ColGrep-Agent-2B is a 2.52B code-search agent. Q8 is 5.0 GB and fits an 8 GB GPU. There is no ollama run tag.
How we got it: Safetensors BF16 total 2,516,756,480 on lightonai/colgrep-agent-2B, Apache-2.0. 2.51675648 × 1.2 + 2 = 5.02, shown as 5.0. Q4 is 3.5 GB. Q8_0 Content-Length on 2026-10-13 was 2,679,710,912 bytes. Command: colgrep --install-agent. LightOn’s own note is about 20 seconds per question on an M3 Pro. That figure is theirs.
Checked:
Key fact: Dory 1.0 4B at Q4 is 4.4 GB and fits an 8 GB GPU. Granite Switch 4.1 8B at Q4 is 7.3 GB and also fits 8 GB. There is no ollama run tag for either.
How we got it: Dory BF16 safetensors 3,975,229,440. 3.98 × 0.6 + 2 = 4.4. Granite Switch 8B safetensors 8,776,400,896. 8.78 × 0.6 + 2 = 7.3. Hugging Face, 17 October 2026. Dory GGUF Q5_K_M was 3,673,288,864 bytes. NVIDIA says use a llama.cpp fork.
Checked:
Methodology
explains the VRAM formula, the bytes per weight at each quantization, and the full source list.
Best local coding LLM by VRAM, sized with the site formula at Q4 and short context: Qwen3 8B (6.8 GB) on an 8 GB GPU, Qwen3 14B (10.4 GB) on 12 GB, Codestral 22B (15.2 GB) on 16 GB for fill-in-the-middle autocomplete, and Qwen3.6-27B (18.2 GB) or the code-specialized Qwen3-Coder 30B-A3B (20.3 GB) on 24 GB. These sizes are estimates, not benchmarks, and longer context needs more memory. Model cards and Ollama tags checked 10 November 2026. Mellum2.1 and ColGrep-Agent-2B, covered next, are narrower picks without an official Ollama tag. See the LFM and d1 hardware page, the Phi-4 hardware page, and the VRAM calculator.
Mellum2.1 on a 12 GB card
JetBrains published Mellum2.1-12B-A2.5B-Thinking as a 12B mixture-of-experts model with 2.5B active parameters, Apache-2.0, 131,072-token context. The safetensors count is 12,149,923,072 parameters. Our VRAM formula on 12B at Q4 is 12 × 0.6 + 2 = 9.2 GB, so the RTX 4070 and the Arc B580 fit it and an 8 GB RTX 4060 does not. Q8 is 12 × 1.2 + 2 = 16.4 GB, which misses a 16 GB card. A 24 GB card fits that Q8 estimate.
The model card still says official GGUF builds for Ollama and LM Studio are coming soon, so this page does not invent an ollama run tag. A community Q4_K_M file, bartowski/Mellum2.1-12B-A2.5B-Thinking-GGUF, was 8,819,358,432 bytes (8.82 GB) on 11 October 2026. In LM Studio, load that GGUF. Do not treat the file size as permission to run it on 8 GB: the formula, which includes runtime overhead, is 9.2 GB. The Gigabyte RTX 4070 (ASIN B0BZHCQ6PF) is the 12 GB card in the catalog. Liquid d1-3B is not a substitute coder. The card lists 3.12B parameters, Q4 is 3.9 GB, and the official local command is llama-server -hf LiquidAI/d1-3B-GGUF:Q8_0, then a POST to /v1/systemone. There is no ollama run tag for it on this page.
ColGrep-Agent-2B fits 8 GB
LightOn published ColGrep-Agent-2B on 12 October 2026. It is a code-search agent on MiniCPM5-2B, Apache-2.0, not a general chat model. The safetensors count is 2,516,756,480 parameters. The Hugging Face “3B” bucket is not the count this page uses. Q4 is 2.51675648 × 0.5 × 1.2 + 2 = 3.5 GB. Q8 is 2.51675648 × 1.2 + 2 = 5.0 GB. Both fit an 8 GB GPU, including the RTX 4060 and the RTX 4070. BF16 is 8.0 GB and is the edge of 8 GB. LFM2.5-24B-A2B Q4 is 16.4 GB and does not fit this 12 GB card.
On 13 October 2026 the Q8_0 file was 2,679,710,912 bytes and the Q4_K_M file was 1,561,318,592 bytes. The README calls the default Q8 approximately 2.5 GB; the byte count is the figure to quote. colgrep --install-agent downloads colgrep-agent-2B-Q8_0.gguf. Homebrew is brew install lightonai/tap/colgrep && colgrep --install-agent. A llama.cpp server is llama-server -m colgrep-agent-2B-Q8_0.gguf --port 8000 --special. There is no ollama run tag. LightOn’s own note is about 20 seconds per question on an M3 Pro, Metal, with a 3–4 GB peak. That is LightOn’s figure, not a measurement from this page. Ollama, Open WebUI, LM Studio, OpenHands, and Aider remain the local stack around it. Commercial agent products are a different product; this page does not size a GPU for them.
The fit depends on the formula. Qwen3 8B at Q4 is 6.8 GB and fits 8 GB. Qwen3 14B and Phi-4 14B are 10.4 GB and fit 12 GB. Codestral 22B is 15.2 GB and DeepSeek-Coder-V2 16B is 11.6 GB, so both fit 16 GB. Qwen3 32B is 21.2 GB and fits 24 GB. Llama 3.3 70B is 44 GB and does not fit 24 GB or 32 GB.
12 GB GPU: Qwen3 14B (10.4 GB) for general coding. Phi-4 14B (10.4 GB, MIT) is a reasoning-focused alternative; its card says its code coverage is mostly Python.
16 GB GPU: Codestral 22B for IDE autocomplete, DeepSeek-Coder-V2 16B for code generation
24 GB GPU: Qwen3.6-27B (18.2 GB) or the code-specialized Qwen3-Coder 30B-A3B (20.3 GB), whose cards highlight agentic coding and tool calling. Qwen3 32B (21.2 GB) is the general-purpose option.
64 GB unified or two 24 GB GPUs: Llama 3.3 70B — Q4 is 44 GB. It misses 24 GB and 32 GB.
Best Coding LLM Per GPU Tier
Sizes are the site formula at Q4_K_M and short context, not benchmarks. Ollama library tags for these models checked 10 November 2026.
VRAM figures are approximate at Q4_K_M quantization including KV cache headroom. Use the VRAM Calculator for exact sizes.
Model Details and Recommendations
Qwen3 8B
8 GB GPU6.8 GB at Q4
The best coding model for 8 GB GPUs. Surprisingly capable for completions and short code review tasks.
Strengths
+ Python, JS, TypeScript completions
+ Instruction-following quality above its size class
+ Fast enough for interactive autocomplete
Limitations
- Context window limits on large codebases
- Not ideal for complex multi-file refactors
Qwen3 14B
12 GB GPU10.4 GB at Q4
The sweet spot for most developers. Runs on a 12 GB GPU and handles the full coding workflow — autocomplete, chat, review, and debugging.
Strengths
+ Strong code generation across 20+ languages
+ Good at code review and explanation
+ Handles moderate-length context well
Limitations
- Slower than 8B for autocomplete latency
Phi-4 14B
12 GB GPU10.4 GB at Q4
A 14B reasoning model at 10.4 GB. It fits 12 GB. It does not fit 8 GB.
Strengths
+ 14B weights at the same 10.4 GB Q4 formula as Qwen3 14B
+ Fits a 12 GB GPU
+ Q8 is 18.8 GB and misses 16 GB
Limitations
- Less code-specialized than Codestral
- This page does not publish a new quality benchmark
Codestral 22B
16 GB GPU15.2 GB at Q4
Mistral's dedicated coding model. The best choice if IDE autocomplete is your primary use case.
Strengths
+ Best fill-in-the-middle (FIM) autocomplete
+ Code-specialized training across 80+ languages
+ Excellent for IDE integration via Continue.dev
Limitations
- Less capable for general chat vs Qwen3
- Needs 16 GB to run comfortably
DeepSeek-Coder-V2 16B
16 GB GPU11.6 GB at Q4
A solid code-specialized model that fits on 16 GB. Good alternative to Codestral if you want stronger algorithmic reasoning.
Strengths
+ Strong on Python, C++, and systems code
+ Good at algorithmic problems
+ Well-tested for code generation benchmarks
Limitations
- Less instruction-tuned than Qwen3 for general tasks
Qwen3 32B
24 GB GPU21.2 GB at Q4
The general-purpose 32B for a 24 GB GPU. For code-first work on the same card, compare Qwen3.6-27B and Qwen3-Coder 30B-A3B, which are smaller and code-focused.
Strengths
+ 32.8B parameters, Apache-2.0, per the Qwen card
+ Q4 is 21.2 GB by the site formula and fits 24 GB
+ Native context 32,768 tokens, or 131,072 with YaRN, per the card
Limitations
- Needs a 24 GB GPU such as the RTX 4090
- Long context adds KV cache beyond the formula estimate
Qwen3-Coder 30B-A3B
24 GB GPU20.3 GB at Q4
The code-specialized option for a 24 GB GPU. It is sized as a 30.5B model even though only 3.3B parameters are active per token.
Strengths
+ Code-specialized MoE: 30.5B total and 3.3B activated, per the Qwen card
+ Apache-2.0. ollama run qwen3-coder:30b, listed at 19GB on 10 November 2026
Limitations
- All experts stay in memory, so size it on the total: 30.5 × 0.5 × 1.2 + 2 = 20.3 GB
- Misses a 16 GB GPU at Q4
- Long context adds KV cache beyond the formula estimate
Llama 3.3 70B
64 GB unified, or two 24 GB GPUs44 GB at Q4
The 70B tag is 44 GB at Q4. Use it when the machine has 64 GB unified memory or two 24 GB GPUs.
Strengths
+ 70 × 0.5 × 1.2 + 2 = 44 GB
+ ollama run llama3.3:70b is the library tag
+ Fits 64 GB unified memory after a macOS reserve
Limitations
- Does not fit a 24 GB GPU
- Does not fit a 32 GB GPU
Use-Case Matrix
A rough shortlist by task. These ratings are not benchmark results, and this site did not run the models to produce them. Treat them as a starting point and check each model card.
Use Case
Qwen3 8B
Qwen3 14B
Codestral 22B
DSC-V2 16B
Phi-4 14B
Llama 3.3 70B
Autocomplete (FIM)
Good
Very Good
Excellent
Very Good
Good
Very Good
Chat / Q&A
Very Good
Excellent
Good
Very Good
Excellent
Excellent
Code Review
Good
Very Good
Good
Very Good
Very Good
Excellent
Agentic (multi-file)
Fair
Good
Fair
Good
Good
Excellent
Debugging
Good
Very Good
Good
Very Good
Very Good
Excellent
Refactoring
Good
Very Good
Good
Very Good
Very Good
Excellent
Ollama Commands
Install Ollama from ollama.com. Each command below downloads and runs the model automatically on first use.
ollama run qwen3:8b6.8 GBFits an 8 GB GPU. 8 × 0.5 × 1.2 + 2.
ollama run qwen3:14b10.4 GBFits 12 GB. Misses 8 GB.
ollama run phi410.4 GBSame 14B Q4 formula. Fits 12 GB.
ollama run qwen3:32b21.2 GBFits 24 GB. Misses 16 GB.
ollama run llama3.3:70b44 GB70 × 0.5 × 1.2 + 2. Misses 24 GB and 32 GB.
Once Ollama is running, it exposes an OpenAI-compatible API at http://localhost:11434/v1 — use this URL in any IDE extension or coding tool.
IDE and Tool Integration
These tools connect to your local Ollama instance to bring coding assistance into your editor — no cloud API required.
Continue.dev
VS Code and JetBrains extension that connects to Ollama for inline autocomplete and chat. The closest open-source GitHub Copilot replacement. Supports FIM autocomplete with Codestral.
Best models: Codestral 22B (autocomplete), Qwen3 14B (chat)
Setup: Install Continue extension → set provider to Ollama → select model.
Aider
Terminal-based agentic coding tool. Reads your codebase, makes multi-file edits, and commits changes. Works with Ollama via the OpenAI-compatible API endpoint.
Best models: Qwen3 32B or Llama 3.3 70B for complex agentic tasks
Cursor supports custom OpenAI-compatible endpoints. Point it at your Ollama server to use local models for chat and inline edits while keeping your code off cloud servers.
Best models: Qwen3 32B or DeepSeek-Coder-V2 16B
Setup: Cursor Settings → Models → Add Model → set base URL to http://localhost:11434/v1
VS Code + Ollama API
Any VS Code extension that supports OpenAI-compatible APIs (CodeGPT, Codeium local, etc.) can connect to Ollama running locally. No cloud dependency, no API key required.
Best models: Qwen3 14B for chat, Codestral for autocomplete
Setup: Set API base to http://localhost:11434/v1 and API key to "ollama" (any string).
Open-weight coding models: Qwen3.6, Qwen3-Coder and Granite
Hosted coding agents (Copilot, Cursor, Claude) are a different product from the weights below. Qwen3.6 is Alibaba’s Apache-2.0 checkpoint on Hugging Face, not a Qwen cloud seat. Granite 4.2 is IBM’s Apache-2.0 model, not a watsonx subscription. Both run in Ollama or LM Studio once the file fits.
Qwen3.6-27B is a 27B dense model, Apache-2.0, with 262,144 tokens of native context, and its card leads with agentic coding. Formula 18.2 GB at Q4, so it fits 24 GB and misses 16 GB. Command: ollama run qwen3.6:27b, listed at 18GB to 19GB on 10 November 2026. Qwen3.6-35B-A3B is 35B total with 3B activated. Formula 23.0 GB, so it is tight on 24 GB and does not belong on the 16 GB tier. ollama run qwen3.6 pulls the latest tag, which Ollama listed as the 35b tag at 23GB. Qwen3-Coder 30B-A3B is the code-specialized option for the same 24 GB card: 30.5B total, 3.3B activated, formula 20.3 GB, command ollama run qwen3-coder:30b, listed at 19GB.
Granite figures in this paragraph were checked 5 October 2026. Granite 4.2-8B Q4_K_M is 5.35 GB, so an 8 GB card fits the file and the 6.8 GB formula at a short context. Q8_0 is 9.35 GB and wants 12 GB. Granite 4.2-30B Q4_K_M is 17.72 GB and does not fit 16 GB. Use ollama run granite4.2:8b or, on 24 GB, ollama run granite4.2:30b. In LM Studio, download the same Q4_K_M GGUF. That 12 GB card fits Granite 4.2-8B, including the Q8 file. It does not fit Qwen3.6-27B at 18.2 GB.
It depends on your VRAM. By the site formula at Q4 and short context: Qwen3 8B (6.8 GB) on 8 GB, Qwen3 14B (10.4 GB) on 12 GB, Codestral 22B (15.2 GB) on 16 GB for fill-in-the-middle autocomplete, and Qwen3.6-27B (18.2 GB) or the code-specialized Qwen3-Coder 30B-A3B (20.3 GB) on 24 GB. Llama 3.3 70B is 44 GB and does not fit 24 GB or 32 GB. These sizes are estimates, not benchmarks, and longer context needs more memory.
Can I use a local LLM as a GitHub Copilot replacement?
Yes. Tools like Continue.dev (VS Code/JetBrains extension) connect to Ollama and provide inline autocomplete and chat, similar to GitHub Copilot but running on your machine. On this page, Codestral 22B (16 GB) is the autocomplete pick because its card documents fill-in-the-middle, and Qwen3 14B (12 GB) is the chat pick. Aider also works with Ollama for agentic coding workflows. Response time depends on your GPU, the model and the context length; this page does not publish a latency figure.
What VRAM do I need for a coding LLM?
Qwen3 8B at Q4 is 6.8 GB and fits an 8 GB GPU. Qwen3 14B and Phi-4 14B are 10.4 GB and fit 12 GB. DeepSeek-Coder-V2 16B at Q4 is 16 × 0.5 × 1.2 + 2 = 11.6 GB and fits 16 GB. Codestral 22B at Q4 is 15.2 GB and fits 16 GB. Qwen3 32B is 21.2 GB and fits 24 GB. Llama 3.3 70B is 44 GB and does not fit a 24 GB or 32 GB GPU.
Is Codestral better than Qwen3 for coding?
Codestral 22B is a 22B code model from Mistral, trained on 80+ programming languages, and its card documents fill-in-the-middle (FIM) completion, which is what IDE autocomplete uses. It is released under the MNLP-0.1 license rather than Apache-2.0, so read the license before using it for work. Qwen3 14B and 32B are general-purpose Apache-2.0 models, and Qwen3-Coder 30B-A3B is the Apache-2.0 code model for 24 GB. This page does not publish a head-to-head benchmark: pick Codestral for FIM autocomplete on 16 GB, and Qwen3 or Qwen3-Coder for chat-based coding help.
How do I connect a local LLM to VS Code for coding?
Install Ollama and pull your chosen model (e.g. "ollama run qwen3:14b"). Then install the Continue.dev extension in VS Code. In Continue's settings, set the provider to Ollama and select your model. This gives you inline autocomplete and a chat panel — similar to GitHub Copilot but running entirely on your machine. For agentic coding (multi-file edits), use Aider with the Ollama backend instead.
Can DeepSeek-Coder-V2 run on a 16 GB GPU?
Yes, at Q4. 16 × 0.5 × 1.2 + 2 = 11.6 GB, which fits a 16 GB GPU such as an RTX 4060 Ti 16GB. Q8 is 16 × 1.2 + 2 = 21.2 GB and misses 16 GB. Run the Q4 tag with ollama run deepseek-coder-v2:16b.
What is the best coding LLM for CPU-only (no GPU)?
Qwen3 8B at Q4 is 6.8 GB, so a CPU box needs that much free RAM plus the OS. Phi-4 14B is 10.4 GB. An 8 GB GPU such as the RTX 4060 fits the 6.8 GB estimate.
Model parameter counts, context lengths and the VRAM estimates above come from model cards and the site VRAM formula. The full sitewide methodology is documented on the methodology page. The three sources that did most of the work for this guide:
Hugging Face Hub. Parameter counts, context lengths and tokenizer details for every coding model recommended.
Ollama. The runtime that ships pre-packaged GGUFs of Qwen2.5-Coder, DeepSeek-Coder and Codestral.
Spot a number that does not match the linked source? Contact us and we will update the guide.
We use cookies and personalised ads
This site uses cookies and shows personalised ads via Google AdSense. We and our partners store and access information on your device to serve relevant ads and improve your experience.
You can accept all cookies, decline (non-personalised ads only), or
manage preferences.
See our Privacy Policy.
We use Google Analytics
This site would like to use Google Analytics to understand how visitors use the site. If you accept, Google Analytics will load. If you decline, or if you make no choice, Google Analytics will not load. No ads are shown on this visit.
See our Privacy Policy and Cookie Policy.
Cookie preferences
Choose which cookies you allow. Strictly necessary cookies are always active.
Strictly necessary
Session state, security, and performance. Cannot be disabled.