Measurement
Keep a local LLM performance log that survives upgrades
By llamaperf · · 5 min read
Quick answer
Save a setup you know works and rerun the same few tasks after every meaningful change, with versions, settings, timings and results together in one log. When you're hunting for a cause, change one thing at a time. Hang on to the old setup until the new one passes.
Capture a setup you could restore
Everything you'd need to rebuild it
Start from a configuration that works for you today and save the model name and revision, quantization, engine version and build, hardware, context size and any runtime flags. Keep the command or config file itself too. On llama.cpp, llama-bench takes prompt length, output length and repetitions as flags, which means a rerun months later can match the original exactly. By default it uses a 512-token prompt, 128 generated tokens and 5 repetitions.
"Each test is repeated the number of times given by
-r, and the results are averaged." (llama.cpp: llama-bench)
Why bother
Engines move fast, and a speed drop can ride in on an update you barely looked at. In a llama.cpp report from August 2026, a user on an RTX 5080 saw prompt processing on the same first task fall from 1,029 to 413 tokens per second over four nightly builds (llama.cpp issue 26918). They'd logged every build along the way, so they could point to where it went wrong.
Write down what your baseline does well and where you already know it struggles. Speed isn't the point of a baseline. You want one you understand and can repeat, and the report template has the fields to start from.
Keep a small, stable test set
A handful of real tasks
Pick five to ten prompts from your real work, each with a clear pass check. Put in your longest routine input and one task that has tripped a model up before. Store the input files beside the prompts so every run gets identical material.
Add without replacing
Adding tasks is fine as long as a fixed core stays put. That core is what lets you compare one version with the next, and it keeps you from setting a new prompt set against an old one without noticing.
Which numbers you need depends on the work. In chat you feel the wait before the first word, and the total time, far more than server throughput. For a batch job, record the finished workload and how many requests ran at once. Whatever you choose, keep the definitions the same every time. The Ollama speed guide shows how to read clean timings from one runtime.
Store raw results with the summary
One row per run
Keep it compact, one row per run with a link to the saved output. Failures and the odd slow run stay in. If you publish a median, say which runs went into it.
| Field | What to write |
|---|---|
| Change | The exact version or setting you changed |
| Task | A stable name for the prompt and input |
| Conditions | Loaded or cold, cache reuse, other work running |
| Outcome | Checks passed and anything you fixed by hand |
| Timing | What you measured, units and the value |
| Evidence | Saved response, command output or patch |
Know what your tool leaves out
Each tool times a slightly different slice of the work, and llama-bench is upfront about its own:
"The measurements with
llama-benchdo not include the times for tokenization and for sampling." (llama.cpp: llama-bench)
A llama-bench figure and a stopwatch on a chat app won't agree, and both can be right, so note which one you used. When you've missed a measurement, leave the cell empty. A number estimated after the fact makes everything around it harder to trust.
Decide whether to keep the change
Judge on work done
Compare tasks passed and total time. Your single best run tells you very little. If something gets worse only on long inputs or on one kind of task, look into it before you give up the known-good setup.
One variable when you're hunting
Finding a cause means changing one thing and rerunning the same tests. Swap the whole stack at once and what you have is a comparison of two setups, which is enough to choose between them and won't tell you which change made the difference.
Keep the old configuration until the new one passes your checks, and note the date you switched and why. Do that after each meaningful update and the history builds itself, with no daily benchmarking. The quantization test uses the same method to choose between two files.
A regression you caught with both builds logged is worth passing on, since anyone on the same engine may run into it. When you share a result, give the settings and how you measured. The benchmark guide lists what readers check first.
Frequently asked questions
How do I know if a llama.cpp update made my setup slower?
Run the same llama-bench command or task set on the old build and the new one, with identical settings, and compare. Don't remove the old build until you're sure. If you report a regression, give both build numbers.
What settings should I record with a local LLM benchmark?
Model and revision, quantization, engine and build, hardware and driver, context size, and prompt and output lengths. Note too whether the model was already loaded and what else was running on the machine.
Why don't my llama-bench numbers match what I see in my chat app?
Because they're measuring different things. llama-bench skips tokenization and sampling and uses fixed prompt and output lengths, while a chat app includes those, plus your real prompt and history. Note which method each number came from.
How many times should I repeat each test?
llama-bench defaults to 5 repetitions and reports the average and standard deviation. Five works for your own task set as well. Keep every run, so the outliers stay where you can see them.
Are my benchmark numbers comparable to other people's?
Sometimes. The model file, quantization, engine, context and measurement method all have to match, and a log that records all of them is how you find out whether they do.
Should I update my inference engine as soon as a new version comes out?
Update when you've got time to rerun your test set, and keep the previous version installed until the new one passes. Nightly builds bring regressions as well as speedups.