Qwen 3.8 27B fits on one 32 GB AMD R9700 at Q4_K_M and peaks near 24 GB of VRAM.
In one attempt it passed 92.7% of HumanEval+ (152 of 164) at a median 6.7 seconds and 79 tokens per second.
On harder tasks it beat Qwen3-Coder 30B clearly (63 vs 27 of 102); on HumanEval as a whole the two are close (152 vs 145, p = 0.17).
Loupe by LeanLM (not affiliated with Google's LearnLM educational AI) measures what AI workloads cost to serve. Tokens, seconds and joules per task are measured, not estimated.
How much VRAM does Qwen 3.8 27B need?
About 17 GB for the weights at Q4_K_M (a 4-bit quantization), 19.1 GiB at a 16,384-token coding context, and up to 23.8 GB once you allocate room for a 128k context. On our AMD Radeon AI PRO R9700 (32 GB), Ollama's Vulkan backend loaded qwen3.8:latest, the 27.3B-parameter dense build of Qwen 3.8, and the model used 22.7 GB with a 128k-token context allocated during the hard-task run and peaked at 23.8 GB during the full HumanEval+ run. In a separate 507-task run on an NVIDIA RTX PRO 6000 (96 GB) with context set to 16,384 tokens, the same Q4_K_M build used a median 19.1 GiB of GPU memory.
Those two context points answer the 24 GB vs 32 GB card question directly. At a 16k context, 19.1 GiB fits a 24 GB card (such as an RTX 3090, RTX 4090 or L4) with nearly 5 GiB of headroom for the display server and desktop. At a 128k context, 22.7 to 23.8 GB leaves almost no margin on a 24 GB card driving a monitor, so long-context sessions belong on a 32 GB card like the R9700 or RTX 5090. A 16 GB card cannot hold the 17 GB Q4_K_M weight file in VRAM at any context length.
| Quantization | Weight file | 16k context | 128k context | Smallest single GPU fit | Basis |
|---|---|---|---|---|---|
| Q4_K_M (default) | ~17.0 GB | 19.1 GiB | 22.7 to 23.8 GB | 24 GB at 16k; 32 GB at 128k | Measured (RTX PRO 6000 at 16k; R9700 at 128k) |
| Q5_K_M | ~19.5 GB | ~21.8 GB | ~26.5 GB | 24 GB at 16k (tight); 32 GB at 128k | Derived from weight size + measured KV offset |
| Q6_K | ~22.4 GB | ~24.7 GB | ~29.4 GB | 32 GB (16k or 128k) | Derived from weight size + measured KV offset |
| Q8_0 | ~29.0 GB | ~31.3 GB | ~36.0 GB | 32 GB at 4k to 8k only; 48 GB for 16k+ | Derived from weight size + measured KV offset |
Only Q4_K_M was run in our tests; Q5_K_M, Q6_K and Q8_0 rows are derived by adding the measured f16 KV-cache and runtime overhead (~2.1 GB at 16k and ~6.8 GB at 128k) to the quantized weight size of a 27.3B dense model.
Cold load from disk took about 5 minutes on the R9700 machine, which has slow storage; a faster NVMe drive loads the 17 GB file in seconds. Idle power with the model loaded was 12 W on the R9700. Qwen3-Coder 30B, the 30.5B mixture-of-experts build we ran alongside it, needs more room for its larger weight file and peaked higher at 128k context (25.8 GB on the R9700, 19.5 GiB at 16k on the RTX PRO 6000) even though it activates fewer parameters per token. For how VRAM scales across 7B, 32B and 72B models at Q4 and Q8, see VRAM for 7B to 72B models, measured.
How fast is Qwen 3.8 27B on an AMD R9700?
79 tokens per second decode, measured from Ollama's own eval_count and eval_duration on the full HumanEval+ run (72 to 85 tok/s from the 10th to 90th percentile). End to end, including prompt processing, that's 71 tokens per second, and the median task took 6.7 seconds (mean 8.2 s, max 32 s, 0 timeouts) at a median 482 output tokens.
We ran with speculative multi-token-prediction (MTP) decoding on, draft_num_predict set to 4: the model drafts several tokens ahead and checks them in one pass. That's the likely reason it decodes faster than a plain one-token-at-a-time estimate for this card; we didn't measure it with MTP off. Published single-R9700 numbers for this model that we've seen range around 25 to 32 tokens per second, with one report showing 24.9 tok/s and 31.9 tok/s with MTP on. Setups differ: backend, quant and speculative-decoding settings all move the number, so treat any single figure, including ours, as specific to its configuration. Ours is Ollama on Vulkan, Q4_K_M, with MTP on.
Qwen3-Coder 30B, which doesn't think before answering, decoded faster: 139 tokens per second median, 129 tok/s end to end, at a median 1.8 seconds per task.
How good is Qwen 3.8 27B at coding?
92.7% of HumanEval+ in one attempt, no retries, run on 2026-09-28. Full results, both models, 164 tasks each:
Download the raw per-task results: Qwen 3.8 27B vs Qwen3-Coder 30B, HumanEval+ (CSV) and, for the hard-task comparison below, the fallback-model bake-off (CSV).
| Model | HumanEval+ | Base | Median s/task | Decode tok/s | J/task | Peak VRAM |
|---|---|---|---|---|---|---|
| Qwen 3.8 27B | 152/164 (92.7%) | 161/164 (98.2%) | 6.7 s | 79 | 2,221 (2,396/pass) | 23.8 GB |
| Qwen3-Coder 30B | 145/164 (88.4%) | 151/164 (92.1%) | 1.8 s | 139 | 448 (507/pass) | 25.8 GB |
One attempt per task, 164 tasks, hidden EvalPlus tests, Ollama defaults, one AMD Radeon AI PRO R9700, run 2026-09-28.
Paired, Qwen 3.8 solved 13 tasks Qwen3-Coder missed, and Qwen3-Coder solved 6 that Qwen 3.8 missed. Exact McNemar p = 0.17 (a paired test on the tasks where only one model passed): no detectable difference on the full HumanEval+ set. The gap shows up on harder problems. We took the 34 coding tasks a Qwen2.5-Coder-7B retry loop couldn't solve in an earlier test (10 HumanEval, 24 MBPP+), ran each model 3 attempts per task against hidden tests (102 attempts total), and Qwen 3.8 27B passed 63 of 102, solving at least one attempt on 24 of the 34 tasks, at a median 16 seconds per call (mean 38 s; 3 of 102 hit the 300-second timeout) and about 9,800 J per call. Qwen3-Coder 30B passed 27 of 102, solving 10 of the 34, at a median 3.5 seconds and about 980 J per call. Holm-adjusted p = 0.0024, a significant gap. For reference on the same subset, gpt-6-astra passed 84 of 102 and gpt-6-luna 70.
Qwen 3 Coder vs Qwen 3.8: which should you run?
Qwen 3.8 for accuracy on hard tasks: it reasons before it answers, and that's where the 63 vs 27 gap comes from. Qwen3-Coder for speed and energy on routine functions where the two tie: it's about 4x faster and uses about 5x less energy per task, and on the full HumanEval+ set the two models aren't statistically different (152 vs 145, p = 0.17). If your workload is mostly straightforward functions with the occasional hard one, route by difficulty rather than picking one model for everything. We haven't measured routing itself here, just the two models on the same tasks, so treat that as guidance from the numbers above, not a tested claim about other workloads. For the broader question of when a smaller model is enough, see small vs large models on the same tasks, where these two runs sit alongside a 7B and a 2B.
How does Qwen 3.8 27B compare to gpt-oss 20B and Qwen3-Coder 30B across 507 tasks?
Across all 507 EvalPlus coding tasks (164 HumanEval+ and 343 MBPP+) with up to 3 attempts per task, Qwen 3.8 27B tied gpt-oss 20B at 84.8% (430 of 507 passed). We ran five open-weight local coding models under identical conditions on one NVIDIA RTX PRO 6000 Blackwell Server Edition (96 GB) in Ollama at a 16,384-token context, giving each model up to two blind retries whenever its code failed a visible test from the prompt:
| Model (Ollama tag) | Overall (507) | HumanEval+ (164) | MBPP+ (343) | Median s/task | Mean J/task (J/passed) | GPU memory |
|---|---|---|---|---|---|---|
gpt-oss 20B (gpt-oss:20b) | 84.8% (430) | 94.5% | 80.2% | 4.3 s | 849 J (1,001 J) | 13.0 GiB |
Qwen 3.8 27B (qwen3.8:latest) | 84.8% (430) | 93.9% | 80.5% | 6.8 s | 1,543 J (1,819 J) | 19.1 GiB |
GLM-4.7-Flash (glm-4.7-flash:latest) | 82.6% (419) | 91.5% | 78.4% | 16.3 s | 2,524 J (3,054 J) | 19.2 GiB |
Qwen3-Coder 30B (qwen3-coder:30b) | 81.9% (415) | 91.5% | 77.3% | 2.2 s | 260 J (318 J) | 19.5 GiB |
Qwen2.5-Coder 7B (qwen2.5-coder:7b) | 81.1% (411) | 87.8% | 77.8% | 1.3 s | 137 J (169 J) | 5.9 GiB |
Up to 3 attempts per task with blind retry on a failed visible test, scored on EvalPlus hidden tests (164 HumanEval+ and 343 MBPP+), num_ctx 16384, num_predict 4096, one NVIDIA RTX PRO 6000 (96 GB), measured 2026-09-29. Raw CSV: best-local-llm-for-coding-measured.csv. Full five-model writeup: best local LLM for coding, measured.
Putting the single-attempt R9700 run and the 3-attempt 507-task run side by side clarifies three practical questions:
- Why the overall score is 84.8% when HumanEval+ is 92.7% to 93.9%. MBPP+ makes up two thirds of the 507 tasks (343 of 507), and its hidden test suite checks stricter edge cases and implicit argument conventions than HumanEval+. Every model in the run scored 10 to 14 percentage points lower on MBPP+ than on HumanEval+ (80.5% vs 93.9% for Qwen 3.8 27B).
- Why blind retries barely moved Qwen 3.8 27B. On HumanEval+, allowing up to 3 attempts raised Qwen 3.8 27B from 152 of 164 (92.7% on the R9700) to 154 of 164 (93.9% on the RTX PRO 6000). Across all 507 tasks, retries added only 3 passes (+0.6 percentage points) for Qwen 3.8 27B, because its internal thinking trace already tests and discards bad branches before emitting code on attempt 1. By contrast, retries added 21 passes for Qwen2.5-Coder 7B (+4.1 points), 29 passes for GLM-4.7-Flash (+5.7 points), 10 passes for gpt-oss 20B (+2.0 points), and 9 passes for Qwen3-Coder 30B (+1.8 points).
- When to pick gpt-oss 20B over Qwen 3.8 27B. On pass rate the two tied to the single task (430 of 507), and paired exact McNemar tests across all 10 model pairs showed no statistically significant difference after Holm adjustment (smallest adjusted p = 0.34). Where gpt-oss 20B wins is footprint and cost per task: it needed 13.0 GiB of GPU memory instead of 19.1 GiB (so it fits a 16 GB card), finished in a median 4.3 seconds instead of 6.8 seconds, and used 849 J per task instead of 1,543 J (45% less GPU energy). Pick Qwen 3.8 27B when you have a 24 GB or 32 GB card and want top single-attempt accuracy without a retry loop, or when you need a strong local fallback specifically for the problems a 7B retry loop fails.
The rig runs in your VPC, or your engineers run it and we interpret the output.
Does it matter where you run the same weights?
Yes, a lot. The same Qwen 3.8 27B weights on Cloudflare Workers AI passed 45 of 102 on the hard-task subset, against 63 of 102 running locally, and 50 of the 102 calls on Workers AI errored or timed out. Same model, different host, different result. If you're calling a hosted reasoning model, set max_tokens explicitly and use a long timeout: a request that doesn't set max_tokens can cut a reasoning model off mid-thought before it ever writes an answer, which is the same max_tokens pitfall we measured on Workers AI reasoning models in an earlier test.
What harness should you run Qwen 3.8 in?
The only harness we've measured it in: a test-driven retry harness with Qwen 3.8 27B as the local fallback model behind a fine-tuned 7B. In one diagnostic run, that combination took the system to 90.2% HumanEval+ and 98.8% Base. That number is a diagnostic, not a clean benchmark: the 7B's training data specifically targeted HumanEval failures, so it isn't a clean held-out number. The retry-loop mechanics are in our 7B retry-ladder measurement, and the case for retrying blind instead of feeding the model its error is in our self-correction test. We haven't tested third-party agent harnesses, Claude Code, OpenCode and similar, with Qwen 3.8 yet.
What hasn't been tested yet?
Other quants: we ran Q4_K_M only, not Q5_K_M, Q6_K, Q8, FP8 or BF16 (the non-Q4 rows in the VRAM table above are derived from weight size plus measured KV cache). Repository-level tasks: everything above is single-function HumanEval+ and MBPP+ problems, not a multi-file codebase with its own build. Long-context quality: we allocated 128k tokens of context during the R9700 runs and 16k during the 507-task RTX PRO 6000 run, but the prompts themselves were short, so this isn't a test of long-context retrieval or speed. Backends beyond Ollama: we ran Ollama on Vulkan (AMD R9700) and Ollama on CUDA (NVIDIA RTX PRO 6000), not vLLM or ROCm.
Frequently Asked Questions
How much VRAM does Qwen 3.8 27B need?
At Q4_K_M the weights are about 17 GB; with a 128k context allocated it used 22.7 to 23.8 GB on a 32 GB AMD R9700.
Does Qwen 3.8 27B run on an AMD Radeon AI PRO R9700?
Yes, fully on the GPU with Ollama's Vulkan backend: 79 tokens per second decode and a median 6.7 seconds per HumanEval task.
Which Qwen 3.8 quant should I use?
We measured Q4_K_M, which passed 92.7% of HumanEval+ in one attempt and fits a 32 GB card with room for a 128k context. We haven't measured other quants yet.
Is Qwen 3 Coder or Qwen 3.8 better for coding?
On HumanEval+ they're close (92.7% vs 88.4%, not a significant gap). On the hardest tasks Qwen 3.8 passed 63 of 102 attempts vs 27. Qwen3-Coder is about 4x faster and uses about 5x less energy per task.
What is the best coding harness for Qwen 3.8?
The one we've measured is a test-driven retry harness with Qwen 3.8 as the local fallback model. We haven't tested third-party agent harnesses with it yet.
How does Qwen 3.8 27B compare to gpt-oss 20B for coding?
Across 507 coding tasks (164 HumanEval+ and 343 MBPP+) with up to 3 attempts per task, Qwen 3.8 27B and gpt-oss 20B tied at 84.8% (430 of 507). gpt-oss 20B used 45% less GPU energy per task (849 J vs 1,543 J), finished faster (4.3 s vs 6.8 s median), and needed 13.0 GiB of GPU memory against 19.1 GiB for Qwen 3.8 27B.
Can Qwen 3.8 27B run on 24GB VRAM?
Yes at Q4_K_M with a 16k context, and right on the limit at 128k. At a 16,384-token context on an NVIDIA RTX PRO 6000 it used a median 19.1 GiB of GPU memory, which fits a 24 GB card with about 4.9 GiB to spare. With a 128k context allocated on our 32 GB AMD R9700 it peaked at 22.7 to 23.8 GB, which leaves almost no display headroom on a 24 GB card.
Methods
- Hardware. Run 1 (2026-09-28): one AMD Radeon AI PRO R9700 (32 GB) with Ollama's Vulkan backend. Run 2 (2026-09-29): one NVIDIA RTX PRO 6000 Blackwell Server Edition (96 GB) with Ollama on CUDA.
- Models. qwen3.8:latest (Qwen 3.8 27B, 27.3B dense, Q4_K_M, 262,144-token native context, thinking on, temperature 1, top_k 20, top_p 0.95, speculative multi-token-prediction decoding on with draft_num_predict 4 on the R9700 run) and qwen3-coder:30b (Qwen3-Coder 30B, 30.5B mixture of experts, Q4_K_M, no thinking). The 507-task comparison added gpt-oss:20b, glm-4.7-flash:latest and qwen2.5-coder:7b at num_ctx 16384, num_predict 4096.
- Task sets. Full HumanEval+ (164 tasks, one attempt each, no retries on R9700). Hard-task subset: the 34 coding tasks (10 HumanEval, 24 MBPP+) a Qwen2.5-Coder-7B retry loop couldn't solve in an earlier test, 3 attempts per task (102 attempts per model). Five-model comparison: all 507 EvalPlus tasks (164 HumanEval+ and 343 MBPP+), up to 3 attempts per task with blind retry on a failed visible test.
- Scoring. EvalPlus hidden tests.
- Energy. GPU board power sampled at 5 Hz (amdgpu hwmon power1_average on R9700; nvidia-smi power.draw on RTX PRO 6000), idle power subtracted, GPU-only boundary.
- Stats. Exact McNemar test on paired outcomes; Holm step-down correction across multiple pairs.
- Data. Full per-task results: qwen-3-8-27b-humaneval-plus-r9700.csv, llm-self-correction-fallback-models.csv, best-local-llm-for-coding-measured.csv.