Skip to content
Discussion options

You must be logged in to vote

The neutral value for presence_penalty is 0.0 and the most API providers limit its range to [-2.0, 2.0].

And what is going to happen if I set 'presence_penalty=50.0' ?

In most implementations, the presence_penalty is subtracted from the logits (the raw, unnormalized scores) of any token that has already appeared in the input context. A very high value like 50.0 effectively drives the logits of those tokens far into the negative, making their probabilities negligible after the softmax transformation.

As a result, the model will almost certainly avoid repeating any token that has already occurred in the prompt or generated output. While this can strongly discourage repetition, it may also…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@SwHaraday
Comment options

@jklj077
Comment options

Answer selected by SwHaraday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants