LiquidAI's Antidoom Slashes AI Reasoning Doom Loops by 95% in Hours
Liquid AI's open-source Antidoom surgically removes doom loops from reasoning models, cutting loop rates by up to 95% without RL or quality loss.
Takeaways
- Liquid AI releases Antidoom, an open-source tool that removes doom loops from reasoning models using a surgical training method.
- Doom-loop rates drop from 10.2% to 1.4% on LFM2.5-2.6B and from 22.9% to 1% on Qwen3.5-4B, with benchmark scores improving across the board.
- The method uses Final Token Preference Optimization (FTPO) to retrain only the single token that triggers a loop, leaving the rest of the model's distribution intact.
- Training takes just 2-3 hours total for a 2-4B model: ~1 hour for data generation on 8 GPUs, 1-2 hours of fine-tuning on a single GPU.
- A key finding challenges conventional wisdom: once doom loops are removed, near-greedy (low temperature) sampling outperforms high-temperature sampling in reasoning models.
- The full pipeline including data generation, detection, and FTPO trainer is free and open source; a detailed blog post covers hyperparameter guidance.
If you've ever deployed a small reasoning model on a hard math or coding problem, you've probably seen it: the model starts a thought, repeats it, repeats it again, and keeps going until it hits the context limit. That's a doom loop, and it's one of the most frustrating failure modes in production reasoning systems. Liquid AI just open-sourced Antidoom, a targeted training method that cuts doom-loop rates by up to 95% in a few GPU-hours, with no reinforcement learning required.
The anatomy of a doom loop
A doom loop is a common failure mode during inference: the model emits a span, 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. The failure is particularly costly because it doesn't just waste tokens -- it actively prevents the model from reaching answers it was already capable of producing.
Three mechanisms combine to create the trap:
- Overtrained tokens: Some tokens in the vocabulary are more likely to be selected in general. 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, but 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.
- Self-reinforcing context: With each repetition, the probability of every token in the looping span climbs toward 1. The model's own output makes the loop harder to escape.
- Low-temperature decoding: At temperature 0, the most likely token is always selected, and a locally reinforced loop has no exit. Higher temperatures help in theory, but once the loop token's probability is close to 1, there is almost no probability assigned to the remaining vocab, so sampling can still get stuck in loops at higher temperatures.
For Liquid AI's early LFM2.5-2.6B checkpoint, the most common loop-triggering tokens were telling: ' the' (11.4% of loops), ' So' (4.5%), 'Alternatively' (3.2%), and 'Wait' (2.6%). These are exactly the hedging and self-correction tokens that reasoning models are trained to use.
Why existing fixes fall short
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. Both approaches treat the symptom rather than the cause, and neither is cheap to apply to a model you didn't train from scratch.
FTPO: a surgical strike on a single token
Antidoom takes a more targeted approach. It identifies the exact token that begins a loop, trains the model to prefer coherent alternatives at that single position, and leaves the rest of the distribution largely untouched. The method is built on Final Token Preference Optimization (FTPO), which was originally introduced in the Antislop paper for eliminating repetitive phrasing in general LLM outputs.
FTPO differs from standard DPO (Direct Preference Optimization -- a common alignment technique that trains a model to prefer one response over another) in four key ways:
- Single-token training: Only trains the trailing token of a sequence that is midway through generation -- not the full response.
- Multiple chosen tokens: This spreads out the probability to a group of alternative tokens, so the model isn't just replacing one overtrained token with another.
- KL-like loss in logit space: Avoids gradient pressure on unrelated tokens by omitting softmax and instead computes divergence from reference in logits.
- Two-part regularization: The logits intended to train (chosen and rejected tokens) are allowed to move more freely with respect to the reference, while the remaining vocab is more tightly constrained.
The training data pipeline is equally precise. The team generates completions on hard prompts at low temperature, flags any sequence that repeats a span of at least 60 characters four or more times, then targets the first token of the first repeat. At that position, the model's top-k alternatives become the "chosen" tokens. Each training row is a tuple of [prompt prefix, one rejected token, up to 20 chosen tokens].
One important detail: over-training can happen easily. Early stopping is triggered conditioned on chosen_win (proportion of samples where chosen tokens are winning vs rejected). Stopping at chosen_win=0.35 typically reduced doom-loop rates from 20-30% down to 1-2% with minimal degradation. Training longer tended to degrade the model, often creating new doom-looping issues.
The numbers
The results are sharp. 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.
Liquid AI also trained Qwen3.5-4B on the Antidoom pipeline, known to produce repetitive loops during reasoning. Its doom-looping rate dropped from 22.9% to 1% under greedy sampling, with eval scores increasing markedly. The benchmark gains aren't from teaching the model anything new -- they come entirely from unblocking answers the model could already produce.
The compute cost is modest: for a 2-4B model, training set generation takes approximately one hour on 8x MI325 GPUs, and subsequent training takes approximately one to two hours on a single MI325 GPU. The pipeline is also iterative -- a second round of Antidoom can catch newly surfaced loop triggers that were masked by the first-round culprits.
A counterintuitive finding about temperature
The most surprising result from the paper challenges a widely held assumption about reasoning models. There has been a prevailing wisdom that higher temperatures may be preferable for reasoning models, allowing them to explore the solution space. However, this intuition may be misplaced, being conflated with the dominant effect of doom-looping. Once doom loops are eliminated, stronger eval performance is seen with near-greedy sampling, at least in the models tested.
In other words, the community may have been running reasoning models hot not because high temperature genuinely helps exploration, but because it slightly reduces the probability of the loop-triggering tokens. Remove the loops, and the case for high temperature largely disappears. This has real implications for inference cost and output consistency.
Who should use this
Antidoom is most relevant if you're working with small reasoning models (2-8B parameters) on hard math, coding, or multi-step agentic tasks. It's also applicable if you're fine-tuning your own reasoning checkpoint and noticing degraded loop behavior mid-training. The method is model-agnostic -- the Qwen3.5-4B results confirm it works beyond Liquid's own LFM family.
The full pipeline -- data generation, loop detection, and the FTPO trainer -- is available at github.com/Liquid4All/antidoom, along with the antidoom-mix-v1.0 dataset on Hugging Face. The official blog post covers hyperparameter guidance in detail. It's fully open source and free to use.