Quick answer

Tested August 2026 on a retail 16GB RTX 5080: gpt-oss:20b is the best local coding model that actually fits, passing 8 of 8 published eval tasks at a measured 178-190 tokens per second. Qwen3-Coder 30B scores close behind but needs CPU offload. The most-recommended model online needs 52GB.

52 GB.

That is the Q4_K_M download size of qwen3-coder-next, the model the top Reddit answer and a front-page tech-site article both point you at when you search for the best local coding LLM. My GPU has 16 GB. So, probably, does yours. The 5080, the 4080, the 5070 Ti, the 4060 Ti 16GB are the cards people actually buy, and most of the pages ranking “local” coding models never check whether their picks load on any of them.

So I checked. Then I went further. Every model that plausibly fits a 16GB card went through the same eight coding tasks (bugfix, feature-from-spec, test-writing, refactoring, explaining legacy code, SQL and regex, and a two-turn agentic tool-calling exercise) on my own RTX 5080, twice each at temperature 0, scored mechanically by executed checkers rather than by me nodding at the output. The prompts are published as a versioned JSON file so you can rerun the whole thing tonight. Per-rep results are a CSV. Tokens per second, VRAM figures, and load times live in the same open dataset that already tracks this card.

Scope, stated plainly: one retail RTX 5080, ollama 0.32.1, driver 610.88, August 2026. “Best” below means best in these tests on this card.

Picks as of August 2026, by VRAM tier

Your VRAMPickWhyFirst-party?
16 GBgpt-oss:20bOnly model to pass 8/8 tasks; fully resident at 178-190 tok/sTested here
16 GB, quality ceilingQwen3-Coder 30B (offloaded)6/8 + best tool-calling; 74% GPU-resident, speed hangs on free system RAMTested here
12 GBqwen2.5-coder:14b9GB file fits; 5/8, solid for non-agentic workTask results tested here; no 12GB card owned
8 GBqwen2.5-coder:7b4.7GB file fits; 4/8; completion and chatTask results tested here; no 8GB card owned
24 GB+Qwen3-Coder 30B fully residentCited below; I don’t own the cardNo

Dated on purpose. Local-model rankings rot in weeks — the current dense mid-size Qwen went 3.5 to 3.6 to 3.8 within months — so this table carries its date and the changelog records revisions. If the date reads stale, assume the picks are too.

What the top-ranking lists get wrong

Before testing anything, I fit-checked the recommendations that currently rank for this search against the registries they install from. Three verifiable problems, receipts linked.

  • A top-ranking 16GB guide recommends a model that does not exist. The page (updated 2026-05-15, archived snapshot) recommends “Llama 3.3 14B Q5_K_M (10.1 GB),” with benchmark scores and a December-2025 release story attached. Meta’s own model catalog carries Llama 3.3 at exactly one size, 70B. The same page recommends a “Qwen3-Coder 32B”; the family ships at 30B and 480B.
  • The community’s favorites often need 3-4x your VRAM. qwen3-coder-next, genuinely excellent by every account, is a 52GB download at Q4_K_M. DeepSeek V4-Flash, a fixture of “self-hosted coding” lists, is 291 billion parameters. Kimi K2.7 Code’s ollama entry is a cloud-routed tag, not local weights at all.
  • Speed claims travel without their hardware. The most-quoted number for Qwen3-Coder 30B, 220 tok/s, comes from a guide whose own tier chart puts the model in a “24GB sweet spot” and never names the GPU it ran. On a 16GB card the same model cannot fully load. The measured number is below.

No accusation about how any of those pages got written. The errors speak for themselves, and they are the reason this page exists: every number on it comes from one named card, by a method you can rerun.

How I tested

Same rig as the throughput dataset: retail RTX 5080 (16,303 MiB), Ryzen 7 7800X3D, 32GB RAM, Windows 11, ollama 0.32.1, driver 610.88. Models pinned by digest in the raw logs, because tags move.

Eight tasks, each scored by a machine.

  1. Bugfix. A binary search returning the wrong boundary; the fix must pass 8 cases.
  2. Implement from spec. parse_duration("1h30m15s"), with ten ValueError traps.
  3. Write tests. Given a working LRU cache, write a check() strong enough to pass the real implementation and also kill a planted mutant that evicts the wrong entry.
  4. Refactor. Collapse triple copy-paste into a helper. Behavior must stay identical across five input sets, and a helper function must exist.
  5. Explain legacy code. An unlabeled Luhn implementation; name it.
  6. SQL. A join with an aggregate and a HAVING filter, executed on seeded SQLite and compared row-for-row, with boundary rows planted on purpose.
  7. Regex. A semver matcher against 17 match/no-match cases via re.fullmatch.
  8. Agentic tool-calling. Two function schemas, one two-step request. A pass requires correct structured tool calls, the thing an agentic coding tool (aider, opencode, Continue) consumes. Prose descriptions of what the model “would” do score zero.

Identical prompts, temperature 0, seed 42, 8k context, two repetitions. A task counts only when both reps pass; one-of-two is reported as flaky, never rounded up. Two scoring defects I found and fixed during the build are worth naming, because benchmark pages never admit these. My reference LRU crashed on a capacity-0 probe, which punished exactly the models thorough enough to test that edge. My refactor checker initially rejected helpers nested inside the function, which is a perfectly good refactor. Both fixtures were fixed and every affected task re-run for every model. The eval is versioned. So are its mistakes.

What this is not: SWE-bench. Eight tasks cannot rank frontier coding ability — Aider’s leaderboard exists for that. They are built to separate “autocompletes plausibly” from “follows the spec, checks the edges, and drives tools” at exactly the size class a 16GB card forces on you.

The 16GB tier, measured

ModelBugfixSpecTestsRefactorExplainSQLRegexToolsStable
gpt-oss:20bpasspasspasspasspasspasspasspass8/8
Qwen3-Coder 30Bfailpass1 of 2passpasspasspasspass6/8
devstral:24b¹passfailpasspasspasspassfailpass6/8
qwen2.5-coder:14bpassfailfailpasspasspasspassfail5/8
qwen2.5-coder:7bpassfailfailpasspasspassfailfail4/8

¹ devstral ran at 4k context; the exception is explained two sections down.

gpt-oss:20b swept it. Eight for eight, both repetitions. That includes the only perfect two-turn tool-calling run, and a capacity-0 edge-case test on the test-writing task strict enough to break my original checker. It is also the fastest real option at this tier. The 13.4GB MXFP4 build stays fully GPU-resident, decodes at 178-190 tok/s across two dated captures in the dataset’s controlled runs, and held ~152-156 tok/s while doing actual eval work with a checker pipeline running beside it. The eval settled something the throughput table couldn’t. The MoE speed champion from the MXFP4 analysis is also the best-behaved coding model at this size.

Qwen3-Coder 30B is the interesting one. The community is right that it is strong. Best-in-eval tool-calling (both calls, correct arguments, single turn), clean SQL, clean regex, clean spec work. Two honest dents. It failed the plainest task on the sheet, the binary-search boundary fix, in all four scored repetitions across two runs. Its test-writing was flaky. And it does not fit: ollama’s 19GB Q4_K_M ran 74% GPU-resident at 8k context, and the dataset’s controlled cells put it at 62 tok/s at 4k context and 52 at 16k — brisk for a spilling 19GB model (the MoE only activates ~3B parameters per token), still a third of gpt-oss’s rate. Treat even that number as conditional. The same model measured anywhere from 0.7 to 83 tok/s across three host-memory states, which is the next section’s story.

devstral is the specialist showing its age. Mistral’s dedicated agentic coder (still the newest dedicated one on ollama, at over a year old) wrote the best tests of any model here and tool-called cleanly. Its SWE tuning shows. It also failed spec-following and regex, and its 14GB file plus KV cache would not stay resident at 8k context on this card.

The qwen2.5-coder pair is what “coder model” meant in 2024, measured in 2026. Both aced the bugfix, the refactor, the SQL task, and code explanation. Both failed the same three modern requirements. Strict spec-following: each accepted "15s1h" as a valid duration, ignoring the stated unit order. Test-writing: the 14B’s recency test asserts the wrong eviction victim, so the test itself misunderstands LRU. And structured tool-calling, where both produced prose descriptions instead of tool calls. Fine completion engines. Not agents.

System RAM quietly gates offloaded models

Nobody’s tier list mentions this, and it cost me half a benchmarking night. When a model spills past VRAM, its speed is hostage to free system RAM. Same card, same model, same night: Qwen3-Coder 30B decoded at 83 tok/s with ~20GB of system RAM free, and at under 1 tok/s while a pair of runaway indexing jobs had the machine down to 1.2GB free and paging. The dense devstral collapsed the same way at 8k context (0.8 tok/s) with far less spilled. If you run a spilling model, budget real RAM headroom for the spilled layers, or stay resident and keep the speed. The VRAM calculator tells you which side of that line a model lands on, and the VRAM tier guide owns the fit math in depth.

12 GB and 8 GB: what transfers and what does not

A VRAM-capped 5080 is not an 8GB card. Restricting my GPU would fake the memory ceiling while keeping 5080 bandwidth and compute, so I did not do it, and no number here pretends otherwise. What I can honestly hand you:

  • Task results transfer. qwen2.5-coder:14b at Q4_K_M is a 9GB file that fits a 12GB card with context room. Its pass/fail rows above are properties of the weights, not of my GPU. Same for qwen2.5-coder:7b (4.7GB) on 8GB cards.
  • Speed numbers do not transfer. My tokens per second came from a 960 GB/s card. For the budget tier, the RTX 5060 walkthrough has first-party numbers from that class of card. Beyond it, demand a GPU name next to any tok/s figure you read.
  • The quality cliff lives in the quant. A 12GB card running the 14B at Q4_K_M gets exactly the model I tested. Squeezing a larger model in via Q2/Q3 quants gets you a different, worse model, whatever the tier. The quant mechanics piece shows why.

24 GB and up, cited rather than tested

I don’t own a 24GB card, so this section is fit math and labeled third-party positioning. No borrowed benchmarks.

  • Qwen3-Coder 30B fully resident is the obvious 24GB move. The same 19GB file that spills here loads whole there, and its task profile above is second-best on this page even with the handicap.
  • Qwen3.8-27B, the current dense mid-size Qwen (mid-August 2026): Unsloth’s UD-Q4_K_M GGUF is 16.5GB. The weights alone match this card’s entire memory, the classic one-gigabyte-too-far case. On 24GB it fits with room. Untested here.
  • Laguna XS 2.1 (Poolside’s 33B) quantizes to roughly 19-20GB. Same story as the 30B, without the MoE discount on offload.
  • qwen3-coder-next (52GB) and gpt-oss:120b (65GB) are 48-64GB-class machines’ problems. The VRAM tier guide covers that end.

Agentic coding: which models drive tools

The task that split the field cleanest is the one the field argues about most. Given two function schemas and “create the directory, then write the file,” scored on structured tool calls only:

  • gpt-oss:20b made the correct create-directory call, took the tool result back, and followed with a correct write-file call carrying the exact content. Both reps. This is the loop an agentic coding tool runs all day.
  • Qwen3-Coder 30B emitted both calls with correct arguments in a single turn. Also correct, arguably more efficient. One nuance for tinkerers: ollama parses this model’s tool-call format at the engine level, so you get structured calls even though its chat template never mentions tools.
  • devstral delivered a clean create-then-write across two turns.
  • qwen2.5-coder 7B and 14B described what they would do, in prose, both reps, tools unused. If your workflow is aider-style automation, that is a disqualifier no HumanEval score will warn you about.

When the cloud is honestly better

If your daily work is large multi-file refactors across an unfamiliar codebase, a frontier hosted model is still better than anything on this page, and no amount of local-AI enthusiasm changes it. The local case is different and real. Unlimited volume at zero marginal cost, with code that never leaves the machine and keeps working offline. And, as of this eval, genuinely competent spec-following and tool-driving at the 16-20B class. The break-even calculator does the cost half of that argument with your numbers instead of mine.

Running the winner

ollama pull gpt-oss:20b and it fits with room to think at 8k context. The practical notes from living with it during this eval: it spends tokens on reasoning before answering (the 4096-token output budget here exists because a 2048 cap cut off one of its correct answers mid-fence), it held 178-190 tok/s across the dataset’s two captures at 4k and 16k context alike, and it pairs with Ollama or llama.cpp equally well. llama.cpp squeezes out a bit more decode if you want it. For the offloaded 30B path instead, budget a ~15GB whole-GPU footprint, expect roughly 62 tok/s at 4k context and 52 at 16k on this card when system RAM is free, and read the dataset’s offload note before trusting any single number for a spilling model — including mine.

Method, limits, changelog

One card, one runner, one driver, eight tasks, two reps. Enough to rank what fits a 16GB card for coding work. Nowhere near enough to rank frontier models. Quantization was Q4_K_M-class throughout (MXFP4 for gpt-oss). NVFP4, the Blackwell-only 4-bit path, shows mixed community results and ollama does not expose it, so it stays cited rather than quoted. Task outcomes are near-deterministic at temperature 0 but not guaranteed identical across driver or runtime versions, which is why every rep sits in the published CSV with its model digest and runtime version attached.

  • 2026-08-26 — v1. Five models, eval v1, throughput dataset v1.1.0.

Corrections to measured rows land in the dataset changelog; pick revisions land here, dated. The next scheduled look is the next model-meta shift. Lately that has been monthly.

Frequently asked questions

What is the best local LLM for coding right now?
On a 16GB card, as of this August 2026 eval, gpt-oss:20b. It was the only model to pass all eight tasks, including the two-turn agentic tool-calling exercise, while running fully GPU-resident at a measured 178-190 tokens per second. On 24GB cards, Qwen3-Coder 30B runs fully resident; its task scores here were second-best, and larger-card rankings consistently make it the pick at that tier.
Can a 16GB GPU run a good coding model?
Yes. gpt-oss:20b (13GB in its MXFP4 quantization) fits fully resident with 8k context and passed 8 of 8 tasks in this eval. The catch is that most models the community recommends are bigger. Qwen3-Coder 30B is a 19GB download that runs partially offloaded, and qwen3-coder-next is 52GB. A 16GB card runs a genuinely good coding model, just not most of the ones in the listicles.
What is the best local coding LLM for 8GB VRAM?
qwen2.5-coder:7b is the dedicated coding model that fits (4.7GB at Q4_K_M), and it decoded at 156-181 tok/s on our test card. Be honest about what you get. It passed 4 of 8 tasks here, failing spec-following, test-writing, and structured tool-calling. It autocompletes well; it is not an agent. Treat the 8GB tier as completion and chat.
Is a local coding LLM as good as Copilot or Claude?
No, not on the hardest work. Frontier hosted models still win at complex multi-file reasoning, and pretending otherwise wastes your time. What the local models in this eval genuinely handled was routine implementation against a clear spec, tests, SQL, regex, code explanation, and tool-driven automation, at zero per-token cost, offline, with your code never leaving the machine. Local for volume and privacy, cloud for the hardest problems.
How much VRAM does Qwen3-Coder 30B need?
The ollama Q4_K_M is a 19GB download, so it does not fit fully resident on a 16GB card; at 8k context ollama ran it 74% GPU-resident here. Speed then depends on system RAM headroom. The same model on the same card decoded at 83 tok/s with free RAM and under 1 tok/s while the machine was paging. On a 24GB card it runs fully resident.

Evidence ledger

Last updated
Methodology
This guide was written and edited by Lowell K. Wood IV in St. Louis County, MO. It draws on 9 cited sources, listed below, each checked against the original page on the date above. Full editorial standard: methodology.
Update log
  • 2026-08-26 — First publication. Eval: techfuelhq-coding-eval-v1 (8 tasks, 2 reps, temperature 0, seed 42, mechanical scoring, no judge model), models pinned by digest, ollama 0.32.1, driver 610.88, retail RTX 5080. Every published rep is from the clean-box runs; two eval-instrument defects found during the build (a reference-fixture capacity-0 crash and a top-level-only helper-function check) were fixed and the affected tasks re-run for every model before publication. Throughput rows: rtx-5080-llm-throughput dataset v1.1.0, captured the same night in an exclusive GPU window. Task prompts: /data/coding-eval-tasks-v1.json; per-rep results: /data/rtx-5080-coding-eval-v1.csv.
Corrections
Spotted an error or a stale number? Email hello@techfuelhq.com. Confirmed corrections are added to the update log above.

About the author

Written by Lowell K. Wood IV, who builds and runs TechFuelHQ from St. Louis, Missouri.