# Repetition\_penalty not working?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frepetition-penalty-not-working%2F73636%3E%5C
**Category:** 🤗Transformers\
**Created:** [February 18, 2024, 12:13am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frepetition-penalty-not-working%2F73636 "2024-02-18T00:13:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adenhaus](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/adenhaus/32/19720_2.png) [@adenhaus](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fadenhaus)%5C
**Post date:** [February 18, 2024, 12:13am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frepetition-penalty-not-working%2F73636%2F1 "2024-02-18T00:13:44Z")

</div>

I think there is something wrong with repetition\_penalty. It is not being applied.

I have some models, e.g. [generation\_config.json · adenhaus/mt5-small-tata at main](https://huggingface.co/adenhaus/mt5-small-tata/blob/main/generation_config.json) which have repetition\_penalty set. Just a few weeks ago, when I changed the repetition\_penalty, I could see the output change. Now, when I change it, the output is always the same, the penalty is not being applied.

Maybe this was broken in some recent update?

@sgugger

---

<div class="post-metadata">

**Author:** ![adenhaus](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/adenhaus/32/19720_2.png) [@adenhaus](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fadenhaus)%5C
**Post date:** [February 18, 2024, 11:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frepetition-penalty-not-working%2F73636%2F2 "2024-02-18T11:26:20Z")

</div>

This seems to be working again now, but I am certain I had the issue yesterday.
