Unverified Commit eb877f1f authored by Manan Dey's avatar Manan Dey Committed by GitHub
Browse files

update docs of length_penalty (#17022)

parent da47c264
...@@ -950,8 +950,8 @@ class GenerationMixin: ...@@ -950,8 +950,8 @@ class GenerationMixin:
eos_token_id (`int`, *optional*): eos_token_id (`int`, *optional*):
The id of the *end-of-sequence* token. The id of the *end-of-sequence* token.
length_penalty (`float`, *optional*, defaults to 1.0): length_penalty (`float`, *optional*, defaults to 1.0):
Exponential penalty to the length. 1.0 means no penalty. Set to values < 1.0 in order to encourage the Exponential penalty to the length. 1.0 means that the beam score is penalized by the sequence length. 0.0 means no penalty. Set to values < 0.0 in order to encourage the
model to generate shorter sequences, to a value > 1.0 in order to encourage the model to produce longer model to generate longer sequences, to a value > 0.0 in order to encourage the model to produce shorter
sequences. sequences.
no_repeat_ngram_size (`int`, *optional*, defaults to 0): no_repeat_ngram_size (`int`, *optional*, defaults to 0):
If set to int > 0, all ngrams of that size can only occur once. If set to int > 0, all ngrams of that size can only occur once.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment