Quick answer

Tested August 2026 on a retail 16GB RTX 5080: gpt-oss:20b passed all 8 published eval tasks at a measured 178-190 tokens per second, the only one of five models to do so and the best coding model here that fits the card. Qwen3-Coder 30B scored 6 of 8 but needs CPU offload. The most-recommended model online needs 52GB.

At a glance: the picks

4 picks

  1. Best for 16GB

    gpt-oss:20b

    MXFP4 · fully resident · 8/8 tasks

    The only model to pass all eight tasks, including two-turn tool calling, at 178-190 tokens per second.

  2. 16GB quality ceiling

    Qwen3-Coder 30B

    19GB Q4_K_M · 74% GPU-resident · 6/8

    Best single-turn tool calling and clean SQL and regex, but it spills on 16GB and its speed depends on free system RAM.

  3. Best for 12GB

    qwen2.5-coder:14b

    9GB file · 5/8

    Fits a 12GB card at 4k context (10,169 MiB resident in the dataset) and is solid for non-agentic work.

  4. Best for 8GB

    qwen2.5-coder:7b

    4.7GB file · 4/8

    A completion and chat engine for small cards, not an agent.

Contents

At a glance

Tested on
Retail RTX 5080 16GB, ollama 0.32.1, driver 610.88, August 2026
Method
8 mechanically scored tasks, 2 reps each, temperature 0, 8k context
Not tested
Contexts above 8k, multi-file agent sessions, frontier-scale ranking

Provenance

  • Aug 25, 2026Published
  • Nov 18, 2026Last substantive update

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, and the runner with all eight checkers is one Python 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: 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 at 4k context; 5/8, solid for non-agentic workTask weights tested on RTX 5080; 12GB fit from throughput dataset
8 GBqwen2.5-coder:7b4.7GB file fits; 4/8; completion and chatTask weights tested on RTX 5080; 8GB fit from throughput dataset
24 GB+Qwen3-Coder 30B fully residentSpec + HuggingFace file-size mathNo

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 has moved since the eval (registry re-check, November 18, 2026). Ollama has rebuilt the gpt-oss:20b tag: its library page now lists digest f38aa0c53da5 at 14GB, while every result on this page comes from digest 17052f91a42e, the build pinned in the CSV. The qwen3-coder, qwen2.5-coder and devstral tags still carry the digests that were tested. Two coding-oriented models on Ollama’s library were not in this eval, and both are bigger than 16GB as listed: qwen3.6:27b-coding at 18 to 19GB and laguna-xs-2.1 at 20GB. The picks above are unchanged because nothing has been re-run.

Did each coding task pass on both attempts?

This groups the two recorded attempts by task, model digest, evaluation version and configured context. A split result means that exactly one of the two attempts passed.

ModelContextTasksBoth passedSplitNeither passed
devstral:24b40968602
gpt-oss:20b81928800
qwen2.5-coder:14b81928503
qwen2.5-coder:7b81928404
qwen3-coder:30b81928611

Two attempts are too few to estimate a stable pass probability. These eight tasks do not measure overall coding ability, and context differs between models.

Reproduce this comparison

To recalculate the published table offline, save the Python script as reproduce.py in an empty folder. Inside that folder, create any subfolders shown below and save each input at its displayed path.

From that folder, run this command with Python 3.10 or later. It prints the rows and input hashes; it does not run the hardware or start a server.

python reproduce.py --data-root . --product local-coding-evaluation

Compare the output with this product’s entry in the published JSON and input hashes.

To collect a new measurement: Keep the same tasks, scorer, executable tests, prompts, model digest and independent repetitions. Preserve split results when publishing a new cohort.

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 below.

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 MXFP4 build stays fully GPU-resident (13.1 to 14.0 GiB of whole-GPU memory across the dataset’s captures), 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 two controlled captures are August 12 (187 to 190) and August 26 (178 to 183). 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 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 (its Ollama tags were last updated over a year ago, per the library page on November 18) 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, the 16 GB map places every measured setup on this card by memory in use, and the VRAM tier guide owns the fit math in depth.

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.

For what sits around the model in an agent setup, the self-hosted AI agent page separates the runtime you host from the model you can rent.

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 kept the 5080 native and separated what transfers:

  • Task results transfer. qwen2.5-coder:14b at Q4_K_M is a 9GB file. The throughput dataset measured it at 10,169 MiB resident at 4k context and 12,485 MiB at 16k, so it fits a 12GB card at modest context, not at 16k. Its pass/fail rows above are properties of the weights, not of my GPU. Same for qwen2.5-coder:7b (4.7GB; 5,671 MiB resident at 4k and 6,503 MiB at 16k) 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: capacity math and vendor specs

For 24 GB and higher tiers, the fit figures below combine model weight sizes with published memory-bandwidth specifications and attributed documentation.

  • Qwen3-Coder 30B fully resident is the obvious 24GB move. The same 19GB file (about 17.7 GiB) that spills here loads whole there, leaving about 6 GiB of nominal capacity for context, and its task profile above is second-best on this page even with the handicap.
  • Qwen3.8-27B, still the newest dense mid-size Qwen on Hugging Face as of November 18, 2026: Unsloth’s UD-Q4_K_M GGUF is 16.56GB, 15.43 GiB, and Ollama’s default qwen3.8:27b tag is 18GB. The weights alone nearly match this card’s entire memory, the classic one-gigabyte-too-far case. On 24GB it leaves about 8.6 GiB of nominal capacity for context. Untested here.
  • Laguna XS 2.1 is Poolside’s agentic-coding model, which its card describes as a 33B-total mixture-of-experts with 3B activated per token. Poolside’s own Q4_K_M GGUF is 20.27GB and Ollama’s tag is 20GB, so on 16GB it spills the way Qwen3-Coder 30B does. Untested here.
  • qwen3-coder-next (52GB) and gpt-oss:120b (65GB) are 48-64GB-class machines’ problems. The 70B cost page prices that class of card, and the VRAM tier guide covers the fit.

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.

Set the context first

Ollama’s documentation gives cards under 24GiB a 4k default context, half of what this eval used. Set it when you start the server, then check what the loaded model actually got:

OLLAMA_CONTEXT_LENGTH=8192 ollama serve
ollama ps

ollama ps shows a CONTEXT column and a PROCESSOR column; you want the full context you asked for and 100% GPU. Coding agents usually want more than 8k. The dataset measured gpt-oss:20b at 16k context with 13,683 to 14,355 MiB of the card’s 16,303 MiB in use, and llama.cpp’s gpt-oss guide estimates 15.5GB at 32k and 17.9GB at 131,072 tokens for the same model. No 32k run is in this eval, so above 16k you are past what was measured here.

Wire it into an editor or agent

  • Aider. Aider’s Ollama docs point it at the local server and use the ollama_chat/ prefix: export OLLAMA_API_BASE=http://127.0.0.1:11434, then aider --model ollama_chat/gpt-oss:20b from your project folder.
  • Continue. Add the model to config.yaml with provider: ollama and model: gpt-oss:20b, per Continue’s Ollama page. Continue can request a larger context than other Ollama tools; if the model errors there and works elsewhere, lower contextLength under defaultCompletionOptions.
  • Docker. To run the server in a container with GPU access, the Ollama Docker guide covers it, and Ollama vs LM Studio on the same card covers the GUI alternative.

The eval scored the structured tool-call schemas these editors and agents consume, verifying payload syntax and parameter choices directly in the local harness.

Check a recommendation against the registry before you download it

Before testing anything, I fit-checked published recommendations against the registries they install from. Three verifiable problems follow, with receipts.

  • One 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 284 billion parameters with 13 billion activated, per DeepSeek’s card. Kimi K2.7 Code’s ollama entry is a cloud-routed tag, not local weights at all.
  • Speed claims travel without their hardware. A tok/s figure for a model that cannot fully load on a 16GB card says nothing about your 16GB card unless the GPU and the resident split are named. The measured number for Qwen3-Coder 30B on this card is above.

These errors are the reason every number on this page comes from one named card, by a method you can rerun.

When the cloud is 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.

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. I found and fixed two scoring defects during the build. 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.

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. One prompt per task and two repetitions also make a single pass or fail a thin result; the per-rep CSV shows every one.

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 was not part of this eval, 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-11-18. Registry re-check: sizes and tags confirmed or corrected, gpt-oss:20b tag rebuild noted, no models re-run.
  • 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.

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 (Ollama lists its current build at 14GB) ran 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 context length can a 16GB card handle for coding?
The eval ran at 8k. The throughput dataset measured gpt-oss:20b at 16k context with the whole GPU at 13,683 to 14,355 MiB in use, under the card’s 16,303 MiB, and llama.cpp’s own gpt-oss guide puts the 20B at 15.5GB at 32k and 17.9GB at 131,072 tokens. Ollama defaults to a 4k context on cards under 24GiB, so set OLLAMA_CONTEXT_LENGTH yourself and confirm with ollama ps.
Can I use gpt-oss:20b with Aider or Continue?
Yes, both talk to a local Ollama server. Aider’s docs use OLLAMA_API_BASE=http://127.0.0.1:11434 and aider –model ollama_chat/; Continue’s config.yaml takes provider: ollama and the model name. The eval scored structured tool-calling compliance directly, isolating protocol accuracy ahead of extended multi-file sessions.
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 my test card. 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. 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. In the dataset’s controlled cells it decoded at about 62 tok/s at 4k context and 52 at 16k. 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.

Sources and corrections

Last updated
Methodology
See the methodology for research and review standards. It draws on 18 cited sources, listed below, each checked against the original page on the date shown beside it.
Sources
Update log
  • 2026-11-18 — Re-checked every model size and tag against Ollama and Hugging Face, corrected Laguna XS 2.1 (a 3B-active MoE) and DeepSeek V4-Flash (284B), and added editor and context setup for the winner.
  • 2026-11-04 — Grouped both repetitions by task and model to show repeatable and split results in the existing benchmark.
  • 2026-08-26 — First publication: five models through eight mechanically scored tasks, two repetitions each, on a retail RTX 5080, with the prompts, runner and per-rep results published.
Corrections
Spotted an error? Email a correction with the affected line and what you found. The draft includes this page’s address. Verified changes are recorded here. Contact details.

About the author

I am Lowell K. Wood IV. I research, write and maintain everything on TechFuelHQ from St. Louis County, Missouri.