# Presence\_penalty and frequency\_penalty parameters

**URL:** <https://community.openai.com/t/presence-penalty-and-frequency-penalty-parameters/302813>\
**Category:** API\
**Created:** [July 18, 2023, 11:51am UTC](https://community.openai.com/t/presence-penalty-and-frequency-penalty-parameters/302813 "2023-07-18T11:51:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwr](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jwr/32/138712_2.png) [@jwr](https://community.openai.com/u/jwr)\
**Post date:** [July 18, 2023, 11:51am UTC](https://community.openai.com/t/presence-penalty-and-frequency-penalty-parameters/302813/1 "2023-07-18T11:51:53Z")

</div>

The API docs indicate that the range of possible values for presence\_penalty and frequency\_penalty is from -2.0 to 2.0. Has anybody tried to use negative values for those coefficients?

I’m using GPT-4 for technical translations, so I actually _do_ want repetitions: a certain word might occur multiple times in the source string, and that’s perfectly fine. But whenever I tried going negative with these coefficients, I got garbage results.

---

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [July 18, 2023, 12:24pm UTC](https://community.openai.com/t/presence-penalty-and-frequency-penalty-parameters/302813/2 "2023-07-18T12:24:17Z")

</div>

Zero should be sufficient for most use cases, unless there are things that have the same name many many times, in which case there is a low probability of that rare item being common in the training dataset.

---

<div class="post-metadata">

**Author:** ![tinyisland](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/tinyisland/32/449975_2.png) [@tinyisland](https://community.openai.com/u/tinyisland)\
**Post date:** [September 24, 2024, 7:57am UTC](https://community.openai.com/t/presence-penalty-and-frequency-penalty-parameters/302813/3 "2024-09-24T07:57:49Z")

</div>

I found the following information

> When the `presence_penalty` is increased, the output is more likely to branch into new topics related to the initial topic with less likelihood of repeating tokens already chosen for the output.This can be particularly useful in research or brainstorming scenarios, where the goal is to generate output that provides related information without redundantly using common terms.

May I ask is there anyone check this result true or false?
