Ollama 0.40.19 on the Mac mini: same speed, a better cache, one renamed runner
My Mac mini serves Qwen 3.8 27B to the pi coding agent, and the two benchmark campaigns that measured it ran on Ollama 0.40.12. The 0.40.19 changelog claimed things that touch those measurements: multiple requests served at once on Apple silicon, faster MLX sampling, and a changed mapping for disabled thinking. So I upgraded and re-measured everything. The short version: the speed did not move, the cache got better, and the upgrade itself bit.
The upgrade bites first
brew upgrade ollama installed 0.40.19 and after the daemon restart every
inference request failed with HTTP 500, MLX runtime is not available. The
new keg renames the MLX runner directory from mlx_metal_v3 to
mlx_metal_v4, and my LaunchDaemon pins OLLAMA_LLM_LIBRARY=mlx_metal_v3,
so the server searched for a library that no longer existed. The fix is a
one-word sed on the plist plus a full bootout and bootstrap (a
kickstart restarts the process but does not re-read the plist). The lesson
generalizes: if you pin the runner library, list
/opt/homebrew/Cellar/ollama/<version>/libexec/lib/ollama/ after every
upgrade and check the pin before you wonder why the server answers version
queries but nothing else. Homebrew also removed the previous keg during the
upgrade, so there is no quick rollback.
What did not change: every speed number
Prefill still runs at the M4 Pro bandwidth floor: 102 tok/s at 3.6k tokens (102.6 on 0.40.12) and 124 at 15.3k (127.9 at 14.4k), the same curve. Decode is identical within run-to-run spread. I re-ran the full sweep, four kinds of content, both models, ten runs each, 80 runs:
| content | base, old to new tok/s | adapted, old to new tok/s |
|---|---|---|
| prose | 27.4 to 27.3 | 20.2 to 20.2 |
| code | 31.0 to 30.9 | 22.7 to 22.7 |
| enumeration | 26.1 to 26.0 | 19.3 to 19.3 |
| creative | 23.6 to 23.9 | 18.6 to 18.7 |
The speculative decode internals move with it: tokens per pass, milliseconds per pass and acceptance all agree to within 1.5%, the adapted model is still slower than the base on all 400 pairings, and the per-content ratios stay at 0.74 to 0.78. The claimed faster MLX sampling does not show up for this model. Since an agent turn is prefill plus decode plus tool waits, and the two server-side terms are unchanged, the agent benchmark numbers from both campaigns carry over to 0.40.19 as they are.
What changed: the cache, the queue, and the thinking metadata
The KV cache no longer evicts interleaved sessions. On 0.40.12 the cache held a single sequence: any unrelated request evicted it, and the interrupted session restarted with a full cold prefill. On 0.40.19 I measured the interrupted case directly: a conversation resumed after an unrelated request in between reused 6713 of 6733 tokens, 0.35 s of prefill instead of 66. The cache is still extension-only, so a new session pays its own full cold prefill no matter how many sessions came before, but switching between two clients no longer costs either of them a restart.
Concurrency is served but not free. Two roughly 3k-token prefills launched together now run simultaneously instead of queueing, and each took 108 s where one alone takes about 29 s at the measured rate. The second request finishes later than queueing would have delivered it. On a machine whose prefill is bandwidth-bound, one session at a time remains the right rule; the improvement is that an accidental second client no longer destroys the first one’s cache.
Thinking is still default-on, and now it says so. The
OpenAI-compatible /v1/chat/completions still ignores think: false,
enable_thinking: false and chat_template_kwargs; only reasoning_effort
works, exactly as on 0.40.12. What is new is that /api/show reports the
model’s thinking metadata, values: [false, low, medium, xhigh] with
default: medium, which is the cleanest explanation yet of why a client
that sends nothing reasons: the model metadata says so. There is still no
server-level override (the feature request is
ollama/ollama#10928), so the
enforcement point stays on the client: pi’s defaultThinkingLevel: "off"
plus a thinkingLevelMap that maps off to reasoning_effort: "none", set
on every machine that runs pi against this server.
Reproduce
python3 decode_decompose.py --url http://zoncamini:11434 --ssh-host macmini \
--models qwen3.8:27b-nvfp4 qwen3.8-pi:27b-nvfp4 --reps 10 --sweep
Tools: lora-merge-tools. The
cache and thinking probes are three short curl calls each against
/api/chat and /v1/chat/completions with a long system prompt.