VRAMNeeded Calculator

Best local LLMs for coding by VRAM (8 to 32 GB)

These are the coding-tuned open models we've built full VRAM guides for: Qwen2.5-Coder 7B, 14B and 32B, and Mistral's Devstral Small 2 (24B). For each VRAM size you get the largest one that fits comfortably and the exact command to run it. General models also write code; see the best Ollama models by GPU for those.

How we pick: a model counts as fitting when its Q4_K_M GGUF file plus an 8K-token FP16 KV cache uses no more than 90% of the memory, the same rule as our calculator and comparison table. File sizes are the exact bytes on Hugging Face and the KV cache comes from each model's config.json; each model page lists its sources. Ollama tags were checked on each model's Ollama library tags page and the LM Studio repo is the Hugging Face GGUF repo the size comes from (search it in LM Studio's model search). Checked 2026-11-03.

No benchmark scores here. We haven't sourced comparable coding or chat benchmark results for every model, so we don't rank on quality. Within a tier we list the biggest model that fits first, because more parameters usually means better answers, but that's a rule of thumb, not a test result.

8 GB GPU

Pick: Qwen2.5-Coder 7B, about 5.2 GB at Q4_K_M with an 8K context. Ollama: ollama run qwen2.5-coder:7b-instruct-q4_K_M.

Model Q4_K_M file Needed at 8K context Ollama tag GGUF repo for LM Studio
Qwen2.5-Coder 7B 4.7 GB 5.2 GB qwen2.5-coder:7b-instruct-q4_K_M bartowski/Qwen2.5-Coder-7B-Instruct-GGUF

12 GB GPU

Pick: Qwen2.5-Coder 14B, about 10.6 GB at Q4_K_M with an 8K context. Ollama: ollama run qwen2.5-coder:14b-instruct-q4_K_M.

16 GB GPU

Pick: Qwen2.5-Coder 14B, about 10.6 GB at Q4_K_M with an 8K context. Ollama: ollama run qwen2.5-coder:14b-instruct-q4_K_M.

24 GB GPU

Pick: Devstral Small 2 24B, about 15.7 GB at Q4_K_M with an 8K context. Ollama: ollama run devstral-small-2:24b-instruct-2512-q4_K_M.

32 GB GPU

Pick: Qwen2.5-Coder 32B, about 22.0 GB at Q4_K_M with an 8K context. Ollama: ollama run qwen2.5-coder:32b-instruct-q4_K_M.

Last checked: