Liquid AI published a post-training method called Antidoom that targets the single token where a language model starts repeating itself. On an early checkpoint of its LFM2.5-2.6B model, the technique cut looping completions on hard math and coding prompts from 10.2 percent to 1.4 percent. On Qwen3.5-4B, the rate dropped from 22.9 percent to 1 percent under greedy decoding. For any team running agents or long-form generation in production, this failure mode is not cosmetic: a looping model burns its entire context window repeating one sentence, forcing a timeout or a wasted API bill with no usable output.
Repetitive degeneration, what Liquid AI calls a doom loop, is a known inference failure in which a model settles on a short phrase, often a hedge such as “Wait” or “Alternatively,” and cycles through it until the context window is exhausted. Liquid AI found small reasoning models are especially prone to this on long thinking traces and hard problems. These models typically run at low sampling temperature to keep traces stable and reproducible, and low temperature gives a locally reinforced loop no exit once it starts.
Liquid AI traces the failure to three compounding causes. Certain tokens, including common words like “the” and reasoning discourse markers like “So” and “But,” are overrepresented in training data and become attractive fallback continuations when a model is uncertain. Each repetition then raises the probability of repeating again, since prior context reinforces itself. Greedy or near-greedy sampling, the norm for reproducible reasoning traces, offers no escape once a loop token’s probability climbs toward 1.
The standard inference-time patch is a repetition penalty, which reweights the entire output distribution to discourage repeats. Liquid AI describes this as a band-aid that can degrade output quality elsewhere, since it suppresses legitimate word reuse along with genuine loops. Reinforcement learning can also target the behavior but requires carefully calibrated rewards and costly online rollouts. Antidoom instead finds the exact token that starts a specific loop and retrains the model to prefer coherent alternatives only at that position, leaving the rest of the distribution largely untouched.
The underlying technique, Final Token Preference Optimization (FTPO), adapts an approach the company calls Antislop and trains only the trailing token of a partial generation, unlike Direct Preference Optimization, which trains on full completions. Liquid AI spreads probability across as many as 20 alternative tokens per rejected sample instead of swapping one overused token for another, and applies a KL-like divergence penalty computed in logit space (a technique that constrains how far updated token probabilities can drift from the original model) so the correction does not disturb unrelated parts of the vocabulary.
Training runs on LoRA, a method that fine-tunes a small subset of a model’s weights, at ranks between 128 and 256 for roughly one epoch. Liquid AI reports that early stopping once the model prefers corrected tokens 35 percent of the time is enough to cut doom-loop rates from the 20 to 30 percent range down to 1 to 2 percent. Training longer degraded the models and introduced new loop points elsewhere in the vocabulary. On the LFM2.5-2.6B checkpoint, generating the training data took about an hour on eight MI325 GPUs, and the correction itself trained in one to two hours on a single GPU.
A secondary result complicates a common assumption about reasoning models. After Antidoom removed the looping failure, both models performed best near greedy sampling, and performance dropped at temperature 1.0. Liquid AI argues this undercuts the prevailing view that higher temperatures help reasoning models explore the solution space: that apparent benefit may have been confounded with simply escaping loops rather than genuine exploration. The company released the generation, detection, and training code at github.com/Liquid4All/antidoom.
Doom loops are a quiet cost driver for any pipeline that generates long reasoning traces: every looped completion burns a full context window in API spend for zero usable output, and a repetition-penalty patch trades that risk for degraded quality elsewhere in the response. Teams shipping coding agents or long-generation reasoning features should measure their own loop rates before deciding which tradeoff to accept.
Liquid AI detailed the method in “Reducing Doom Loops with Final Token Preference Optimization,” published on the company’s blog in July 2026.