Fixing Qwen Repetition Loops with typical_p

Long_comment_san · reddit · 2026-07-18

The author discusses the typicalp sampling parameter and the repetition loop issue in Qwen.

They point out that typicalp has long been merged and was originally designed to suppress repetition loops. Theoretically, this makes it a more rational approach than advice like "cranking presence penalty to 1.5," and it's better suited for creative tasks. Anecdotally, they recall a typicalp value around 0.92 working well, though it may need to be combined with other sampling parameters, such as minp, to reduce hallucinations.

Original post →

More from Models

Models channel →