# What is the best coding model you can run on one GPU? On 24GB, Qwen3.8 27B

The short answer for a 3090, 4090 or any 24GB card, what changes on 16GB and 12GB, the fast MoE alternatives, and the honest limits of every benchmark number, re-checked on each vendor's own page Nov 6, 2026.

Updated Nov 17, 2026 · By Ari Vale

This page has referral links: we earn a commission if you buy, at no cost to you.

Our Vast referral code: 623346 (link: https://cloud.vast.ai/?ref_id=623346). New users get no bonus from it; we earn 3% of what referred users spend (Vast's referral program docs: https://docs.vast.ai/guides/reference/referral-program?ref_id=623346).

**The best coding model you can run on one GPU is Qwen3.8 27B, on a 24GB card.** On our VRAM numbers it fits an RTX 3090, 4090 or any 24GB card at Q5_K_M with 32K tokens of context in about 21.2 GB, and Qwen's own model card reports 61.7 on SWE-bench Pro and 73.0 on Terminal Bench 2.1 for it. If you want faster replies, run a 30B mixture-of-experts coder instead: **Qwen3-Coder 30B-A3B** or Cohere's **North Mini Code**. On 16GB, Qwen3.8 27B only fits at a 3-bit quant. Every fact here was re-read on the vendor's own page on Nov 6, 2026.

## The short answer (re-checked Nov 6, 2026)

On one 24GB GPU, the best local coding model in November 2026 is Qwen3.8 27B, a dense Apache-2.0 model with a 262,144-token native context. It fits at Q5_K_M with 32K context in about 21.2 GB, or Q4_K_M with 64K in about 20.5 GB, on aliteq's VRAM engine. Qwen reports 61.7 on SWE-bench Pro, ahead of Qwen3.6 27B's 53.5 on the same table. For speed, Qwen3-Coder 30B-A3B (3.3B active per token) and North Mini Code (3B active) fit at Q4_K_M with 32K context in about 21.0 GB and 19.4 GB. Devstral Small 2 (24B) is Mistral's agentic coder; Mistral says it runs on a single RTX 4090. On 16GB, use Qwen3.8 27B at a 3-bit quant or gpt-oss-20b. On 12GB, a 9B to 14B model.

- **24GB (3090, 4090):** Qwen3.8 27B at Q5_K_M, 32K context, about 21.2 GB
- **Faster on 24GB:** Qwen3-Coder 30B-A3B or North Mini Code, MoE with about 3B active per token
- **Agentic tools:** Devstral Small 2, 68.0 on SWE-bench Verified per Mistral
- **16GB:** Qwen3.8 27B only at Q3_K_M with 8K context (about 13.9 GB)
- **Benchmarks are each lab's own:** different harnesses, so they don't rank the models against each other

## What is the best coding model for a 24GB GPU?

Qwen3.8 27B. It is the newest Qwen dense model in the size that fits a single 24GB card with room for real context, and Qwen's own benchmark table puts it ahead of its previous 27B by a clear margin on agentic coding.

What Qwen's [model card](https://huggingface.co/Qwen/Qwen3.8-27B) says, read Nov 6, 2026:

- **Size and licence.** "Number of Parameters: 27B", "Context Length: 262,144 natively and extensible up to 1,000,000 tokens", "License: apache-2.0".
- **What it's built for.** "Qwen3.8 delivers substantial gains across coding, professional work, research, and long-horizon agentic tasks."
- **Thinking.** "Thinking mode is on by default and can be disabled per request". It also reads images and video.
- **The coding scores.** 61.7 on SWE-bench Pro and 73.0 on Terminal Bench 2.1 (Terminus), against 53.5 and 63.4 for Qwen3.6 27B in the same table. If you already run the older model, our [Qwen3.6 27B local guide](https://aliteq.com/run-qwen3-6-27b-locally) has its setup. For SWE-bench Pro, the card's note says that except for Opus4.6 Max "all models are evaluated with the Claude Code harness at temp=1.0, top_p=0.95, and a 256K context window."

![Screenshot of the Qwen3.8-27B model card's Text Performance table on Hugging Face: columns Qwen3.8-27B, Qwen3.6-27B, Qwen3.7-Plus, Muse Glimmer-30B and Opus4.6 Max. Terminal Bench 2.1 row: 73.0, 63.4, 64.0, 51.7, 78.2. SWE-bench Pro row, outlined: 61.7, 53.5, 57.6, 51.2, 53.4. NL2Repo-Bench row: 42.3, 36.2, 41.1, no result, 47.6](https://media.aliteq.com/media/ai/qwen3-8-27b-coding-bench-2026-11-06.jpg)
Qwen's own coding table for Qwen3.8 27B, read Nov 6, 2026. These are vendor-reported scores; we did not run them. · Screenshot of huggingface.co/Qwen/Qwen3.8-27B by aliteq

Why it fits: only 16 of its 64 layers keep a growing [KV cache](https://aliteq.com/what-is-a-context-window); the other 48 use linear attention with a small fixed state. So adding context costs little memory for a model this size. Full numbers by quant are on [cost to run Qwen3.8 27B](https://aliteq.com/cost-to-run/qwen3.8-27b) and in our [Qwen3.8 27B hardware guide](https://aliteq.com/qwen3-8-27b-hardware-requirements).

### Does it fit? Qwen3.8 27B at Q5_K_M with 32K context needs about 21.2 GB

Qwen3.8 27B (Q5_K_M, 32K) needs about 21.2 GB of VRAM.

- RTX 3060 (12GB) (12 GB): does not fit
- RTX 5060 Ti (16GB) (16 GB): does not fit
- RTX 3090 (24GB) (24 GB): fits
- RTX 4090 (24GB) (24 GB): fits

aliteq VRAM engine (weights at each quant's bits per weight, fp16 KV cache, about 0.8 GB runtime overhead), Nov 6, 2026. Estimates, not measurements. 16GB fits it only at 3-bit.

The easiest way to run it is Ollama. Its [qwen3.8 library page](https://ollama.com/library/qwen3.8) lists `qwen3.8:27b` as the latest tag, an 18GB download with a 256K context window, labelled for tools, thinking and vision. Set the context length yourself: Ollama's [OpenCode page](https://docs.ollama.com/integrations/opencode) says "OpenCode requires a context length of 64k or higher."

![Screenshot of the Ollama library page for qwen3.8: the Models table lists qwen3.8:latest, qwen3.8:27b (outlined, marked latest) and qwen3.8:27b-mlx, each 18GB with 256K context and Text, Image input](https://media.aliteq.com/media/ai/ollama-qwen3-8-27b-tag-2026-11-06.jpg)
Ollama's qwen3.8 tags, read Nov 6, 2026. The bare tag pulls the 27B model. · Screenshot of ollama.com/library/qwen3.8 by aliteq

## Is there a faster coding model that still fits one GPU?

Yes: a mixture-of-experts coder. Qwen3.8 27B is dense, so every token reads all 27B weights, which makes it accurate but not instant. A [mixture-of-experts](https://aliteq.com/moe-vs-dense-ai-models-explained) model keeps all its weights in memory but reads only a few billion per token, so it generates much faster on the same card.

Two are worth knowing:

- **[Qwen3-Coder](https://aliteq.com/can-you-run-qwen3-coder-locally) 30B-A3B.** Qwen's [card](https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct) lists "30.5B in total and 3.3B activated" and a 262,144-token native context, under Apache-2.0. It "supports only non-thinking mode", so it answers straight away, and Qwen says it "excels in tool calling capabilities." It is the older model: its Hugging Face repo was created on Jul 31, 2025. On our numbers: Q4_K_M with 32K context, about 21.0 GB.
- **North Mini Code 1.0 (Cohere).** Cohere's [card](https://huggingface.co/CohereLabs/North-Mini-Code-1.0) says "Model Size: 30B total; 3B active", a 256K context with 64K max output, Apache 2.0, and lists 67.6 on SWE-Bench Verified and 40.2 on SWE-Bench Pro. Three of every four layers use sliding-window attention, so long context is cheap. On our numbers: Q4_K_M with 32K context, about 19.4 GB, plus roughly 0.6 GB for the sliding-window cache. Cohere publishes an official 4-bit build ([w4a16](https://huggingface.co/CohereLabs/North-Mini-Code-1.0-w4a16)); its card's vLLM example uses two GPUs, and it asks for vLLM main and OpenCode main "until a new release is available", so expect some setup work.

![Screenshot of the Qwen3-Coder-30B-A3B-Instruct model card on Hugging Face: Model Overview list with Number of Parameters 30.5B in total and 3.3B activated outlined, 48 layers, 32 query heads and 4 KV heads, 128 experts with 8 activated, context length 262,144 natively, and a note that it supports only non-thinking mode](https://media.aliteq.com/media/ai/qwen3-coder-30b-card-2026-11-06.jpg)
Qwen3-Coder 30B-A3B's model card, read Nov 6, 2026: 30.5B weights in memory, 3.3B read per token. · Screenshot of huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct by aliteq

### One 24GB card: accurate or fast?

|   | Qwen3.8 27B | Qwen3-Coder 30B-A3B |
| --- | --- | --- |
| VRAM at 32K context | ~21.2 GB (Q5_K_M) | ~21.0 GB (Q4_K_M) |
| Weights read per token | All 27B per token | 3.3B per token |
| Thinking mode | On by default, can be switched off | None |
| Vendor coding score | 61.7 SWE-bench Pro (Qwen) | No text score on the card |
| On Hugging Face since | Aug 5, 2026 | Jul 31, 2025 |
| Pick it for | Best answers | Fast completions and edits |

## What about Devstral Small 2 for coding agents?

Devstral Small 2 is the pick if you live in an agent tool and want a dense model a size below Qwen3.8. Mistral's [card](https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512) says it is "designed to excel at agentic coding tasks", has "A 256k context window", is Apache 2.0, and lists 68.0 on SWE-bench Verified. On our numbers it fits at Q4_K_M with 32K context in about 19.3 GB, or Q6_K with 8K in about 20.4 GB. Its KV cache is heavier than Qwen3.8's (all 40 layers keep one), so long context costs more memory.

![Screenshot of the Devstral Small 2 Instruct model card on Hugging Face, Key Features list. Outlined: Lightweight, with its compact size of just 24 billion parameters, Devstral is light enough to run on a single RTX 4090 or a Mac with 32GB RAM, making it an appropriate model for local deployment and on-device use](https://media.aliteq.com/media/ai/devstral-small-2-card-2026-11-06.jpg)
Mistral's own hardware statement for Devstral Small 2, read Nov 6, 2026. · Screenshot of huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512 by aliteq

## Can I compare these benchmark scores?

Not directly. Each lab ran its own harness: Qwen used the Claude Code harness for Qwen3.8, Cohere used SWE-agent v1.1.0, and Mistral says its table uses "publicly reported values for competitor models". Some report SWE-bench Verified, some SWE-bench Pro, which is harder. So 61.7 on Pro for Qwen3.8 27B and 67.6 on Verified for North Mini Code are not on the same scale. The one clean comparison is inside a single table: on Qwen's own page, Qwen3.8 27B beats Qwen3.6 27B on every coding row shown. Qwen3.6 27B itself lists 77.2 on SWE-bench Verified on [its card](https://huggingface.co/Qwen/Qwen3.6-27B), so it remains a solid choice if your tools already work with it.

We did not run any of these models ourselves. The VRAM figures are estimates from our engine, not measurements, and we have no speed tests of our own.

## Which coding model should I run on 16GB or 12GB?

On 16GB, you trade quality for fit. Qwen3.8 27B fits only at Q3_K_M with 8K context (about 13.9 GB on our numbers), which is fine for single-file work but short for an agent. gpt-oss-20b at Q4_K_M with 32K context (about 14.1 GB) is the long-context option, and Devstral Small 2 at Q4_K_M with 8K (about 15.6 GB) is tight. The 30B MoE coders need part of the model in system RAM on 16GB; our [MoE offloading guide](https://aliteq.com/n-cpu-moe-llama-cpp-what-it-actually-does) shows how. More detail: [what fits a 16GB card](https://aliteq.com/best-local-llm-16gb-vram).

On 12GB, drop to the 9B to 14B tier: Qwen3.5 9B at Q6_K fits with 32K context in about 9.2 GB, and Qwen2.5-Coder 14B at Q4_K_M with 8K in about 10.6 GB. Both are useful for completions and single files; neither matches a 27B on multi-file changes. Our [best local LLM for 12GB VRAM](https://aliteq.com/best-local-llm-12gb-vram) guide covers that tier beyond coding.

|   | Best pick (our numbers) | Faster option | Fits at |
| --- | --- | --- | --- |
| 24GB | Qwen3.8 27B | Qwen3-Coder 30B-A3B, North Mini Code | Q5_K_M 32K ~21.2 GB; MoE Q4_K_M 32K ~19.4-21.0 GB |
| 16GB | Qwen3.8 27B (3-bit) | gpt-oss-20b | Q3_K_M 8K ~13.9 GB; Q4_K_M 32K ~14.1 GB |
| 12GB | Qwen2.5-Coder 14B | Qwen3.5 9B | Q4_K_M 8K ~10.6 GB; Q6_K 32K ~9.2 GB |

Size any other model or context length in the [VRAM calculator](https://aliteq.com/tools/vram-calculator).

## Should I rent a GPU before buying one for coding?

If you don't own a 24GB card yet, renting one for an hour is the cheapest way to see whether Qwen3.8 27B is good enough on your own code. On Nov 17, 2026 our tracker read an [RTX 3090](https://aliteq.com/gpus/rtx-3090) on Vast.ai from $0.12/hr on-demand and on Runpod at $0.50/hr. An [RTX 4090](https://aliteq.com/gpus/rtx-4090) read from $0.27/hr on Vast and $0.89/hr on Runpod (checked Nov 17, 2026). Prices move hourly; today's are on our [cloud GPU page](https://aliteq.com/cloud-gpu). If the test convinces you, a [used RTX 3090](https://aliteq.com/used-rtx-3090-buying-guide-local-ai) is the cheapest 24GB card to own.

**Test Qwen3.8 27B on your own repo before you buy a card** Rent a 24GB card by the hour, run your real coding tasks, then shut it down. This link opens Vast.ai with our Ollama + Open WebUI template, so the machine starts ready to pull a model and chat. [Rent a 24GB RTX 3090 for an hour](https://cloud.vast.ai/?template_id=26e7446a7d6906ee366b620c84e1e422&ref_id=623346) (Referral link: we earn a commission if you buy.) Live RTX 3090 prices on Vast.ai, from and typical: https://aliteq.com/vast-ai-pricing

**Want a managed GPU for daily coding sessions?** Runpod rents 24GB RTX 4090 pods in its Secure Cloud datacenters with one-click templates, a steadier choice if you want the same machine for a full workday of agent runs. Stop the pod when you're done. [Start a 24GB RTX 4090 pod on Runpod](https://console.runpod.io/signup?ref=nuninlts) (Referral link: we earn a commission if you buy.) Live RTX 4090 prices on Runpod, from and typical: https://aliteq.com/runpod-pricing

For a deeper look at the rental side, see [the cheapest RTX 4090 rental](https://aliteq.com/cheapest-rtx-4090-rental).

> **Why run a coding model locally at all?**
>
> Privacy is the honest reason: your code never leaves your machine, there is no per-token bill or rate limit, and it works offline. A local 27B coder won't match the largest frontier models on the hardest problems; for the bulk of everyday completions, refactors and boilerplate it is fast enough and entirely yours. The biggest open models are out of reach anyway: Kimi K3 is about 2.8T parameters per its model card and needs a datacenter node, as our [Kimi K3 hardware guide](https://aliteq.com/kimi-k3-open-weights-hardware-what-it-takes-to-run) shows.

**Qwen3.8 27B on a 24GB card.** On one 24GB GPU, run Qwen3.8 27B at Q5_K_M with 32K context for the best coding answers. Switch to Qwen3-Coder 30B-A3B or North Mini Code when you want fast completions more than careful reasoning, and try Devstral Small 2 if your agent tool works better with it. On 16GB, accept Qwen3.8 27B at 3-bit or use gpt-oss-20b; on 12GB, a 9B to 14B coder. 24GB: Qwen3.8 27B (best answers) or a 30B MoE coder (speed). 16GB: Qwen3.8 27B at 3-bit or gpt-oss-20b. 12GB: Qwen2.5-Coder 14B or Qwen3.5 9B.

Ready to wire a model into your tools? Our guides to [using Ollama with Claude Code](https://aliteq.com/how-to-use-ollama-with-claude-code) and [coding agents on local models](https://aliteq.com/run-coding-agents-on-local-models-ollama) cover terminal agents, and the [local AI coding assistant for VS Code](https://aliteq.com/local-ai-coding-assistant-vs-code) guide covers the editor route. Wondering how a local coder stacks up against the paid default? Read [Qwen3-Coder vs GitHub Copilot](https://aliteq.com/qwen3-coder-vs-github-copilot).

This guide is part of our [Which local AI model fits my GPU's VRAM? The 8GB to 32GB chart, model by model](https://aliteq.com/best-local-llm-vram-tiers-what-actually-fits) guide. Related guides: [Best local LLM for 8GB VRAM: what fits (moved to our fuller guide)](https://aliteq.com/best-local-llm-8gb-vram), [Is the DGX Spark worth it in November 2026](https://aliteq.com/dgx-spark-worth-it-local-llm), [Which Gemma 4 size fits your GPU? Match E4B up to 31B to your VRAM](https://aliteq.com/run-gemma-4-locally).

## The questions people actually ask

**Q: What is the best local LLM for coding on an RTX 3090 or 4090?**

A: Qwen3.8 27B. Both cards have 24GB, so they fit the same models; the 4090 is faster, not bigger. On our VRAM numbers Qwen3.8 27B fits at Q5_K_M with 32K context in about 21.2 GB. Qwen reports 61.7 on SWE-bench Pro for it (model card, read Nov 6, 2026).

**Q: Is Qwen3-Coder 30B still worth running?**

A: Yes, when speed matters more than the last bit of quality. It reads only 3.3B of its 30.5B weights per token and has no thinking phase, so it answers quickly, and Qwen says it excels at tool calling. Qwen3.8 27B is newer and scores higher on Qwen's own tables, but is slower per token because it is dense.

**Q: Can I run Qwen3-Coder-Next 80B on one GPU?**

A: Not fully on the card. On our numbers its weights alone are about 45 GB at Q4_K_M, so it needs a 48GB card, or a 24GB card plus plenty of system RAM with MoE offloading, which is slower.

**Q: Do I need 24GB, or will 16GB work for coding?**

A: 16GB works, but Qwen3.8 27B only fits at a 3-bit quant with short context (Q3_K_M with 8K is about 13.9 GB on our numbers). For agent tools that need 32K to 64K of context, 24GB is the tier worth buying.

**Q: How much context does a local coding agent need?**

A: More than most defaults. Ollama's OpenCode page says "OpenCode requires a context length of 64k or higher." Qwen3.8 27B at Q4_K_M with 64K is about 20.5 GB on our numbers, which fits 24GB. See [how to use Ollama with OpenCode](https://aliteq.com/how-to-use-ollama-with-opencode) for the settings.

**Q: Is local coding private enough for company code?**

A: Architecturally it is as private as it gets: the model runs on your machine with no provider seeing your code, and it works offline. Whether that meets your company's compliance rules is a question for your security team.

For a general model alongside your coding one, see [what else fits in 24GB](https://aliteq.com/best-local-llm-24gb-gpu-qwen-gemma-gptoss), and for agent setups, [the best local coding model for OpenCode](https://aliteq.com/best-local-coding-model-for-opencode).

## Sources

- [Qwen, Qwen3.8-27B model card (vendor page: 27B, 262,144-token native context, Apache-2.0, coding benchmark table, thinking on by default; read Nov 6, 2026)](https://huggingface.co/Qwen/Qwen3.8-27B)
- [Ollama library, qwen3.8 (tags, 18GB download, 256K context, tools/thinking/vision labels; read Nov 6, 2026)](https://ollama.com/library/qwen3.8)
- [Qwen, Qwen3.6-27B model card (vendor page: SWE-bench Verified table; read Nov 6, 2026)](https://huggingface.co/Qwen/Qwen3.6-27B)
- [Qwen, Qwen3-Coder-30B-A3B-Instruct model card (vendor page: 30.5B total, 3.3B activated, non-thinking only; read Nov 6, 2026)](https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct)
- [Mistral AI, Devstral Small 2 24B model card (vendor page: 24B, 256k context, SWE-bench Verified 68.0, single RTX 4090 statement; read Nov 6, 2026)](https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512)
- [Cohere, North Mini Code 1.0 model card (vendor page: 30B total, 3B active, 256K context, Apache 2.0, SWE-Bench Verified 67.6, Pro 40.2; read Nov 6, 2026)](https://huggingface.co/CohereLabs/North-Mini-Code-1.0)
- [Cohere, North Mini Code 1.0 w4a16 (official 4-bit build, Hugging Face; read Nov 6, 2026)](https://huggingface.co/CohereLabs/North-Mini-Code-1.0-w4a16)
- [Ollama docs, OpenCode integration ("OpenCode requires a context length of 64k or higher"; read Nov 6, 2026)](https://docs.ollama.com/integrations/opencode)
- [aliteq cloud GPU tracker (Vast and Runpod single-GPU prices, reading of Nov 6, 2026, 21:20 UTC)](https://aliteq.com/cloud-gpu)

---

Canonical: https://aliteq.com/best-local-llm-for-coding-single-gpu

This page has referral links: we earn a commission if you buy, at no cost to you.
