agent-bench

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: