Local model benchmark records
One file per machine, generated by ../bench-record.sh. Compare machines by
diffing the files.
Reproducing on another Mac
git clone https://github.com/gAmUssA/agent-bench && cd agent-bench
# pull the models you want to compare (ollama must be running), then:
./bench-record.sh qwen3-coder:30b qwen3.6:27b devstral:24b qwen2.5-coder:7b
The grader compiles and runs Java, Kotlin and Swift output, so it needs openjdk,
kotlin and Xcode’s swiftc on PATH.
That writes bench-results/<chip>-<ram>gb.md. Commit it and the machines are
comparable.
Run ./bench-record.sh with no arguments to re-generate a record from the
last bench-out/headtohead.log without re-running inference.
What makes the comparison valid
The bench grades by compiling and running each model’s output — a ✅ means
the program actually ran, not that it looked right. That makes it a much better
signal than an eyeballed diff, but it also means several non-CPU things can move
the result. Each record pins them:
| pinned | why it matters |
|---|---|
| model digest | Tags get re-uploaded. Two machines both on gemma4:26b can hold different weights. The digest is the only honest identity — check it matches before comparing. |
| javac / kotlinc / swiftc | A newer Swift release can flip a ✅ to a ❌ with the model unchanged. Without this you would blame the chip. |
| ollama version | Inference-engine changes move tok/s on their own. |
| RAM | Decides whether a model stays on the GPU or spills — the single biggest tok/s cliff. |
If the digests differ between two records, you are comparing two different models, not two machines. Fix that first.
Record on an idle machine, or the numbers are worthless
Background load moves tok/s more than the hardware difference this benchmark is meant to measure. Observed on the M1 Max, same model, same weights, minutes apart:
gemma4:12b |
mean tok/s |
|---|---|
| idle | 27.7 |
during a Time Machine backup (backupd ~49% CPU) |
16.9 |
That is a 1.6x swing from load alone — larger than the entire M1 Max → M3 Pro gap this file reports. A contaminated run does not look wrong; it just looks like a slower chip.
Before recording:
tmutil status | grep Running # 1 means a backup is in flight
sysctl -n vm.loadavg # want the 1-minute figure near 0
ollama ps # no other model resident
Stop a running backup with sudo tmutil stopbackup (it resumes later), and
re-check after. bench-record.sh does not enforce this — it cannot tell a
slow chip from a busy one, which is exactly why it is on you.
What this bench does NOT measure
One-shot generation only — three prompts, no tool calls, no iteration, no multi-file editing.
That distinction matters for picking models. Independent evaluations of Gemma 4 26B found it scoring near frontier models on one-shot coding while underperforming on agentic coding and tool use — plausibly overfit to common agentic harnesses. A model can therefore top this table and still be the wrong choice for the OpenCode/Pi driver, which is a tool-calling loop.
Read this table for the tmux popup slot (prefix + a, one-shot Q&A). Do not
read it as an agentic ranking.
Tasks
| id | tests |
|---|---|
java |
Java 21 sealed interface + records + pattern-matching switch |
kotlin |
kotlinx.coroutines async/awaitAll over a sealed result type |
swift |
Swift 6 actor + Codable + @main, must be clean under strict concurrency |
Prompts live in ../ollama-code-bench-one.sh. All run at temperature 0.1,
num_predict 2048, think: false.
Machines
| record | chip | status |
|---|---|---|
m1-max-64gb.md |
Apple M1 Max, 64 GB | baseline |
m2-pro-32gb.md |
Apple M2 Pro, 32 GB | recorded 2026-08-11 |
m3-pro-36gb.md |
Apple M3 Pro, 36 GB | recorded 2026-08-12 |
m5-max-36gb.md |
Apple M5 Max, 36 GB | recorded 2026-08-12 |
| (pending) | Apple M4, Mac mini | to record |
Cross-machine comparison (as of 2026-08-12)
All four shared model digests match across all four records, so this is the
same set of weights everywhere, and javac/kotlinc/swiftc match exactly
(21 / 2.4.10 / 6.3.3). The only uncontrolled variable is the ollama
version. The M1 Max record additionally covers gpt-oss:20b, gemma4:26b
and gemma4:12b, not yet recorded elsewhere.
Mean tok/s per machine, shared models only:
| model | M5 Max 36 GB | M1 Max 64 GB | M2 Pro 32 GB | M3 Pro 36 GB |
|---|---|---|---|---|
qwen3-coder:30b |
104.7 | 72.1 | 50.3 | 47.6 |
qwen2.5-coder:7b |
76.4 | 49.3 | 31.7 | 27.1 |
devstral:24b |
27.0 | 13.4 | 10.1 | 8.8 |
qwen3.6:27b |
21.7 | 11.0 | 8.2 | 7.1 |
Takeaways:
- The M5 Max is fastest, and the ordering is still memory bandwidth, not chip generation. Max-tier parts beat Pro-tier ones regardless of age: the five-year-old M1 Max stays ahead of both the M2 Pro and the M3 Pro on every model, and the M2 Pro edges out the newer M3 Pro. Decode is bandwidth-bound, so “Max vs Pro” predicts these numbers better than the generation number does.
- The M5 Max lead is uneven, which is the interesting part. It is 1.45x
the M1 Max on
qwen3-coder:30bbut ~2x ondevstral:24bandqwen3.6:27b. The two it doubles are the dense models;qwen3-coder:30bis MoE with ~3B active per token, so it was already the least bandwidth-starved and had the least headroom to gain. - RAM headroom still didn’t matter: the biggest model is 18 GB, so it stays on-GPU even at 32 GB. The M5 Max wins on 36 GB while the M1 Max has 64 GB. A 64 GB advantage would only appear with larger models.
-
devstral:24b’s Swift failure now tracks the ollama version cleanly. Four machines, identical toolchains and digests:ollama machines devstral swift 0.32.6 M1 Max ❌ 0.32.7 M5 Max ❌ 0.32.9 M2 Pro, M3 Pro ✅ The split is perfect, and 0.32.6/0.32.7 failures reproduce across independent runs, so it isn’t sampling noise. Best current explanation: something fixed in 0.32.8/0.32.9 changed devstral’s Swift output. Not yet proven — no machine has been tested at two different ollama versions. Upgrading the M1 Max or M5 Max to 0.32.9 and re-running settles it, and until someone does, treat every tok/s figure here as version-tagged rather than purely hardware.