Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ff846e9b
Unverified
Commit
ff846e9b
authored
May 02, 2022
by
Sanchit Gandhi
Committed by
GitHub
May 02, 2022
Browse files
[FlaxGenerate] Fix bug in decoder_start_token_id (#17035)
parent
eb877f1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/generation_flax_utils.py
src/transformers/generation_flax_utils.py
+1
-1
No files found.
src/transformers/generation_flax_utils.py
View file @
ff846e9b
...
@@ -264,7 +264,7 @@ class FlaxGenerationMixin:
...
@@ -264,7 +264,7 @@ class FlaxGenerationMixin:
pad_token_id
=
pad_token_id
if
pad_token_id
is
not
None
else
self
.
config
.
pad_token_id
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
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
=
(
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
)
prng_key
=
prng_key
if
prng_key
is
not
None
else
jax
.
random
.
PRNGKey
(
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment