Flow
Which problems actually stop training
1Rule tests crash
Training stops.
2Number-based checks crash
Error logged, checkpoint passes.
3Data file missing
Check skipped, nobody told.
4Drift helper breaks
Returns zero, which looks like a perfect match.
5Probe compares answers
Short answers win because each token lowers the total.
Today I made my fine-tuning gate able to stop a run. Each time the trainer saves a checkpoint, the gate loads that version of the model and runs some checks on how it behaves. If a check fails, training stops and the checkpoint gets deleted. Good idea. But when I read the code back, I asked what it does when it can't tell. Most of the time, it says pass.
I don't have a log of this version making a call. This is all from reading the code.
Two checks can stop a run, and both can be skipped
Only two of the measured checks can stop training: a probe that looks for the model getting wordy with its reasoning, and a style check against a few sample answers. A crash in the basic rule tests also stops it. Everything else just logs a warning.
The bigger problem is errors. If the rule tests crash, that counts as a failure. If the number-based checks crash, the error gets logged and the gate passes anyway. If a data file is missing, its check is skipped and nobody hears about it. If there are no test cases at all, the score comes out perfect.
A zero that means two things
The helper that measures how far an answer drifted returns zero when it breaks. Zero also means "perfect match." The style check uses that helper, so a broken helper gives a perfect style score.
The probe is grading length
The probe gives the model a question with two answers: a word or two, or a few sentences of reasoning. It passes when the model scores the short one higher. But the score adds up one negative number per token, so a long answer always starts way behind.
A single unsure token adds up to a higher total than thirty easy ones, so the short answer wins on the sum.
So the probe mostly checks which answer is shorter. Averaging per token is better. Comparing the trained model against the original model on the same pair is better still, because that shows whether training moved anything.
Stricter rules, same word matching
The rule checks are stricter than before, but they still just look for words. A model can get around them by phrasing things a little differently.
Add a couldn't-measure state
Each check should report pass, fail, or couldn't measure. If a check that's allowed to stop the run couldn't measure, the run should stop. Helpers should report an error instead of handing back a number that looks fine. That's one extra state and a few lines of code, and this commit doesn't have it.