Saturday, December 5, 2026

Local LLMs for Your Delphi Work — Follow-Up: Shootout Qwen3.6 vs. Qwen4

This is a follow-up to the series on running local LLMs against a structured Delphi benchmark (AT1–AT6, plus the VT pre-checks). The first follow-up compared qwen3.6:35b-a3b with KAT-Coder-V2.5-Dev; the second swapped the inference engine for NInfer. This post swaps the model generation: qwen3.6:35b-a3b against its successor qwen4:35b-a3b, both on Ollama, both on the same RTX 5090. The series is no longer only about migration — routing, tool-calling, code comprehension and patching are all part of “your Delphi work” — and the title says so from here on.


The Short Version

On our benchmark, Qwen4 is the best local model we have tested — but it is better, not faster, and it needs a large output budget. Averaged over all seven tests (a missing or empty answer counts as 0), it reaches 80.9 against 70.5 for Qwen3.6, a lead of 10.4 points. It ranks first in our full table, ahead of the dense qwen3.8:27b (76.4), which runs at roughly a third of the speed.

The gain is not spread evenly, and that is the interesting part:

Suite Qwen3.6 Qwen4 Difference
AT1 secrets (EN)47.072.4+25.4
AT2 comprehension64.886.3+21.5
AT1-DE secrets (DE)43.856.8+13.0
AT6 model routing77.884.4+6.6
AT3 patch generation77.884.0+6.2
AT4 complexity routing82.483.6+1.2 (tie)
AT5 tool-calling100.098.6−1.4 (tie)

Both models answered all 390 tasks, so there is only one way to count here. How we got there is described below — Qwen4 needed a second pass.

Code questions improve a lot. Classification and routing were already at the ceiling with Qwen3.6, and Qwen4 does not change that. And on raw generation speed, Qwen3.6 is clearly ahead: about 227 tok/s against about 143.


How We Measured — and What Changed Twice

This post was nearly published with wrong conclusions, so the history belongs here.

Stage 1: old Qwen3.6 numbers. Our first comparison used old Qwen3.6 results (from 18.05., 20.05. and 03.08.2026, produced with an older Ollama) against a fresh Qwen4 run on Ollama 0.40.21. There, Qwen4 led by 14 points on the mean (79.9 against 65.9) and looked about as fast as Qwen3.6. We did not trust it, because the Ollama version differed.

Stage 2: same Ollama. On 05.12.2026 we re-measured Qwen3.6 on the same Ollama 0.40.21, same machine, same tasks, same scoring. The lead shrank to 9.4 points. The effect of the update alone, with the model unchanged:

  • About 60 % more tokens per second (about 227 instead of about 143, mean of AT1, AT2 and AT4).
  • +4.6 points on the mean (65.9 → 70.5), almost entirely from questions about single files (AT1 +5.4, AT1-DE +5.5, AT3 +4.0). AT2 and AT4 to AT6 stay the same within noise.
  • Prompt lengths, old and new, are almost identical, so “the old version silently truncated prompts” is not the explanation. Our guess is the newer backend, plus the MTP speculation that Ollama switches on automatically. That is a guess, not a measurement.

The lesson is blunt: only compare models on the same Ollama version. The older tables of this series are only loosely comparable with the numbers here.

Stage 3: a larger output limit for Qwen4. In the Stage 2 run, Qwen4 had six failures (five in AT1-DE, AT2 and AT3, one in the VT9 pre-check): empty answers or a timeout. All Qwen4 runs used num_predict 8192. We re-ran exactly these six with num_predict 32768 (and, for AT1-DE, a timeout of 1800 s instead of 300 s). All six were answered. Those are the Qwen4 numbers in this post.

Be aware that the frame is unequal for these six tasks: Qwen4 got 32768 tokens; Qwen3.6 ran everywhere with 8192. But Qwen3.6 never hit the limit and did not have a single failed answer, so a larger limit would not have helped it.

The effect on Qwen4 (errors counted as 0 in both Qwen4 columns):

Suite Tasks Qwen3.6 Qwen4, limit 8192 Qwen4, limit 32768 Qwen4 failures at 8192
AT13047.072.472.40
AT1-DE3043.854.856.81
AT212064.884.286.33
AT33077.881.084.01
AT49082.483.683.60
AT573100.098.698.60
AT66077.884.484.40
Mean (7 tests)70.579.980.9

With the larger limit, the lead grows from 9.4 to 10.4 points. The conclusion does not depend on which limit we pick: Qwen4 is ahead in both.

The other conditions:

  • Scoring is keyword-based, no LLM judge. The scorers are the ones from the NInfer post: keyword hits against the gold answer (AT1, AT1-DE, AT2), structure plus content (AT3), the score the run script wrote into the result file (AT4–AT6). That is why Claude Sonnet 4.6 ranks below Qwen4 on AT1 (65.6 against 72.4) in our table, but far above it on AT2 (94.8 against 86.3) — keyword hits reward verbatim identifiers, not judgment. Read the scores as “how many of the expected facts appear”, not as “how good a human would rate the answer”.
  • Settings Qwen4: temperature 0, thinking on (Ollama default). NumCtx 204800 for AT1–AT3, 4096 for AT4. AT1-DE is the exception: 27 of 30 tasks ran at 131072, because the AT1-DE script did not know the model and fell back to its default; the 3 reruns used 204800. The Qwen3.6 script default is thinking on as well, but we did not document it per run.

Where Qwen4 Failed — and Why We Are Not Sure

All six failures were on four test units, and one of them, Unit 1, shows up in every suite. It is not a size effect: Unit 1 is by far the smallest of the four*, so it is the question that is hard, not the file. Here is the rerun with the larger limit:

Task Output tokens (incl. thinking) Duration
AT2 Unit 1, Q130,751214 s
AT2 Unit 2, Q19,099118 s
AT2 Unit 3, Q34,979109 s
AT3 Unit 48,96659 s
AT1-DE Unit 17,92449 s (before: abort after 300 s)
VT9 phase 1, thinking on11,01484 s (before: 0/198 after exactly 8192 tokens)

*) Unit sizes: Unit 1 about 1,100 lines, Unit 4 about 5,300, Unit 2 about 6,400, Unit 3 about 12,200. The units are anonymised; they come from a real production code base.

The honest reading: with 8192 tokens, Qwen4 failed six times, with 32768 never. At least four times the limit demonstrably was too small (Unit 1 Q1, Unit 2 Q1, Unit 4, VT9). For the other two, Unit 3 Q3 (4,979 tokens) and AT1-DE Unit 1 (7,924), the need this time stayed below the old limit. So the earlier failures had another cause there. Probably the model was stuck in a thinking loop at that moment — that is not proven; the thinking text was not stored.

Practical consequence: Qwen4 thinks very long on hard questions — over 30,000 tokens, 3.5 minutes for Unit 1, Q1. Set num_predict generously (32768) and plan for long response times.

The VT pre-checks. The Qwen3.6 column comes from the earlier run, except for VT9 phase 1; we did not repeat the other VT pre-checks on the new Ollama.

Test Qwen4 Qwen3.6
VT2 (JSON fidelity)FAIL — no valid JSONPASS
VT3 (reproducibility)answers “RawByteString”PASS
VT9 phase 1, thinking on (198 MCP tool names)196/198: 94 exact, 76 semantic, 19 wrong; 84 snot run with thinking
VT9 phase 1, thinking off198/198: 56 exact, 115 semantic, 20 wrong; 13 s198/198: 53 exact, 115 semantic, 24 wrong
VT9 phase 2PASS 198/198PASS 198/198
VT5 alignment (exact matches)5931
VT6-C call chain (keyword hits)5/83/8
VT6-A / VT6-B10/10, 9/1010/10, 9/10
VT8-ext no-think / thinking3/5, 4/54/5, 3/5

VT9 phase 1 needs a word about fairness. The VT9 script switches thinking off automatically for qwen3* and gemma4 models, but not for Qwen4. Our first Qwen4 result (0/198, output cut at 8192 tokens) therefore compared Qwen4 with thinking against Qwen3.6 without. Fair comparison: without thinking the two are practically level (56/115/20 against 53/115/24). With thinking, Qwen4 is clearly better (94 exact), but six times slower (84 s instead of 13 s).


Speed — Qwen3.6 Is Faster

Both models on Ollama 0.40.21, same machine:

Suite Wall time Qwen3.6 Wall time Qwen4 tok/s Qwen3.6 tok/s Qwen4
AT1502 s887 s215142
AT1-DE463 s850 s17562
AT22,242 s4,140 s218152
AT3444 s459 s249189
AT4316 s220 s242130
AT5155 s70 s––
AT6308 s105 s––

Qwen3.6 generates tokens clearly faster (about 227 against about 143 tok/s on AT1, AT2 and AT4), and on AT1 to AT3 it also finishes sooner or equally fast (AT1 502 s against 887 s, AT2 2242 s against 4140 s). On AT4 to AT6, Qwen4 is done earlier (AT5 70 s against 155 s, AT6 105 s against 308 s). Presumably it thinks less there; we did not check that. So the honest summary is: Qwen4 is better, but not faster.

Caveats for the Qwen4 numbers:

  • Warm versus cold is a big difference with Qwen4. Cold runs were very slow, presumably because the PLE table is read from disk again; warm, the model generates 86–190 tok/s. The AT1-DE figure of 62 tok/s looks like such a cold run.
  • Ollama switches on MTP speculation automatically (draft-mtp, n_max 4) for Qwen4. The tok/s include that effect, and we did not measure the speed without it.

For the choice of context size, we ran a separate test, with bge-m3 loaded in parallel (our RAG embedding model): 204800 generates at 86.5 tok/s with 1277 tok/s prefill, 247808 only at 65.6 tok/s and 1113 tok/s. At 262144, the scheduler estimates 43.9 GiB and evicts bge-m3 on a cold start. So we chose 204800. We did not test full 256K operation.


A Correction We Owe You Again: “100 % GPU”

The NInfer post corrected the “100% GPU, no CPU offload” claim of the KAT-Coder post. Qwen4 needs the same care. ollama ps shows 100% GPU. The Ollama server log shows something more precise: the per-layer embedding table per_layer_token_embd — 13.4 GB — is mapped as CPU_Mapped in system RAM. “No CPU offload” is therefore true for the weights and the KV cache in the usual sense, but not for this table. If you size a machine for this model, count the 13.4 GB of RAM in addition to the VRAM. We say this plainly because the status line alone would give you a wrong picture.


Two Bugs In Our Own Harness

The first Qwen4 run was done in Windows PowerShell 5.1, and it produced garbage that looked like model failure:

  • 19 of 30 AT1-DE requests were rejected with invalid character after object key. The scripts sent the JSON body as a string, so the umlauts were wrongly encoded.
  • VT9v2 aborted with a parse error because the script had been saved without a BOM. After fixing that, phase 1 first covered only 104 of 198 tools, because three servers have special characters in their tool descriptions. After the second fix: 198 of 198.
  • -SkipExisting also skips empty error files. Six empty files had to be moved away and rerun by hand.

All of this was fixed (UTF-8 bytes, BOM) and rerun; the numbers above come from the clean runs. A harness bug looks exactly like a weak model, and we only saw the difference because 19 rejections out of 30 were implausible. The Ollama-version effect and the VT9 thinking switch described above are the same kind of trap, only quieter: nothing failed; the comparison was simply not level.


The Full Ranking

All values 0–100, errors as 0, mean only over all seven tests. Only the two Qwen rows marked “same Ollama” were measured on the same Ollama version. The other models were measured earlier, on older Ollama versions or other engines, and the Qwen3.6 re-measurement shows that this can be worth several points.

# Model AT1 AT1-DE AT2 AT3 AT4 AT5 AT6 Mean tok/s
1qwen4:35b-a3b (same Ollama, limit 32768 on 6 tasks)72.456.886.384.083.698.684.480.9143
2qwen3.8:27b-q4_K_M63.649.775.185.380.2100.080.676.445
3NInfer qwen3.8-27b int8 no-think62.836.271.782.382.099.681.773.7100
4NInfer qwen3.8-27b nvfp4 no-think61.336.167.980.982.6100.081.772.984
5NInfer qwen3.6-35b-a3b50.939.867.378.784.6100.080.071.6481
6qwen3.6:35b-a3b (re-measured, same Ollama)47.043.864.877.882.4100.077.870.5227
7qwen3.6:27b37.138.056.569.480.8100.077.865.741

tok/s: mean generation rate from AT1, AT2 and AT4. Models that were not run on all seven tests — among them KAT-Coder, gemma4:26b, devstral and Claude Sonnet 4.6 as a reference — get no mean in the full table and are left out here.

Two readings of the table:

  1. Qwen4 improves on the same weight class. It has the same 35b-a3b designation as Qwen3.6, and the same fits-on-one-GPU footprint (with the RAM caveat above). The generation change is worth about 10 points on our mean, measured on equal footing. Part of the gap to the older rows (qwen3.8:27b, the qwen3.6:27b row) may be an Ollama-version effect, because we did not re-measure them.
  2. NInfer on Qwen3.6 is still the fastest by far (481 tok/s). We have not run Qwen4 on NInfer. Whether the engine gain of the NInfer post carries over to this model is an open question — not something we can claim. Note also that Ollama alone has just closed a good part of that gap for Qwen3.6 (143 → 227 tok/s).

What This Means in Practice

If you use qwen3.6:35b-a3b for code comprehension, question answering over Delphi units or patch generation, Qwen4 is worth considering: about +6 to +25 points on keyword scoring. For classification and routing (AT4 to AT6) there is little to gain. But it costs you generation speed (about 143 instead of 227 tok/s), and it thinks for a very long time on hard questions.

What you need to plan for: set num_predict generously (we used 32768 for the hard cases), allow long response times (3.5 minutes for the hardest unit), and use a timeout well beyond 300 seconds. Where a task does not need deep reasoning, switch thinking off — on the tool-name task that costs little in quality and is six times faster. Count 13.4 GB of system RAM on top of the VRAM.

And the cheapest improvement is not a new model at all: update Ollama. The same Qwen3.6 got about 60 % faster and 4.6 points better.

What this post does not claim:

  • That Qwen4 is better in the eyes of a judge. All scores are keyword hits. Claude Sonnet 4.6 stays far ahead on AT2 (94.8 against 86.3), and a human would rate the answers differently than a keyword counter does.
  • That Qwen4 is better as a RAG chat model. The 555-question GV-Chat run — the one that corrected our own 60-question impression in the KAT-Coder post — has not been done for Qwen4. We have no data on it, and that earlier post showed how misleading a quick impression can be on exactly this point.
  • An equal frame on the six rerun tasks. Qwen4 got 32768 tokens there; Qwen3.6 got 8192. Qwen3.6 never reached its limit, so we do not expect a difference, but we did not rerun it.
  • Why exactly Qwen4 failed at 8192. In four of six cases the limit demonstrably was too small. In two it was not; a thinking loop is our guess, not a finding.
  • Comparability with earlier parts. The numbers of the earlier posts come from older Ollama versions and are only loosely comparable with these.
  • Why the Ollama update helps. Backend, MTP speculation — both are guesses.
  • That the speed difference is final. Qwen4 runs with automatic MTP speculation, cold starts swing widely, and we did not measure the speed without speculation.
  • Full 256K operation. We chose 204800; the knock-out criterion was 262144.

The next sensible steps are the 555-question RAG run and Qwen4 on NInfer.


Note on the Use of AI: This article was created with the "assistance" of generative AI. The content, technical statements, and conclusions have been reviewed and revised by the author. The author bears full responsibility for the publication.