aiqbench analysis
This research introduces the LZ penalty, leveraging information-theoretic principles from the LZ77 compression algorithm to effectively suppress degenerate repetitions in autoregressive language models without compromising reasoning capabilities. By utilizing prediction-compression duality, this method allows state-of-the-art open-source models to perform greedy decoding while eliminating repetition issues that plague standard frequency-based penalties. The approach represents a significant advancement for deploying efficient, high-performance AI systems where sampling variance and output quality are critical constraints.
LZ Penalty: An information-theoretic repetition penalty for autoregressive language models
arXiv:2504.20131v4 Announce Type: replace Abstract: We introduce the LZ penalty, a penalty specialized for reducing degenerate repetitions in autoregressive language models without loss of capability. The penalty is based on the codelengths in the LZ77 universal lossless compression algorithm. Through the lens of the prediction-compression duality, decoding the LZ penalty has the interpretation of sampling from the residual distribution after removing the information that is highly compressible. We demonstrate the LZ penalty enables state-of-the-art open-source reasoning models to operate with greedy (temperature zero) decoding without loss of capability and without instances of degenerate repetition. Both the industry-standard frequency penalty and repetition penalty are ineffective, incurring degenerate repetition rates of up to 4%.
Abstract:We introduce the LZ penalty, a penalty specialized for reducing degenerate repetitions in autoregressive language models without loss of capability. The penalty is based on the codelengths in the LZ77 universal lossless compression algorithm. Through the lens of the prediction-compression duality, decoding the LZ penalty has the interpretation of sampling from the residual distribution after removing the information that is highly compressible. We demonstrate the LZ penalty enables state-of-the-art open-source reasoning models to operate with greedy (temperature zero) decoding without loss of capability and without instances of degenerate repetition. Both the industry-standard frequency penalty and repetition penalty are ineffective, incurring degenerate repetition rates of up to 4%.
Machine Learning (cs.LG); Artificial Intelligence (cs.AI); Information Theory (cs.IT)
arXiv:2504.20131 [cs.LG]
(or arXiv:2504.20131v4 [cs.LG] for this version)
https://doi.org/10.48550/arXiv.2504.20131 Focus to learn more arXiv-issued DOI via DataCite
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Full text under the publisher's open licence · 205 words
Related coverage
The Continual Constitutional Convention: How language models revise the documents that govern them
AI Alignment Forum · Oct 13, 2026
PC-SubMax: Efficient Prompt Compression via Regularized Submodular Maximization
arXiv · Sep 30, 2026
Direct Preference Optimization Beyond Chatbots
Hugging Face · Jun 3, 2026

Not Deciphering The Voynich Manuscript
LessWrong · Oct 11, 2026