A new decoding method called the LZ penalty fixes a long-standing annoyance in AI text generation: models that get stuck looping the same phrase.
Researchers built the penalty on the codelengths from LZ77, the decades-old lossless compression algorithm behind formats like zip and gzip. The idea borrows from a well-known duality between compression and prediction: text that compresses well is text a model finds highly predictable, so penalizing the compressible parts pushes sampling toward the residual, less repetitive distribution. In tests, the method let state-of-the-art open-source reasoning models run at temperature zero, meaning greedy decoding, with no drop in capability and no degenerate repetition. The industry-standard frequency and repetition penalties, by contrast, still produced repetition rates as high as 4% in the same tests.
That 4% failure rate matters because temperature zero is the setting developers reach for when they want reproducible, deterministic output - exactly the case where a model looping is most likely to end up in a support ticket. A repetition fix that costs nothing in capability is rarer than it sounds; most guardrails trade some quality for safety.
Compression and language modeling have been theoretically linked for years, but this is a practical reminder that the connection still has unmined value even as everyone's attention has moved on to bigger training runs.