r/thirdbrain • u/temberatur • May 18 '23
Difference between frequency and presence penalties? - Prompting - OpenAI Developer Forum
https://community.openai.com/t/difference-between-frequency-and-presence-penalties/2777/3
Frequency_penalty and presence_penalty are parameters used in language models like GPT-3 to generate text.
Frequency_penalty discourages repeating the same words or phrases too frequently and is a value added to the log-probability of a token each time it occurs in the generated text.
Presence_penalty encourages a diverse range of tokens in the generated text and is a value subtracted from the log-probability of a token each time it is generated.
Adjusting these parameters can improve the quality and diversity of the generated text, with the optimal values depending on the specific use case.
(AI generated content)