Repetition penalty
A dial that discourages the model from saying the same thing over and over.
Think of it like
Like a friend who gently taps you when you tell the same story a third time at dinner.
Example
A writer notices the model looping “the results show that…” and nudges the repetition penalty up until the phrasing varies.
How it actually works
It works by shrinking the probability of tokens (or phrases) the model has already produced, so each repeat gets a little harder to choose. Push it too hard and the model avoids necessary repeats — names, code keywords — and the text starts to read strangely, so it’s a balance, not a cure.
For product teams
A fast fix for the “broken record” failure without retraining anything.
For engineers
Divides or subtracts from logits of previously seen tokens before sampling, scaled by a penalty factor.
Related
- Frequency penalty — A close relative that penalizes by count.
- Presence penalty — Another that penalizes mere appearance.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome