Running a coding agent on an 8 GB GPU
A coding agent needs a long context, so on an 8 GB card the first question is not "does the model fit" but "how much context fits". The numbers below are estimates from this site's formulas; measurements of agent scores and speed are not available yet (measurement pending).
1. Why context comes first
An agent keeps piling repository files, command output and earlier steps into the context. This site computes memory needed = GGUF size + KV cache + 0.6 GB, and on an 8 GB card it subtracts 0.5 GB for display output, leaving a budget of about 7.5 GB. Even when the weights fit, a small remainder means a short context.
For example, the Qwen3.5 9B Q4_K_M file is 6.17 GB (bartowski repo listing). On an RTX 3060 8GB the largest context that fits is computed as follows (estimates).
| KV cache type | Max context fully on GPU (estimate) |
|---|---|
| f16 (default) | about 21k tokens |
| q8_0 | about 40k tokens |
The model's documented max context is 262,144 (1,010,000 with extension, per the model card), but the amount you can keep fully on an 8 GB card is far smaller. Quantizing the KV cache to q8_0 gives more context but quality can change; how much is a pending measurement.
2. Small models that fit entirely in 8 GB
Candidates that fit entirely in graphics memory on an RTX 3060 8GB at 32k context with a q8_0 KV cache (all estimates).
| Model | Quant (file) | Memory needed | Speed | Max context that fits (q8_0) | License |
|---|---|---|---|---|---|
| Qwen3.5 9B | Q4_K_M (6.17 GB) | ~7.3 GB | ~23 tok/s | ~40k | Apache-2.0 |
| Qwen3.5 4B | Q8_0 (4.62 GB) | ~5.8 GB | ~31 tok/s | ~127k | Apache-2.0 |
| Gemma 4 E4B | Q4_K_M (5.41 GB) | ~6.5 GB | ~27 tok/s | ~94k | Apache-2.0 (per card) |
Small models fit and run fast, but we have not measured how many coding-agent tasks they solve. The Arena scores on the leaderboard are for large original models and should not be applied directly to quantized versions of this size.
3. MoE models with part of the weights in RAM
A mixture-of-experts (MoE) model is large on disk but uses only part of it per token, so keeping the expert weights in system RAM can be practical when graphics memory is short (MoE offloading). Assuming 64 GB of system RAM, DDR4-3200 dual channel, 32k context and q8_0 KV, this site's simple calculation gives the following (all estimates; real results depend heavily on the setup).
| Model | Quant (file) | Memory needed | Speed (estimate) | Commercial use |
|---|---|---|---|---|
| Qwen3-Coder 30B-A3B | Q4_K_M (18.56 GB) | ~20.9 GB | ~20 tok/s | yes (Apache-2.0) |
| GLM-4.7-Flash (30B-A3B) | Q4_K_M (18.47 GB) | ~20.0 GB | ~23 tok/s | yes (MIT, per card) |
| gpt-oss 20B | MXFP4 (12.11 GB) | ~13.1 GB | ~25 tok/s | yes (Apache-2.0) |
| Qwen3.6 35B-A3B | Q4_K_M (22.29 GB) | ~23.2 GB | ~21 tok/s | yes (Apache-2.0) |
- Dense models slow down sharply when even part of them goes to RAM. For example, Devstral Small 2 24B (Q4_K_M, 14.33 GB) comes out at only about 3 tok/s under the same conditions (estimate).
- With 16 GB of RAM you can use only what is left after the OS share (assumed 4 GB), so most of the models above will not fit. Enter your real system RAM in the calculator.
- These speeds are for generating tokens; reading a long context is slower and is a separate number. We plan to show time per agent task (as an estimate) once measured.
4. How to choose
- Check the license first. The EXAONE family is non-commercial. Qwen3.8 Flash-Next, Kanana-2 and HyperCLOVA X SEED are conditional, so read the text. Apache-2.0 and MIT models allow commercial use (per repo labels).
- Decide how much context you need. Small edits often work in 16k-32k, while working across a whole repository may need 64k or more. This varies by job, and this site has not measured it.
- Look first at models whose context fits fully on the GPU, and consider MoE offloading if none do. Change the context and KV type in the calculator and check "max context that fits".
- For models with a thinking mode, check how to turn it on or off in the model card. Thinking writes a long chain of reasoning before answering, which can make each agent step slow.
- Try it yourself. Which local model does best as a coding agent will show up on the leaderboard once our measurements are done. Until then, giving the same task to two or three models is the most reliable test.
5. What changes when measurements arrive
- The largest context that actually loaded and ran on an 8 GB-tier PC (
context_fit) replaces the estimate. - SWE-bench subset and Aider Polyglot scores, and the Elo computed from task outcomes, fill the "Our coding results" column on the leaderboard.
- Speed (pp512, tg128, by depth) and estimated time per task appear next to the estimates.
To recompute for your own setup, change the hardware, RAM, context length and KV type in the calculator. If the terms are new to you, start with Getting started.
Model details in this guide were checked in the model repos around 25 November 2026. Licenses can change, so read the linked source.