Skip to content

Benchmark Results

The standardized test (ollama-agent probe) measures per model and per endpoint: complexity levels 1–5, largest context size handled (needle test up to 256k, call timeout 10 min), response times, and stability. All 25 models were tested on both lab servers (probe show for the full table); here are the usable candidates on the fast server (11434):

ModelLevelsContext (actual)Tok/swarmNote
gemma4:26b-a4b-it-qat5/5256k35.36.6sfull declared window usable (256k in 4m08s) — best all-rounder
gemma4:e4b5/5128k (model max)94.70.8s128k in 25s! — ideal router + fast worker
qwen3.5:9b5/5256k98.74.0s256k in 1m22 — fastest large-context model
gemma4:12b-it-qat5/5256k71.23.7sbalanced
qwen3-coder:latest5/5256k30.91.0s256k just under the timeout (9m08) — code reference
gpt-oss:20b5/5128k (model max)52.02.2ssolid
krishairnd/Gemma-4-Uncensored5/5128k (model max)54.02.1suncensored option
nemotron-cascade-25/5128k28.74.8s256k failed on content (needle not found)
glm-4.7-flash:q4_K_M5/5128k26.812.9sq8_0 variant: 64k timeout, not worth it
llama3.1:8b2/5128k77.70.5sfast, but fails at logic + tool chaining

Failed (selection): mistral/mistral-nemo (calculate incorrectly, 0–1/5), deepseek-r1 (no tool support), qwen3.5:27b and gemma4:31b (2–4 tok/s, context breaks down early), gurubot/girl (0/5). On the 11436 server the same models pass the same levels, but everything is 2–5× slower and contexts end 1–2 levels earlier (timeouts).

Two lessons from this run:

  1. The matrix is a server property, not a model property. The same gpt-oss:20b handles the 32k test in 27 seconds on the NVIDIA instance and runs into the 10-minute timeout on the CPU instance. That’s why the probe measures per endpoint, and the agent calculates using the minimum across all servers the pool can route to.
  2. The probe reveals configuration mistakes: the lab servers had been mentally swapped — port 11434 is the NVIDIA instance (RTX 3080 Ti), port 11436 the deliberately CPU-only instance with a 262k default context. The measurements (77 tok/s = GPU class, size_vram in /api/ps) uncovered this before the wrong assumption made it into operation.

The detailed values (all level timings) live in state_dir/model-matrix.json; the agent automatically uses the measured context sizes for history compaction. Level results (which model handles which complexity) were identical on both servers — capability is model-side, speed is server-side.

Measured with cmd/modelbench against an Ollama 0.30 server (RTX GPU with 12 GB VRAM). To test your own server:

Terminal window
go run ./cmd/modelbench -host http://<server>:11434 -models "mistral:latest,llama3.1:8b,..."

Three disciplines per model:

  • Arithmetic: simple correctness + response speed (the first call’s time includes model loading)
  • Tool call: does the model correctly invoke a tool (structured = native format, salvaged = rescued by the parser, none = not at all) and does it relay the result?
  • Classification: suitability as a router model — sorting 4 test inputs into categories (JSON schema enforced, thinking disabled)
ModelSizeArithmeticTool callClassificationTime/classif.
mistral:latest4.4 GBok, very faststructured ✓4/41.9s
llama3.1:8b4.9 GBokstructured ✓4/42.1s
qwen3-coder:latest18.6 GBokstructured ✓ (6.6s)4/41.2s
gemma4:12b-it-qat7.2 GBokstructured ✓4/44.6s
qwen3.5:9b6.6 GBok, but slow (thinking)structured ✓4/43.2s
gpt-oss:20b13.8 GBokstructured ✓4/412.7s
mistral-nemo:latest7.1 GBwrong (17+25=32!)structured ✓4/42.5s
deepseek-r1:8b5.2 GBok, slowno tool support4/444s
  1. mistral:latest is the best router: fastest correct classification, smallest model. llama3.1:8b is an equally good fallback.
  2. llama3.1:8b is the best workhorse for chat and tool calling: reliable, native tool format, no thinking overhead.
  3. qwen3-coder is the first choice for code — and also an excellent classifier on the side. But: 18.6 GB doesn’t fit in 12 GB VRAM (partial CPU offload, noticeably slower) and it occasionally emits tool calls as XML text (caught by the salvage parser).
  4. Use thinking models (qwen3.5, deepseek-r1) with care: they “think” before every answer (30–50s). For router/summarize calls the platform disables thinking automatically; in chat, the latency remains. deepseek-r1 also cannot use tools — unsuitable as an agent model.
  5. mistral-nemo fails: calculates incorrectly (17+25=32). Do not use for factual tasks.
  6. Models > 12 GB (gpt-oss:20b, qwen3-coder) run on the GPU only with CPU offload — it works, but costs noticeable speed.

The context depth test changes the picture

Section titled “The context depth test changes the picture”

The needle test (above) only tells you whether a model finds a fact in a large context. The depth test (probe deep) measures whether it actually understands the context — and that reshuffles the recommendation:

ModelContextDeep scoreRetrievalMulti-hopAggregation
nemotron-cascade-2128k100%3/34/46/6
glm-4.7-flash:q4128k77%3/34/43/6
gpt-oss:20b128k62%3/32/43/6
qwen3.5:9b128k54%3/34/40/6
gemma4:e4b / gemma4:12b128k38%3/32/40/6
qwen3-coder256k38%3/32/40/6
mistral32k31%2/32/40/6
gemma4:26b-a4b256kTimeout*

*gemma4:26b: the depth test at large context can’t be run on the 12 GB card (>60 min per run due to RAM offload). Capability 5/5, but unsuitable for large contexts on this hardware.

Two key findings:

  1. Retrieval ≠ understanding (the RULER effect): almost all models find facts (3/3), but when aggregating across the whole document, most collapse to 0/6. A pure needle test would have waved them all through as “128k ✓”.
  2. The previous all-rounder gemma4:26b is out for large context — not due to incapability, but because the depth test doesn’t run in a reasonable time on the 12 GB card. For large-context work, nemotron-cascade-2 (100%) wins.

The full derivation and step-by-step guide live in the Model Guide. Short version of the mapping for this lab setup:

CategoryModel (fallback)Reason
routergemma4:e4b (mistral)fastest reliable classification
chatqwen3.5:9b (gpt-oss:20b)5/5, 98 tok/s, good all-rounder
codeqwen3-coder (gemma4:26b)code specialist, 5/5
tool_callinggpt-oss:20b (qwen3.5:9b)strong tool chaining, deep 62%
summarizenemotron-cascade-2 (glm-4.7-flash)highest deep score (100%) for document understanding

Notes:

  • Pool effect: the agent calculates using the conservative context minimum across all endpoints. As long as the slow CPU instance (11436) is in the pool, min(nvidia, cpu) applies for a model. For large-context work, remove the CPU instance from the config or accept it as a failover backup.
  • Server topology (docker-compose on the ai-server): ollama-nvidia port 11434 (RTX 3080 Ti, KV cache q8_0), ollama-cpu port 11436 (deliberately CPU-only, 262k context), AMD instance on 11435 prepared but disabled.