aliteq.

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.

Aliteq TeamUpdated Published 9 min read
Best coding model for one GPU. Thumbnail with a line drawing of a graphics card, the Vast.ai logo and a card reading Qwen3.8 27B at Q5_K_M with 32K context, about 21.2 GB, from the aliteq VRAM engine on Nov 6, 2026

Some links on this page are referral links: we may earn a commission, at no cost to you.

Share

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.

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 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. 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
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; 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 and in our Qwen3.8 27B hardware guide.

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 ≈21.2 GB
RTX 3060 (12GB)12 GBover 9.2 GB
RTX 5060 Ti (16GB)16 GBover 5.199999999999999 GB
RTX 3090 (24GB)24 GBfits
RTX 4090 (24GB)24 GBfits
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 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 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
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 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 30B-A3B. Qwen's card 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 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); 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
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

Dense · 27B

vs

Qwen3-Coder 30B-A3B

MoE · 3.3B active

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

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 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
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, 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 shows how. More detail: what fits a 16GB card.

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.

24GB

Best pick (our numbers)
Qwen3.8 27B
Faster option
Qwen3-Coder 30B-A3B, North Mini Code
Fits at
Q5_K_M 32K ~21.2 GB; MoE Q4_K_M 32K ~19.4-21.0 GB

16GB

Best pick (our numbers)
Qwen3.8 27B (3-bit)
Faster option
gpt-oss-20b
Fits at
Q3_K_M 8K ~13.9 GB; Q4_K_M 32K ~14.1 GB

12GB

Best pick (our numbers)
Qwen2.5-Coder 14B
Faster option
Qwen3.5 9B
Fits at
Q4_K_M 8K ~10.6 GB; Q6_K 32K ~9.2 GB

Size any other model or context length in the 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 6, 2026 at 21:20 UTC our tracker read an RTX 3090 on Vast.ai from $0.10/hr on-demand ($0.09/hr spot, which can be interrupted), and an RTX 3090 on Runpod at $0.50/hr. An RTX 4090 read from $0.27/hr on Vast and $0.89/hr on Runpod. Prices move hourly; today's are on our cloud GPU page. If the test convinces you, a used RTX 3090 is the cheapest 24GB card to own.

Verdict

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.

Best for: 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.

The questions people actually ask

What is the best local LLM for coding on an RTX 3090 or 4090?
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).
Is Qwen3-Coder 30B still worth running?
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.
Can I run Qwen3-Coder-Next 80B on one GPU?
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.
Do I need 24GB, or will 16GB work for coding?
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.
How much context does a local coding agent need?
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 for the settings.
Is local coding private enough for company code?
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, and for agent setups, the best local coding model for OpenCode.

Found this useful? Share it

Share

Aliteq

Aliteq Team

Aliteq started in 2019 as a PC hardware shop and is now a US-based publication. We build the VRAM and cost calculators on this site, track live cloud-GPU prices, and write guides with AI-assisted drafting that we check against primary sources before publishing.

Work out the hardware

GPUs in this article

Specs, the AI models each one runs, and where to buy or rent it.

The Aliteq brief

The tech worth knowing — hardware, AI, gaming, deals. No spam, unsubscribe anytime.

Keep reading