Part 6 in Measuring things honestly. Part 1 explained what a benchmark is.
What this is about
You ran a test many times and you have a list of numbers. How do you report them? Most people pick one of two ways. Some quote the best figure, because it looks good. Others quote the average, because it sounds fair.
We do something different. We report the median, which is the middle value, and the range, which is the lowest and highest. Together they tell you what is typical and how much it varies. This article shows why.
Why it matters
The best figure is a lucky figure. Nobody gets it every time.
The average looks fair, but it can be pulled by a single odd result. One slow run, because the machine was busy for a moment, can drag the average away from what a normal run looks like.
Our house rule says it plainly: a benchmark number is a median over the full prompt set, with its range, against a competitor measured in the same session. A figure from a single prompt is labelled as a single reading.
How it works
Step 1: Sort the list
Write your results from lowest to highest.
Step 2: Find the middle
The median is the one in the middle. With five results, it is the third. With an even count, it is the average of the two in the middle.
Step 3: Write down both ends
The range is the lowest and the highest. It tells the reader how far a result might stray.
Step 4: Report the three together
For example: "median 88.9 seconds, range 79.1 to 124.7."
A real example
Here are five timings from our fly simulation. They are how long the older Python runner took to run the same job, five times, in seconds:
88.869, 99.020, 124.713, 79.088, 82.136
Sorted from lowest to highest:
79.088, 82.136, 88.869, 99.020, 124.713
The median is the middle one, 88.869 seconds. The range is 79.088 to 124.713.
Now the average. Add the five and divide by five: about 94.77 seconds. That is nearly six seconds above the median. One slow run, 124.713, pulled it up. If you asked "what does a typical run look like?", 88.9 fits better than 94.8, because three of the five runs finished faster than 94.8.
The range adds the honest part. It says that runs vary from 79 to 125, a big spread. A reader seeing only "median 88.9" would miss that.
The same shape appeared in our video test. One setting scored 0.121 in one shot, 0.105 in another and 0.031 in a third. The best is 0.121 and the worst is 0.031. Reporting only the best would give a very different impression from reporting all three. Their average is 0.086, and their median is 0.105. The one very low shot pulls the average down by almost 0.02. Neither number is wrong. They answer different questions, which is why we show the list too.
Why we use twenty prompts
For our language-model engine, we run twenty different prompts and take the median speed. One prompt might be short and easy, another long and hard. Twenty give a fair picture of ordinary use. A single prompt gives an instrument reading, which is useful for debugging and which we label that way.
We also compare to a competitor measured in the same session on the same twenty prompts, so that the median means something. The mojo-baro page lists rows this way: "20-prompt median, llama.cpp 111.34, mojo-baro 148.89".
When the median is not enough
The median hides the tails. If one run in ten is terribly slow, the median will not show it, and the range will only show one terrible run. For a service where the slow runs hurt users, you need to look at the whole list, or at a high percentile (the value that most runs fall below). For benchmarks that compare two versions, the median plus the range is a good start.
Also, the range depends on how many runs you did. More runs tend to find a wider range. So always say how many results the range covers.
Glossary
- Median: the middle value of a sorted list.
- Mean (average): the sum divided by the count.
- Range: the lowest and highest values.
- Outlier: a result far from the rest.
- Percentile: the value below which a given share of results fall.
- Prompt: the text you give a language model to start it.
Try it
Time a task five times, such as loading a web page. Write the five times. Find the median and the range. Then compute the average. Is the average close to the median? If one run was slow, you will see the gap.
For a real set of results published with medians and ranges, look at the results table on the mojo-baro page. It names its prompt count and the date for each row.
A short habit
Whenever you see a single speed number, ask three questions. Is it a median or a best case? What is the range? How many runs does it cover? If the answers are missing, treat the number as a hint and not as a result. We ask the same questions of our own figures before they go on the blog.
What to remember
Report the middle and the spread. One tells you what is typical, and the other how far to trust it.

Comentarios
Aún no hay comentarios.
Iniciar sesión para comentar.