Skip to content

Commit

Permalink
[FlaxGenerate] Fix bug in decoder_start_token_id (huggingface#17035)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi authored and stevhliu committed May 3, 2022
1 parent 2f454f4 commit fa07659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/generation_flax_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def generate(
pad_token_id = pad_token_id if pad_token_id is not None else self.config.pad_token_id
eos_token_id = eos_token_id if eos_token_id is not None else self.config.eos_token_id
decoder_start_token_id = (
decoder_start_token_id if decoder_start_token_id else self.config.decoder_start_token_id
decoder_start_token_id if decoder_start_token_id is not None else self.config.decoder_start_token_id
)
prng_key = prng_key if prng_key is not None else jax.random.PRNGKey(0)

Expand Down

0 comments on commit fa07659

Please # to comment.