Language models sometimes repeat verbatim until the generation limit. We study the exit rather than the entrance: given that a span has already been repeated times, when is escape still possible? Along the loop the context is deterministic, so loop survival under any sampler can be computed exactly from one forward pass. Pure sampling leaves a positive escape probability at every step; top- with threshold locks a position exactly when the continuation probability reaches . A bounded penalty can leave a position locked; a penalty that outgrows the model’s preference for the loop over unseen tokens guarantees escape under top-. The same analysis predicts a blind spot in the widely deployed DRY sampler: its sequence breakers cap the penalty at for loops whose longest breaker-free run has tokens. On eleven open models, 66% of locked units with stay locked under DRY and 1% with . In free generation with llama.cpp, all 109 loops that survive DRY have . We propose DRY-C, which adds a term that grows exponentially with the number of verbatim recurrences, up to its look-back window. With it, none of 720 structured-output generations looped to the length limit, and task completion stayed close to DRY’s.

生成讲解博客的中文版本

生成AI智能校验的中文版本