What this is about
A runaway is when a model gets stuck in a loop and cannot stop. Ours once made the same tool call 223 times in a single message. It had learned the format of a call. It had not learned when to stop.
We tried to fix it with a sleep step, where the model practices and trains on its own good answers. That did not cure it. A long run of extra reading did. This article tells both parts, and how we think about what we do not know.
Why it matters
A model that loops is not just annoying. It wastes time, fills memory and, if it can call tools, it could do real work 223 times. Knowing where loops come from, and how to measure them, makes a model safe enough to use.
It also shows a habit we find useful: write down what you tried, and say what the evidence does not separate.
How we found the shape of the problem
We used a loop with three steps. In the wake step the model attempts training questions and a checker marks each answer. In the dream step the model writes new practice questions. In the sleep step it trains on the attempts that passed.
We started with the wake set: 1,388 training question families, each sampled 8 times, giving 11,104 attempts. The checker passed 4,875 and a further filter kept 4,481, which is 40 percent.
The hole was arithmetic. Of 5,696 calculator attempts, only 65 passed. The model answered sums by calling our lookup tool, not the calculator. We counted a runaway as more than 8 calls in one message. Of 378 of them, 343 were calculator rows. The loop was mostly an arithmetic habit.
The first sleep arms paid in the wrong currency
Our watch score for general language is bits per byte, where lower is better. A sleep step that raises it makes the model worse at everything else.
Our first arm raised it by about 0.96 percent, over our limit of 0.5. The next arm added 3,000 rows in the style of a phone app's tools and raised it by 0.9 percent, another miss. It did lift the app test from 0 of 8 final answers to 6 of 8. We must say plainly that this arm was added without a written prediction, so its numbers are exploration.
The long night of reading
The overnight run, called P1, continued the training of the same model for 67,140 updates. That is 1.1 billion new tokens of unseen Wikipedia, papers, code and our own notes. Ten percent of each batch was the phone app's tool rows.
| model | bits per byte | tool test (of 56) | runaway | dev gate (of 16) | app finals (of 8) |
|---|---|---|---|---|---|
| before | 1.2951 | 50 | 223 | 15 | 0 |
| after P1 | 1.2330 | 55 | 1 | 9 | 7 |
The runaway was gone. The score on general text fell by 4.8 percent, which is good. The app answers went from 0 to 7. But look at the dev gate: the model dropped from 15 of 16 to 9 of 16 on questions it had found easy. P1 fixed the loop and broke something else.
Did sleep cure it?
We ran one clean test of the sleep loop on the original model. A seventh arm, A7, trained a small add-on with no tie to the starting model. The runaway stayed in all three seeds. So sleep did not cure it, and the missing tie was not the reason. We credit P1's data. That is our best explanation, not a controlled result.
Repairing the new damage
To get the dev gate back we built arm A8. Its parts, in plain words: the base model is frozen, so its numbers do not move. A thin add-on of 64 ranks is trained instead. A penalty keeps the output close to the starting model's. Then the add-on is merged back in.
A8 brought the dev gate to 16 of 16 at a cost of only 0.03 percent in bits per byte. It matched P1 on the tool test and app answers inside the seed range. And it needed 13 percent less time per step than normal training: 142.2 milliseconds against 163.4. That 13 percent rests on one run each, and against a lower reading of the normal step it is about 9 percent.
What broke around the edges
None of these changed a verdict, but they cost real time:
- About 25 minutes of the long run were lost when side experiments on the same card ran it out of memory. Long runs now run alone.
- The sleep script never passed its port to the tool test, so two jobs used the same port.
- An 832 MB checkpoint filled the disk to 192 KiB free. We now delete each checkpoint after its run.
What this does not show
P1 was one run with one data mix. We cannot say which part of the 1.1 billion tokens ended the loop. The phone-app tool rows were part of the mix, so "more reading" is not cleanly separated from "more tool practice". The A7 result is our nearest control, and it only rules out one cause.
To break the claim, take the old model and give it a sleep-only phase of the same length with no new tokens. If the runaway goes away, sleep was the cure and this article is wrong. We did not run that arm.
Words you may not know
- Runaway: the model repeats the same action and does not stop.
- Pretraining: the long first stage of training on general text.
- Checker: a program that marks an answer right or wrong.
- Frozen: not allowed to change during training.
- Bits per byte: a score for predicting unseen text. Lower is better.
- Seed: the random starting point of a run.
- Dev gate: 16 easy check questions the model had to keep passing.
- Add-on: a thin set of extra numbers trained beside a frozen model, then merged in.
Try it
Our engine for small models is described on the mojo-baro project page, and the code is on GitHub. More of our training results are on the blog.
If one of your own programs loops, try the same first step: count it. Write down how many repeats count as a loop, and measure how often it happens before you change anything. Share your count at gllm.forum.
Read next
The Runaway Ended With More Reading, Not Sleep has every table, and 223 Calls in One Message covers the loop itself.

Commenti
Ancora nessun commento.
Accedi per commentare.