What does “Repetition Penalty” mean?
A decoding setting that lowers the probability of tokens the model has already produced to reduce loops.
How Repetition Penalty Works
Model has already written 'very very'
Penalty lowers probability of repeating those tokens
Different word is more likely
Less looping text.
Practical Example
Without a penalty, a model might loop with 'the best of the best of the best'. A modest penalty on repeated tokens nudges it to move on.
Why It Matters
Repetition loops make text unreadable. Too strong a penalty can stop the model from reusing words it legitimately needs, such as names.
Common Questions About Repetition Penalty
Q: Repetition vs frequency penalty?
They are similar. Frequency penalty scales with how many times a token appeared; repetition penalty is often applied once to any seen token.
Q: Typical values?
Slightly above 1 in some systems; scales differ by software, so check the documentation.
Q: Does it fix all loops?
Not always. It helps with simple loops but can distort legitimate repeats.