A doom loop is a common failure mode during inference: the model emits a span (often something like “Wait, let me reconsider…”), then repeats the same span again and again, until the context window is exhausted. Small reasoning models are more prone to this behavior, especially on long thinking traces and hard problems [1].
The commonly applied inference-time fix is to apply repetition_penalty to reweight the output distribution. However, this is a band-aid solution and can degrade performance. Reinforcement learning can target repetitive looping, but it typically requires carefully calibrated rewards and costly online rollouts.
Our method takes a more targeted approach. We identify the exact token that begins a loop, train the model to prefer coherent alternatives at that single position, and leave the rest of the distribution largely untouched. The method adapts Antislop [2], training on chosen/rejected pairs that represent a single completion token, using Final Token Preference Optimization (FTPO). We call our approach “Antidoom”.
On an early checkpoint of LFM2.5-2.6B, 10.2% of completions on hard math and coding prompts produced repetitive loops. After Antidoom training, that rate fell to 1.4%, with eval scores improving across the board as a direct result of reduced looping.
Anatomy of a doom loop
Doom loops can arise in inference from three mechanisms working together:
Mechanism 1: Overtrained tokens + Uncertainty
Some tokens in the vocabulary are more likely to be selected in general. Well-known examples in the wild include "delve" and "testament". This may occur if synthetic data is used in the model's training set, creating higher distributions of these words than would ordinarily occur in human writing. In reasoning models, high-prior continuations often include discourse markers and self-reflection tokens such as “Wait” or “Alternatively.” These tokens are not necessarily bad and can mark a useful change of strategy, a verification step, or a branch in the reasoning trace. However, when the model is uncertain or stuck, they can become attractive fallback continuations, restarting the same local reasoning pattern instead of helping the model make progress.
For an early checkpoint of LFM2.5-2.6B, the most common tokens to begin a doom loop were:
count share token 2277 11.39% ' the' 902 4.51% ' So' 644 3.22% 'Alternatively' 511 2.56% 'Wait' 493 2.46% ' But'
... continue reading