Best local LLMs for coding: 10 models by memory tier
14 min read
The best local LLM for coding at 16, 24, 32, 48 and 64 GB: 10 current models with licence, size, context, tool calling, a dated benchmark and the Ollama tag.
The best local LLM for coding on most developer machines is Qwen3.8-27B. It is an 18 GB download under Apache 2.0, it calls tools, it holds 256K tokens of context, and it belongs on a 24 GB GPU or a 32 GB Mac. On 16 GB use gpt-oss-20b or the 9B MiMo-V2.6 distil. From 64 GB use Ripple-65B Preview.
All ten models below have a local tag and a tool-calling badge in the Ollama library, and open weights on Hugging Face. Every figure was read on 15 November 2026.
Model | Best for | Parameters | Download (4-bit) | Context | Licence | Tools | Coding score (vendor's own) | Ollama tag |
|---|---|---|---|---|---|---|---|---|
Qwen3.8-27B | Best overall, 24 GB GPU or 32 GB Mac | 27B dense | 18 GB | 256K | Apache 2.0 | Yes | Terminal-Bench 2.1 73.0; SWE-bench Pro 61.7 |
|
Muse Glimmer-30B | Tool-heavy agent work on one 24 GB GPU | 29.6B | 17 to 18 GB | 128K | Apache 2.0 | Yes | SWE-bench Verified 76.0 |
|
Qwen3.6-27B | Highest SWE-bench Verified score in this list | 27B | 17 to 19 GB | 256K | Apache 2.0 | Yes | SWE-bench Verified 77.2 |
|
Devstral Small 2 | A 24 GB GPU with room left for context | 24B | 15 GB | 256K | Apache 2.0 | Yes | SWE-bench Verified 68.0 |
|
Flint | Fast generation on a 48 GB machine | 39.8B, about 2.5B active | 23 GB | 256K | Apache 2.0 | Yes | SWE-bench Verified 74.2 |
|
gpt-oss-20b | 16 GB machines | 21B, 3.6B active | 14 GB | 128K | Apache 2.0 | Yes | SWE-bench Verified 60.7 (high effort) |
|
MiMo-V2.6-Distill-Qwen-9B | 16 GB laptops that need room for context | 9B | 6.6 GB | 256K | MIT | Yes | SWE-bench Verified 61.1 |
|
Gemma 4 12B | 16 GB with image and audio input | 12B | 7.7 to 8.0 GB | 256K | Apache 2.0 | Yes | LiveCodeBench v6 72.0; no SWE-bench score published |
|
Ripple-65B Preview | 64 GB and above | 65B dense | 39 to 46 GB | 1M | Apache 2.0 | Yes | Terminal-Bench 2.1 80.5; SWE-bench Verified 76.5 |
|
Nemotron 3.5 Super | A 128 GB workstation or a shared server | 120B, 12B active | 80 to 90 GB | 1M | OpenMDW 1.1 | Yes | SWE-bench Verified 71.10 |
|
How to read the table
The scores are the vendors' own. Each lab picks its harness, reasoning effort and benchmark version. Compare models only on the same benchmark, and treat a gap of a point or two as a tie.
No vendor publishes memory at 64K context. Ollama's guides for Claude Code, OpenCode and Codex all ask for at least 64K tokens, and a longer context uses more memory. Where a vendor names target hardware, the entry quotes it. Where it does not, the entry gives a planning tier: the smallest common memory size that leaves several GB above the download. Confirm on your machine that ollama ps shows 100% GPU.
Ollama starts with a short context. Its default is 4K tokens below 24 GiB of VRAM, 32K from 24 to 48 GiB and 256K from 48 GiB. The steps to raise it are in the guides for Claude Code with Ollama, OpenCode with Ollama and Codex with Ollama.
1. Qwen3.8-27B
Best for: the best all-round coding model on a 24 GB GPU or a 32 GB Mac.
Parameters: 27B, dense. Every parameter runs on every token.
Licence: Apache 2.0.
Download: 18 GB at Q4_K_M, 30 GB at Q8.
Context window: 262,144 tokens native. Qwen says it extends to 1M.
Memory at 64K context: not published. Plan for a 24 GB GPU or a 32 GB Mac.
Tool calling: yes. Thinking is on by default and can be turned off per request.
Coding benchmark: Terminal-Bench 2.1 73.0, SWE-bench Pro 61.7, LiveCodeBench v6 90.3. Vendor's own, from the Qwen model card for the August 2026 release. Qwen publishes no SWE-bench Verified score for it.
Where to get it:
ollama pull qwen3.8:27b, orQwen/Qwen3.8-27Bon Hugging Face.
Qwen ran SWE-bench Pro through the Claude Code harness, and scores Muse Glimmer-30B at 51.2 in the same table.
2. Muse Glimmer-30B
Best for: agent work with many tool calls on a single 24 GB GPU.
Parameters: 29.6B, including a vision encoder.
Licence: Apache 2.0.
Download: 18 GB at Q4_K_M, 17 GB at NVFP4.
Context window: 131,072 tokens.
Memory at 64K context: Meta targets 24 GB of VRAM for its 17 GB build and 32 GB for its dynamic build, with the context cache inside that figure.
Tool calling: yes.
Coding benchmark: SWE-bench Verified 76.0, SWE-bench Pro 51.2, Terminal-Bench 2.1 51.7. Vendor's own, from Meta's model card for the August 2026 release.
Where to get it:
ollama pull muse-glimmer:30b, ormeta-models/Muse-Glimmer-30B.
Meta is the only vendor here that publishes speed and quantisation loss. The 17 GB build loses 1.0% across 15 benchmarks and generates 74.9 tokens per second on an RTX 5090, or 23.7 on an Apple M4 Max, before speculative decoding. On MCP Atlas, a tool-use benchmark, Meta reports 75.5 against 62.5 for Qwen3.6-27B.
3. Qwen3.6-27B
Best for: the highest vendor-reported SWE-bench Verified score in this list.
Parameters: 27B.
Licence: Apache 2.0.
Download: 17 to 19 GB, depending on the 4-bit build.
Context window: 262,144 tokens native.
Memory at 64K context: not published. Plan for a 24 GB GPU or a 32 GB Mac.
Tool calling: yes.
Coding benchmark: SWE-bench Verified 77.2, SWE-bench Pro 53.5, Terminal-Bench 2.0 59.3. Vendor's own, from the Qwen model card for the April 2026 release.
Where to get it:
ollama pull qwen3.6:27b, orQwen/Qwen3.6-27B.
In Qwen's own table Qwen3.8-27B beats it on every coding benchmark. It stays in the list because Qwen publishes a SWE-bench Verified score for it and not for Qwen3.8. Its sibling qwen3.6:35b has 3B active parameters, a 23 GB download and 73.4 on SWE-bench Verified.
4. Devstral Small 2
Best for: a 24 GB GPU with room left for context.
Parameters: 24B.
Licence: Apache 2.0.
Download: 15 GB at Q4_K_M.
Context window: 256K on Mistral's card. Ollama lists 384K.
Memory at 64K context: Mistral says it runs on "a single RTX 4090 or a Mac with 32GB RAM". It gives no figure for 64K.
Tool calling: yes. Ollama lists tools and vision for it, and no thinking mode.
Coding benchmark: SWE-bench Verified 68.0%. Vendor's own, from Mistral's model card for the December 2025 release. Ollama's page still shows an earlier 65.8%.
Where to get it:
ollama pull devstral-small-2:24b, ormistralai/Devstral-Small-2-24B-Instruct-2512.
It is the oldest model here, and 3 GB smaller than the 27B to 30B models. On a 24 GB card that 3 GB goes to context.
5. Flint
Best for: fast generation on a 48 GB machine.
Parameters: 39.8B mixture-of-experts, about 2.5B active per token.
Licence: Apache 2.0.
Download: 23 GB at INT4 or NVFP4.
Context window: 262,144 tokens.
Memory at 64K context: not published. Recursive recommends at least 48 GB of GPU memory for the NVFP4 build at the full 262K context.
Tool calling: yes. Text only.
Coding benchmark: SWE-bench Verified 74.2%, Terminal-Bench 2.1 54.9%. Vendor's own, from Recursive's model card of 21 October 2026. Recursive also reports 89.7% on SWE-bench Pro v2, which is a different benchmark version from the SWE-bench Pro scores above.
Where to get it:
ollama pull flint:40b, orRecursiveSI/flint.
Flint runs the fewest parameters per token of any model here, the main driver of generation speed. Recursive publishes no tokens-per-second figure.
6. gpt-oss-20b
Best for: 16 GB machines.
Parameters: 21B mixture-of-experts, 3.6B active per token.
Licence: Apache 2.0.
Download: 14 GB. OpenAI ships it in MXFP4, a 4.25-bit format.
Context window: 128K.
Memory at 64K context: OpenAI says it runs "within 16GB of memory" and gives no figure for 64K. The download leaves 2 GB on a 16 GB machine, so 24 GB is more comfortable.
Tool calling: yes.
Coding benchmark: SWE-bench Verified 60.7 at high reasoning effort and 53.2 at medium; Aider Polyglot 34.2 at high. Vendor's own, from OpenAI's model card of August 2025, measured on the MXFP4 weights.
Where to get it:
ollama pull gpt-oss:20b, oropenai/gpt-oss-20b.
The larger gpt-oss:120b is a 65 GB download that OpenAI sizes for one 80 GB GPU. It scores 62.4 on SWE-bench Verified at high effort.
7. MiMo-V2.6-Distill-Qwen-9B
Best for: 16 GB laptops that need room for context.
Parameters: 9B. Xiaomi fine-tuned it from Qwen3.5-9B.
Licence: MIT. Xiaomi's card adds a use-restrictions notice.
Download: 6.6 GB at Q4_K_M.
Context window: 256K.
Memory at 64K context: not published. Plan for 16 GB.
Tool calling: yes.
Coding benchmark: SWE-bench Verified 61.1, SWE-bench Pro 44.6, Terminal-Bench 2.1 37.1. Vendor's own, from Xiaomi's model card for the September 2026 release.
Where to get it:
ollama pull mimo-v2.6:9b, orXiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B.
On Xiaomi's numbers it matches gpt-oss-20b on SWE-bench Verified at under half the download, from a different harness.
8. Gemma 4 12B
Best for: 16 GB machines that also need image and audio input.
Parameters: 12B.
Licence: Apache 2.0.
Download: 7.7 to 8.0 GB.
Context window: 256K.
Memory at 64K context: not published. Plan for 16 GB.
Tool calling: yes, native function calling.
Coding benchmark: LiveCodeBench v6 72.0%. Vendor's own, from Google's model card, which has no SWE-bench score. LiveCodeBench measures contest problems, so this number does not compare with the others.
Where to get it:
ollama pull gemma4:12b, orgoogle/gemma-4-12b-it.
9. Ripple-65B Preview
Best for: 64 GB and above.
Parameters: 65B, dense.
Licence: Apache 2.0.
Download: 39 GB at Q4_K_M, 46 GB at NVFP4.
Context window: up to 1,048,576 tokens.
Memory at 64K context: not published. Ricursive says it fits "consumer hardware such as the NVIDIA DGX Spark".
Tool calling: yes. Text only.
Coding benchmark: Terminal-Bench 2.1 80.5, SWE-bench Verified 76.5, SWE-bench Pro v1.0 61.42. Vendor's own, from Ricursive Intelligence's model card of November 2026, measured at full BF16 precision.
Where to get it:
ollama pull ripple-preview:65b, orricursiveAI/Ripple-65B-Preview.
It is a preview with light post-training, published on 4 November 2026, and the scores are for full precision, not the 4-bit build.
10. Nemotron 3.5 Super
Best for: a 128 GB workstation or a shared server that needs image input and a very long context.
Parameters: 120B mixture-of-experts, 12B active per token.
Licence: OpenMDW 1.1. Read it before commercial use; it is not Apache 2.0.
Download: 80 GB at NVFP4, 90 GB at Q4_K_M.
Context window: up to 1M tokens.
Memory at 64K context: not published. NVIDIA lists one DGX Spark, one RTX PRO 6000, one H200 or two H100 for the NVFP4 build.
Tool calling: yes.
Coding benchmark: SWE-bench Verified 71.10, SWE-bench Pro 51.78, Terminal-Bench 2.1 60.67. Vendor's own, from NVIDIA's model card of 15 October 2026.
Where to get it:
ollama pull nemotron-3.5-super:120b, ornvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16.
On the vendors' numbers Ripple scores higher on SWE-bench Verified at about half the size. Nemotron 3.5 Super adds image input and NVIDIA's published serving recipes.
Which one for your hardware
Memory means unified memory on a Mac and VRAM on a GPU.
Memory | Start with | Then try | Note |
|---|---|---|---|
16 GB |
|
| Only the 7 to 8 GB models leave room for 64K context |
24 GB |
|
| An 18 GB model fits; context gets squeezed |
32 GB |
|
| Headroom above an 18 GB model for context |
48 GB |
|
| A faster model, or higher precision |
64 GB and above |
|
| The vendors' coding scores do not rise with size here |
Models that do not fit on a desk
The largest open-weight coding models are in the Ollama library as cloud tags only, including GLM-5.3, Kimi K3.1 Pro and DeepSeek V4.1 Flash. A cloud tag runs on a provider's servers. If that is acceptable for your code, see the guides for Claude Code with GLM, Claude Code with Kimi and Claude Code with DeepSeek.
How we chose
We read the Ollama library filtered to tool-calling models on 15 November 2026, then the Hugging Face card for each candidate. A model made the list if it met five tests:
A local tag on Ollama, not only a cloud tag.
Ollama's tools badge, because coding agents work through tool calls.
A context window of at least 128K.
A coding benchmark on the publisher's model card.
Weights on Hugging Face under a licence stated on the card.
We kept one model per job and left out models that a newer release from the same lab has replaced, such as Qwen3-Coder 30B. We did not run them. Every number is the publisher's.
Serving one model to a team
This list suits one developer choosing for one machine. In a team, each developer pulls a different model, and nobody can say where a request ran.
Aventail™ Link is an inference engine and gateway that runs on each machine and serves GGUF language models. Aventail™ Control for Enterprise manages which models go to which devices. It gives a team one model in two ways:
The same model on every laptop. A fleet configuration lists the models and whether devices serve them. You publish a revision and apply it in stages. A new device receives the latest revision when it enrols.
One larger model on a shared machine. A server running Link can serve other devices. A routing rule on each laptop names that server and the exact model as its destination. Peer routing is in beta. Each request runs on one machine; Link does not pool machines.
Aventail™ Connect then points Claude Code, OpenCode or Codex at Link, with no endpoint or key to type. Claude Code needs at least 64K context through Connect, and Link warns below 128K. The plan is in local AI for a development team. The Free plan covers three connected devices.
Frequently asked questions
What is the best local LLM for coding?
Qwen3.8-27B for a 24 GB GPU or a 32 GB Mac. It reports 73.0 on Terminal-Bench 2.1 and 61.7 on SWE-bench Pro from an 18 GB download under Apache 2.0.
What is the best Ollama model for coding on 16 GB?mimo-v2.6:9b or gemma4:12b if you want room for a 64K context, and gpt-oss:20b if you can give the model almost all of the memory.
How much RAM or VRAM do I need for a local coding model?
16 GB runs a 9B to 20B model. 32 GB runs the 27B to 30B models with room for context. 64 GB and above runs the 65B and 120B models.
Can a local model run Claude Code or OpenCode?
Yes, if it supports tool calling and has a 64K context. Setup is in the guides for Claude Code with Ollama and OpenCode with LM Studio.
Does 4-bit quantisation hurt coding quality?
A little, where vendors measure it. Meta reports a 1.0% average loss for its 17 GB build of Muse Glimmer. OpenAI ran every gpt-oss benchmark on the 4-bit weights it ships. Ricursive's scores are for full precision, and most cards do not say.
Are local coding models as good as Claude or GPT?
Close on some vendor tables and behind on others. Qwen lists Opus 4.6 Max at 78.2 on Terminal-Bench 2.1 against 73.0 for Qwen3.8-27B. Mistral lists Claude Sonnet 4.5 at 77.2 on SWE-bench Verified against 68.0 for Devstral Small 2. A team that needs both can route between local models and cloud APIs.
Related guides
Claude Code + LM Studio
Sources
Ollama library, tool-calling models: https://ollama.com/search?c=tools
Ollama library pages and tag lists: qwen3.8, muse-glimmer, qwen3.6, devstral-small-2, flint, gpt-oss, mimo-v2.6, gemma4, ripple-preview, nemotron-3.5-super (https://ollama.com/library/qwen3.8 and the same path for each name)
Ollama, Context length: https://docs.ollama.com/context-length
Ollama, Claude Code, OpenCode and Codex integrations: https://docs.ollama.com/integrations/claude-code, https://docs.ollama.com/integrations/opencode, https://docs.ollama.com/integrations/codex
Qwen, Qwen3.8-27B model card: https://huggingface.co/Qwen/Qwen3.8-27B
Qwen, Qwen3.6-27B and Qwen3.6-35B-A3B model cards: https://huggingface.co/Qwen/Qwen3.6-27B and https://huggingface.co/Qwen/Qwen3.6-35B-A3B
Meta, Muse Glimmer-30B model card: https://huggingface.co/meta-models/Muse-Glimmer-30B
Mistral AI, Devstral Small 2 model card: https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512
Recursive, Flint model card and NVFP4 GGUF card: https://huggingface.co/RecursiveSI/flint and https://huggingface.co/RecursiveSI/flint-nvfp4-gguf
OpenAI, gpt-oss-20b model card: https://huggingface.co/openai/gpt-oss-20b
OpenAI, gpt-oss model card (PDF, August 2025): https://cdn.openai.com/pdf/419b6906-9da6-406c-a19d-1bb078ac7637/oai_gpt-oss_model_card.pdf
Xiaomi MiMo, MiMo-V2.6-Distill-Qwen-9B model card: https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B
Google, Gemma 4 12B model card: https://huggingface.co/google/gemma-4-12b-it
Ricursive Intelligence, Ripple-65B Preview model card: https://huggingface.co/ricursiveAI/Ripple-65B-Preview
NVIDIA, Nemotron 3.5 Super VL model cards (BF16 and NVFP4): https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 and https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4
Aventail™, Connect overview: https://docs.aventail.co.uk/docs/connect/overview
Aventail™, Fleet configuration: https://docs.aventail.co.uk/docs/fleet/config-and-rollouts
Aventail™, Routing: https://docs.aventail.co.uk/docs/fleet/routing
Aventail™, Compatibility and versions: https://docs.aventail.co.uk/docs/introduction/versions-and-supported-models
Aventail™, Pricing: https://aventail.co.uk/#pricing
All sources were read on 15 November 2026.