Skip to content
Preprint

Don't Repeat Yourself: Stopping Verbatim Loops at Sampling Time

Aug 2026 · 1 citation · 56 references
Computer Science

TL;DR

Don't Repeat Yourself (DRY), a sampling-time logit adjustment that penalizes a candidate token only when generating it would extend the current suffix into an exact continuation of a span seen earlier in the context, is proposed.

Abstract

Large Language Models generate text autoregressively, but open-ended generation is prone to verbatim looping, in which models repeat spans already present in context. Standard defenses such as repetition, presence, and frequency penalties and n-gram blocking act on token recurrence rather than the sequential structure of a loop, and often suppress looping only at strengths that also degrade formatting or fluency. We propose Don't Repeat Yourself (DRY), a sampling-time logit adjustment that penalizes a candidate token only when generating it would extend the current suffix into an exact continuation of a span seen earlier in the context. Sequence breakers protect chat templates and formatting tokens. Across models from 1.5B to 120B parameters, nine prompt families, and a 600-pair human study, DRY reduces suffix-extension rate by 47% while improving lexical diversity. An intervention-matched placebo produces no comparable reduction, identifying suffix matching as the operative mechanism. On AWQ-quantized 70B and 120B models, DRY reduces loop rate by roughly half while preserving MT-Bench, MMLU, and GSM8K performance, whereas standard alternatives lose measurable ground. DRY has been adopted by popular open-source LLM inference frameworks including llama.cpp, ExLlamaV2, and text-generation-webui, highlighting its practical impact on text generation.

View source

Similar papers

#natural language process... Preprint Sep 2026

Repetition, Not Length: Isolating the Counting Failure in Neural Text-to-Speech

Text-to-speech models loop, truncate and lose count on text that repeats a phrase many times. We show that repetition itself is what breaks them, not the length that comes with it. Every repeated sentence in our test set is paired with a control of matched sentence and word count in which no word ever repeats back-to-b...

Kirill Borodin, V. Kudryavtsev, Maxim V. Maslov et al. · 0 citations
#natural language process... Preprint Sep 2026

Fewer Words, Not Fewer Tokens: Measuring the Sanskrit Tokenization Penalty per Proposition

Sanskrit fuses case, number, person and tense into word endings and chains clauses into compounds, so it is information-dense per word. Whether that density survives subword tokenization is a separate question, to be asked per unit of meaning rather than per word. On identical FLORES-200 devtest content, Sanskrit costs...

Dev Sharma · 0 citations
Preprint Oct 2026

Honeyed Words, Hidden Daggers: Benchmarking and Training LLMs to See Through Mock Politeness

The Chinese idiom"kou mi fu jian"("honeyed words, hidden daggers") names speech that is polite in form but hostile in function. We present ZhenhuanBench, a 1,592-item benchmark built from expert commentary on Empresses in the Palace, covering speaker intent, emotion-language mismatch, and per-listener uptake. Text-only...

Cai-Xin Kang, Si-Tong Gong, Tian-Yu Yan et al. · 0 citations
#small language model Preprint Sep 2026

Off-Target Effects of Response-Style Alignment in a Korean 27B Language Model

We post-train Qwen3.8-27B for Korean response style -- verbosity, list and markdown usage, discourse structure and register -- and measure two behaviours the objective never targets: abstention on ambiguous social questions in KoBBQ, where the benchmark-correct answer is UNKNOWN, and unprompted disclosure in securities...

HyoJung Han · 0 citations
#artificial intelligence Preprint Sep 2026

In-Place Instruction Following in Diffusion Language Models

GRAFT, an IPP-oriented post-training framework combining constraint-aware SFT and preference optimization is proposed, an IPP-oriented post-training framework combining constraint-aware SFT and preference optimization that raises the average IIF score and preserves general generation ability.

Zheng Nie, Zhe-Rui Li, Jia-Ming Zhang et al. · 0 citations
#natural language process... Preprint Oct 2026

Copying Before Suppression: What Drives a Below-Chance Dip During Language Model Training?

Mechanistic interpretability usually studies fully trained models, yet the computations that drive a behaviour can change while the model is still learning the task. On the Indirect Object Identification task, a model should continue with the name mentioned once rather than the name mentioned twice. Pythia models pass...

T. Dahiya, Cole Blondin · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.