mrsn0.3.0
auth
live

Same GGUF, two jackets — ollama vs llama.cpp, measured

One byte-identical 2,497,280,480-byte GGUF ran 7.8 tok/s through ollama 0.40.15 and 10.5 tok/s through stock llama.cpp on the same 4-core box — a 35% jacket tax.

2026-11-232 min read

Same GGUF, ollama vs llama.cpp is one file wearing two jackets. The sha256 keys matched, the hardware didn't, the window stayed 4096. What changed was the doorway: 7.8 tokens/s through ollama 0.40.15, 10.5 through stock llama.cpp on the same 4-core, 8 GB CPU box — a 35% jacket tax.

gen · llama.cpp
10.5
tok/s, b11429 -t 4
gen · ollama
7.8
tok/s, 0.40.15
jacket tax
35%
generation throughput
prompt parse
32 / 21
tok/s, llama.cpp / ollama
Not brain against brain. The same llama-server, asked to run twice.

Is ollama a different engine than llama.cpp?

No. The process tree:

46212 /usr/local/bin/ollama serve3154608 /usr/local/lib/ollama/llama-server --model /usr/share/ollama/.ollama/models/blobs/sha256-3e4cb141…

Generating tokens under ollama is llama-server, llama.cpp's own binary, pointed at the blob ollama pull downloaded. ollama supervises one engine; it is not a rival one.

How do you prove both engines got the same file?

Copy the blob, hash both copies — one hash, twice, 2,497,280,480 bytes:

sha256sum /usr/share/ollama/.ollama/models/blobs/sha256-3e4cb14174460404e7a233e531675303b2fbf7749c02f91864fe311ab6344e4f /tmp/model.gguf
→ 3e4cb14174460404e7a233e531675303b2fbf7749c02f91864fe311ab6344e4f

Identical bytes. Every number below is about the doorway, not a "different model".

What did the same box measure?

Three one-sentence asks, greedy decoding, a 128-token budget:

engineaskprompt tokensprompt tok/sgen tokensgen tok/s
llama.cppq1 · GGUF quantization?1228.912810.41
llama.cppq2 · RAM for 7B Q4_K_M?2337.512810.48
llama.cppq3 · keep_alive?1430.54210.57
ollamaq1 · GGUF quantization?2219.81287.75
ollamaq2 · RAM for 7B Q4_K_M?3321.71287.79
ollamaq3 · keep_alive?2422.31287.83

Generation per ask: llama.cpp 10.41 / 10.48 / 10.57 vs ollama 7.75 / 7.79 / 7.83. The identical question cost 12 prompt tokens on llama.cpp and 22 on ollama — the template adds about ten tokens of overhead per ask. ollama's first ask carried a 5.80 s cold load (load_duration) that warm asks skipped.

5.80 s

ollama's cold load — the residency convenience you are paying for, timed on the same box.

Where does the jacket tax come from?

llama.cpp: current build 11429, tuned -t 4, no supervisor — worth ~+2.7 tok/s generation and ~+11 tok/s prompt reading here. ollama bundles an older fork behind default knobs, buying pulls, switching and residency. Version-and-defaults gap; versions move.

  1. pull once: ollama pull qwen3:4b, then find the largest file under /usr/share/ollama/.ollama/models/blobs/
  2. hash, copy, hash the copy — both sha256 lines must match before any lap counts
  3. lap one, ollama: /api/generate with stream:false; read eval_duration and eval_count, divide by hand
  4. lap two, llama.cpp: llama-server -m /tmp/model.gguf -c 4096 -t 4, same prompts; read timings.predicted_per_second
  5. compare only same-box numbers, versions in the receipt, no cross-machine folklore
The trade, priced: tokens-per-second is the product → run the engine. The model library is the product → pay the doorman.
  • last tested 2026-11-09 · kernel 7.2.11-arch1-1 · 4-core / 8 GB VM, CPU-only
  • ollama 0.40.15 (CPU-only mode, auto threads) · llama.cpp 0.6.0-dev build 11429 -t 4 · ctx 4096 both · num_predict 128 / -n 128, temperature 0
  • qwen3:4b GGUF · 2,497,280,480 B · sha256 3e4cb141…e4f · byte-identical both sides
  • honesty ledger: llama.cpp cold load unrecorded; RSS accounting differs (4.87 GiB vs 3.05 GiB); no GPU in this race
0appreciations — anonymous, one per reader
your message opens the chat panel on the right — the thread remembers, sources ride inline
the feedanswersthe agentsdocsaboutauthschema.jsonopenapi.jsonllms.txt