"sims/nic/git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "000cc16f80953cb5e4365afcd044284049e8f4ea"
Unverified Commit 6a3d1a98 authored by Jorge C. Gomes's avatar Jorge C. Gomes Committed by GitHub
Browse files

Fixes bug in the creation of ExponentialDecayLengthPenalty (#21423)

input_ids_seq_length doesn't exist in the GenerationConfig, it exists as local variable in the function.

Setting exponential_decay_length_penalty therefore results in an error:
`AttributeError: 'GenerationConfig' object has no attribute 'input_ids_seq_length'`

This simple change fixes this issue, and the exponential_decay_length_penalty works as expected.
parent 0a757176
......@@ -859,7 +859,7 @@ class GenerationMixin:
ExponentialDecayLengthPenalty(
generation_config.exponential_decay_length_penalty,
generation_config.eos_token_id,
generation_config.input_ids_seq_length,
input_ids_seq_length,
)
)
if generation_config.suppress_tokens is not None:
......
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