Liquid AI Ships Antidoom: Fixing Reasoning Models' "Doom Loops" by Retraining Just One Token — Now Open-Sourced

By fine-tuning only the single token where a doom loop starts, both models' loop rates dropped to around 1%.
By Liquid AI07-08 · 8 min read⚑ Research paper
🎧 Listen to the podcast0:00 / --:--
0:00 / --:--
Research Explainer · XiaoHu Explains
Quick take
  • On July 7, 2026, Liquid AI released Antidoom, a Final Token Preference Optimization (FTPO) method built specifically to fix AI reasoning models' "doom loops" — where a model repeats the same phrase (like "Wait, let me reconsider...") over and over until it burns through its entire context window.
  • On an early LFM2.5-2.6B checkpoint, the doom-loop rate on harder math/code problems dropped from 10.2% to 1.4%; on Qwen3.5-4B under greedy sampling, it dropped from 22.9% to 1%.
  • The method trains only "the one token that triggers the loop," nudging the model toward more coherent alternatives at that position while leaving the rest of the output distribution almost untouched.
  • Doom loops arise from three mechanisms working together: overtrained high-frequency words (the, So, Wait, etc.) become a fallback whenever the model is uncertain; repeated context pushes the loop's probability closer and closer to 1; and low-temperature greedy sampling leaves the loop no way out.
  • The full training/detection/generation codebase is open-sourced on GitHub (Liquid4All/antidoom), with a complete hyperparameter guide in the README. It supports both NVIDIA/CUDA and AMD Instinct MI-series (ROCm).
⚑Stance note: this piece explains Liquid AI's official blog post and open-source project. The doom-loop rates and eval gains cited are vendor self-reported; there is no independent third-party replication yet.
1What Is a Doom Loop

Even AI Can Get Stuck Repeating Itself

On July 7, 2026, Liquid AI released Antidoom, a training method built specifically to fix AI reasoning models' "doom loops," and open-sourced all the code on GitHub.

A doom loop is a common failure mode for reasoning models: the model outputs a short phrase — say, "Wait, let me reconsider..." — then repeats that same phrase over and over until it fills up the context window, never arriving at an answer. Smaller reasoning models are especially prone to it, particularly on long reasoning chains and hard problems.

reasoning trace · working a hard problem

Let me re-check the derivation in step two.

Wait, let me reconsider...

Wait, let me reconsider...

Wait, let me reconsider...

Wait, let me reconsider...

Wait, let me recons

(context window fills up; the answer never arrives)

When it gets stuck on a math problem or a piece of code, the model just keeps repeating the same line, unable to stop, burning precious context spinning in place. This is exactly what Antidoom is built to fix.
📊Official numbers: on an early LFM2.5-2.6B checkpoint, the doom-loop rate on hard problems went from 10.2% to 1.4%; on Qwen3.5-4B under greedy sampling, it went from 22.9% to 1%. Liquid AI says the method can cut doom-loop rates by as much as 90%.
2Existing Approaches

Why the Old Fixes Only Treat the Symptom

Before Antidoom, dealing with doom loops usually meant one of two routes, each with its own drawback.

The first is applying repetition_penalty at inference time, which temporarily suppresses the probability of words that have already appeared. It's like a band-aid — no retraining needed — but it suppresses indiscriminately and can drag down the quality of otherwise normal output too. The second is reinforcement learning (RL), which can target loops specifically, at the cost of carefully designed reward signals and expensive online rollout sampling.

MethodHow it worksCostSide effects
repetition_penaltyTemporarily downweights repeated words at inference timeLow, no training neededCan hurt the quality of normal output
Reinforcement learning (RL)Retrains the model with reward signalsHigh — reward tuning plus online samplingPoorly designed rewards can go off track
AntidoomTrains only the single token where the loop startsLow — LoRA, hours on one GPUAlmost no disturbance to the rest of the output
3Core Idea

Change One Token, Leave Everything Else Alone

Antidoom narrows the scope of the fix down to the extreme.

It first locates the single token where the doom loop begins, and trains the model — only at that position — to choose a more coherent alternative. The probability distribution over the rest of the vocabulary stays almost exactly as it was. The model's overall output habits are untouched; the patch lands precisely on the seam that triggers the loop.

Core innovation

This is a surgical, single-point fix. Retuning the whole model is like re-grading an entire exam paper from scratch; Antidoom just marks the one question the student keeps getting wrong, leaving every correctly answered question untouched. The smaller the change, the less damage to the model's existing abilities.

Only this token retrained
A full bar chart of the model's probability distribution over the next token. Antidoom only retrains the highlighted bar (the token that triggers the loop) — the other dozens are left as-is.
4Root Cause

Where Doom Loops Come From: Three Forces Stacking Up

Behind the doom loop are three mechanisms acting at once.

Mechanism 1: Overtrained High-Frequency Words Meet Model Uncertainty

Some words are simply more likely to get picked. Well-known examples elsewhere in the industry include "delve" and "testament" — one possible cause is synthetic data pushing their frequency higher than how humans actually write. In reasoning models, this class of high-frequency word is often something like "Wait" or "Alternatively" — words that bridge steps or signal self-reflection. They're not bad in themselves; they can mark a pivot in strategy or a verification step. But once the model gets stuck and isn't sure what comes next, they become a convenient fallback, restarting the same chain of reasoning from scratch all over again.

On the early LFM2.5-2.6B checkpoint, the words that most often trigger a doom loop (share of all loop starting points):

' the'
11.39%
' So'
4.51%
'Alternatively'
3.22%
'Wait'
2.56%
' But'
2.46%

Mechanism 2: Repeated Context Reinforces Itself

A sequence that has appeared earlier makes that same sequence more likely to appear again later. Every repetition nudges the probability of each token in that phrase closer to 1, snowballing until it can't stop. Research by Duan et al. links this to a "V-shaped" attention pattern, and finds that semantic repetition — the model stuck on the same idea — actually precedes literal, word-for-word repetition.

The probability of each token in a loop approaching 1 as repetitions increase
The probability of each token in a loop being selected again climbs toward 1 as repetitions accumulate, forming a self-reinforcing cycle. Source: Liquid AI

Mechanism 3: Low-Temperature Sampling Leaves No Way Out

Reasoning models generally run at very low sampling temperatures, to keep the reasoning process stable and reproducible. (Sampling temperature controls how willing the model is to pick less-likely words when choosing the next one: low temperature means it almost always picks the single most probable word; high temperature means it's more willing to try lower-probability words.) At temperature 0, it always picks the single most-likely word, so once a loop has been reinforced, there's no exit. In theory, raising the temperature should help — but once Mechanism 2 has pushed the loop token's probability up near 1, there's barely any probability left for other words, so even a high temperature still gets stuck; official data shows clear looping even at temp=0.67. The lower the temperature, the worse the doom loop.

5Data and Training

How to Find the Problem Token — and How to Train It

Fixing doom loops first means turning them into trainable data.

The process: use a prompt set specifically designed to induce loops (LiquidAI/antidoom-mix-v1.0), generate a large volume of the model's outputs at low temperature, then mine the failed samples out of that batch. A passage is counted as a doom loop if it repeats at least 4 times and is at least 60 characters long — two thresholds chosen to avoid both false positives and false negatives. Once a loop is found, the first token of the first repetition is locked in and labeled rejected (the one that shouldn't have been picked). At that same position, the model's own top-k candidates are pulled, noise that's too short or non-alphanumeric is filtered out, and up to 20 reasonable alternatives are kept as chosen (the better options). Each training example is a triple like this: preceding context, one rejected token, one or more chosen tokens.

Low-temp bulk generation
→
Detect loops
≥4 reps / ≥60 chars
→
Mark starting token
rejected
→
Pick alternatives
≤20 chosen
→
Regularize distribution
→
FTPO-train a LoRA
→
Repeat another pass if needed
Sample doom-loop training data
A sample of doom-loop training data: locating the first token of the first repetition in a failed output and labeling it rejected. Source: Liquid AI

Before training, the chosen and rejected distributions also need a regularization pass. Otherwise high-frequency words like Wait, So, and the would dominate the entire training process — and suppressing them too aggressively would, in turn, hurt the model's reasoning ability.

What is preference optimization

DPO and FTPO both belong to this class of methods called "preference optimization." Its approach is distinctive: show the model two kinds of examples — "don't pick this" (rejected) and "these are better" (chosen) — and after seeing enough of them, the model adjusts its own tendencies, without any new knowledge being injected. It's like grading homework without re-teaching the concept — you just mark an X next to the one question the student keeps getting wrong and jot down a few better answers.

How FTPO Differs from DPO

FTPO (Final Token Preference Optimization) is a DPO-like preference optimization algorithm, but it's designed from the ground up to "touch only a handful of tokens and disturb as little of the rest of the model as possible." Compared with DPO, it differs in four ways:

What FTPO doesWhat it solves
Trains only the final token of a sequence (a sequence that's mid-generation)Locks the change tightly to a single position
Pairs one sample with multiple chosen candidatesSpreads probability across a set of alternatives, instead of just swapping one high-frequency word for another
Applies a KL-style constraint in logit space, skipping softmaxAvoids putting gradient pressure on unrelated tokens, so other abilities aren't dragged off course
Two-stage regularizationLets the chosen/rejected tokens move freely while keeping the rest of the vocabulary tightly constrained
6Training Scale

How Long to Train, and When to Stop

The scale of this training is surprisingly small.

It fine-tunes with LoRA (a patch-style fine-tuning method for large models — instead of retraining every parameter, it trains a small set of newly inserted parameters, which is cheap and disturbs the base model less), usually for just one epoch. Empirically, a LoRA rank of 128 to 256 works best: enough capacity to learn, small enough to limit side effects; training covers all attention layers, MLP layers, plus lm_head; the learning rate sits roughly between 4e-6 and 2e-5.

How do you know when to stop? Use chosen_win as the early-stopping criterion — it measures, at the doom-loop starting position, what share of the time the model now prefers one of the "better alternatives" over the original word that tended to trigger the loop. Stopping around chosen_win=0.35 typically brings the doom-loop rate down from 20-30% to 1-2%. Overtraining tends to create new doom loops elsewhere instead.

128-256
LoRA rank range that works best
0.35
chosen_win early-stopping threshold
≤20
Max alternative candidates kept per starting token
1-2 hrs
FTPO training time on a single MI325 GPU
HyperparameterRecommended valuePurpose
LoRA rank128 to 256Higher rank learns more but limits side effects
Learning rate4e-6 to 2e-5Paired with early stopping to prevent overtraining
Early-stop chosen_win≈0.35Stop once it hits this value
Chosen candidatesUp to 20Spreads probability across a set of alternatives
Training epochsUsually 1 epochOvertraining creates new loops
Trained modulesAll attention/MLP layers + lm_headFull-layer training works better

How cheap is it? Taking the early LFM2.5-2.6B checkpoint as an example: generating the training set takes about 1 hour (8 MI325 GPUs), and training itself takes 1 to 2 hours (1 MI325 GPU). Generation stops once it accumulates 20,000 sample pairs.

7Open-Source Reproduction

The Code Is Open — You Can Run It Yourself

The whole method is fully open-source, and anyone can reproduce it by following along.

The generation, detection, and FTPO trainer code are all on GitHub (Liquid4All/antidoom), with a full hyperparameter guide in the README. The prompt dataset it uses, LiquidAI/antidoom-mix-v1.0, is pure prompts — deliberately stripped of ground-truth answers, reasoning traces, hidden tests, and answer labels. Its only job is to induce doom loops, not to teach any new knowledge.

That means any team with a reasoning model in hand can, in theory, run the same pipeline on their own model, without needing to pretrain from scratch. Once the environment's set up, a single command runs the full "generate plus train" flow:

Clone the repo, install dependencies, run the full generate-and-train pipeline
git clone https://github.com/Liquid4All/antidoom
cd antidoom
uv sync

uv run antidoom -c configs/default.yaml -r runs/antidoom1 \
  --temp 0.01 \
  --model-name LiquidAI/LFM2.5-1.2B-Base

It's not locked to NVIDIA either. Antidoom also runs on AMD Instinct MI-series GPUs (ROCm), giving teams without N-series cards a path forward.

Two special tweaks for the ROCm environment

Running on AMD (validated on MI325 / gfx942) requires a dedicated ROCm virtual environment using configs/default_amd.yaml. It swaps vLLM's attention backend to TRITON_ATTN (ROCm's default attention kernel throws memory errors on LFM2), and switches the optimizer to adamw_torch (sidestepping bitsandbytes, a dependency that's notoriously hard to get working on ROCm).

8Results

Results: Both Models' Doom-Loop Rates Down to Around 1%

After training, both models' doom-loop rates were pushed down to around 1%.

The early LFM2.5-2.6B checkpoint went from 10.2% to 1.4%, with eval scores improving across the board. That improvement comes entirely from fewer doom loops — the training set doesn't teach any new math or coding knowledge. It just removes the obstacle that had been standing between the model and the answers it could already reach. Qwen3.5-4B saw an even bigger effect, dropping from 22.9% to 1% under greedy sampling, with eval scores jumping substantially.

Early LFM2.5-2.6B checkpoint
Before
10.2%
After
1.4%
Qwen3.5-4B (greedy sampling)
Before
22.9%
After
1%
Doom-loop rate — lower is better. All four bars are scaled to the same axis.
Doom-loop rate before and after training
Doom-loop rate before and after training. Source: Liquid AI
9Counterintuitive Finding

An Unexpected Discovery: Higher Temperature Isn't Always Smarter

Training also turned up a counterintuitive result on the side.

Conventional wisdom has long held that reasoning models should use a higher sampling temperature, to let them explore solutions more broadly. But after Antidoom training, both models actually performed worse at temp=1.0. The reason isn't complicated: before training, scores in the low-temperature range were being dragged down by doom loops; once the loops were cleared out, the low-temperature range — close to greedy sampling — actually scored the highest. The old "higher temperature is better" folk wisdom was likely just doom loops being partially masked at higher temperatures, mistaken for a genuine benefit of temperature itself.

Low temp (near-greedy) temp=1.0 Sampling temperature → Eval score → Before After
Illustrative diagram: eval score versus sampling temperature. Before training (gray dashed line), the low-temperature range is dragged down by doom loops and improves as temperature rises; after training (solid line), the low-temperature range is optimal and dips slightly as it nears temp=1.

Both models trace out the same pattern: before training, scores in the low-temperature range were pulled down by doom loops; after training, the low-temperature range is optimal, with a slight dip near temp=1.

LFM2.5-2.6B eval score versus temperature
Early LFM2.5-2.6B checkpoint: eval score versus sampling temperature, before and after training. Source: Liquid AI
Qwen3.5-4B eval score versus temperature
Qwen3.5-4B: the same pattern — the biggest gains are in the low-temperature range, with a slight dip after training near temp=1. Source: Liquid AI

In practice, you can also run Antidoom for multiple rounds. After the first round suppresses the loop-prone words, new problems can surface: some other tokens now become the new starting points for loops. Running another round, targeted at those newly emerged loops, can push the doom-loop rate down even further.

The training set doesn't teach the model any new math or coding knowledge — it just removes the failure mode that was standing between the model and answers it could already give.Liquid AI · Antidoom blog
Open Source & References
This piece explains Liquid AI's official blog post "Reducing Doom Loops with Final Token Preference Optimization" (July 7, 2026, by Sam Paech et al.) and its open-source repo, Liquid4All/antidoom. The doom-loop rates, eval gains, and other figures cited all come from the official source; the loop-rate reductions are vendor self-reported, with no third-party replication yet. All charts are original except where sourced from the official blog.
Source
Liquid AILiquid AI·Read the source
↑ End of article
✓ This article is free to read in full

Members can copy or download the full Markdown, and let their AI subscribe and ask.

Read the original ↗
📮 New explainers, straight to your inbox

Found this useful? Leave your email — every new explainer, the moment it's out. Unsubscribe anytime.