Part 9 in Gates that lie. Earlier parts include what a gate is and a test that cannot fail.
What this is about
When you test new code, you usually compare it with a trusted version. That version is the reference, or answer key. If the new code gives the same answers, it passes.
But what if the answer key is wrong? Or what if the pass mark is set where nothing can reach it? Then the new code fails, and you blame the new code.
This article is about a time that happened to us, and the one simple step that would have caught it sooner.
Why it matters
A false failure wastes days. You hunt for a bug that is not there. Worse, you might throw away good work.
The opposite also happens. If a mark is too low, bad code passes. Both come from the same mistake: trusting the mark without testing it.
How it works
The case
We had a small change to a language model, a kind of patch called a LoRA. We tested it with a gate that compares our engine with a well-known program, llama.cpp. The gate runs twenty prompts, generates 64 words (more exactly, 64 tokens) for each, and scores how closely the two agree. The bar was frozen in advance: at least 90 percent on the worst prompt.
The patched model scored 96.89 percent overall. On its single worst prompt, it scored 89.06 percent. Below the bar by 0.94 points. The patch looked broken.
The missing step
Nobody had run the original, unpatched model against that same bar. All earlier results for that prompt compared our own engine with our own engine, and not the base model against llama.cpp.
So we ran it. The unpatched control also failed, with 89.06 percent on a different prompt.
| Unpatched control | Patched | |
|---|---|---|
| Worst prompt | 89.06% | 89.06% |
| Overall | 1230 of 1264 = 97.31% | 1216 of 1255 = 96.89% |
Both worst scores were exactly the same number. That is not a coincidence.
Why the numbers were stuck
With 64 tokens per prompt, the score can only take certain values. 57 right out of 64 is 89.06 percent. 58 out of 64 is 90.63 percent. There is nothing in between. A bar at 90 percent sits in a gap. No prompt can score 90.00, so any prompt that misses by a single token reads 89.06 and fails the bar.
The bar was unreachable by construction. It was a property of the scoring grid, and not of the patch.
We ran the control twice, on separate servers, and got the same 1230 of 1264 both times. The result is stable. What moves is which prompt is worst. The worst prompt for the control was the third best for the patched model, and the other way round. Taking the minimum of 20 picks whichever prompt happens to land worst, and that changes from arm to arm, while the overall score hardly moved: down 0.42 points.
The fix
We changed the bar to compare the overall score of the patched model with the overall score of the control. The patch then passed.
It was not the first time
An earlier gate asked for perfect agreement on all 64 tokens of 20 prompts. Our expert-routing model reached 53.20 against it and was treated as failing for a whole session. The dense model we actually ship reached 51.90 against the same reference on the same day. So the model called broken was already above the model known to be good.
And the reference itself has limits. llama.cpp in one of its own supported settings (a 16-bit cache) misses its own 32-bit reference at 5 of 7 tested lengths. A reference checked against itself, in another valid setup, still disagrees. That is why our standing check compares each word with the reference one at a time, and starts each comparison from the reference's own text, so one early difference cannot spoil every word after it.
The rule
Before a pass mark is frozen, measure what the mature, trusted path actually reaches against the same reference. If the original cannot pass, the mark is wrong.
What counts and what does not
Counts:
- Running the unchanged original against the same mark, on the same day.
- Running it more than once, to see that the result is stable.
- Checking what values a score can take at all.
Does not count:
- Trusting a mark because it was written down carefully.
- Comparing a patch with an older result from a different setup.
Glossary
- Reference: the trusted version you compare with. Also called the oracle or answer key.
- Control: the unchanged original, run through the same test.
- Gate: a check that decides whether work goes forward.
- Floor / bar: the lowest score that counts as a pass.
- LoRA: a small add-on that changes a model's behaviour without retraining all of it.
- Token: a small piece of text.
Try it
Pick any pass mark you use: a test percentage, a speed limit, a score. Ask, "Did the original ever pass this?" If you do not know, run it.
You can see this habit in code in mojo-port. The Python original is always run first, and its output is the reference. If the original itself fails or behaves oddly, you see that before you judge the port.
What to remember
Check the answer key. A bar that nothing can clear makes good work look bad.

Comments
No comments yet.
Log in to comment.