Best local LLM for coding, by how much memory you have

Short answer: on a 24 GB card, Qwen3.8 27B at Q5; on 16 GB, gpt-oss-20b; on 12 GB, Ministral 3 14B at Q4; on a 128 GB Mac, Qwen3.5 122B-A10B. Full table below.

Picks are our editorial choice based on what each maker says the model is built for (coding, agentic coding) and its size; they are not benchmark results.

For coding assistants inside your editor, pair the model with a local server (Ollama or LM Studio) and an extension that supports local OpenAI-compatible endpoints.

Questions

What is the best local coding model for 24 GB VRAM?

Our pick is Qwen3.8 27B at Q5_K_M (about 23 GB by our estimate); Qwen describes it as built for coding and agent tasks.

Can I run a coding model on a laptop?

Yes, small models such as Qwen3.5 9B or Qwen3 4B run on 16 GB RAM laptops, slowly without a GPU.

Memory figures are our estimates (parameters × bits ÷ 8, plus overhead and an 8K-token cache; method). Facts about apps come from their official documentation, checked November 30, 2026.

More local-AI guides

Which LLM runs on my GPU, Mac or laptop? · All open-source models