Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
91472cf5
Unverified
Commit
91472cf5
authored
Apr 19, 2024
by
Raushan Turganbay
Committed by
GitHub
Apr 19, 2024
Browse files
Pipeline: fix `pad_token_id` again (#30338)
fix again
parent
cd09a8df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/pipelines/base.py
src/transformers/pipelines/base.py
+1
-1
No files found.
src/transformers/pipelines/base.py
View file @
91472cf5
...
...
@@ -896,7 +896,7 @@ class Pipeline(_ScikitCompat, PushToHubMixin):
and
self
.
tokenizer
.
pad_token_id
is
not
None
and
self
.
model
.
generation_config
.
pad_token_id
is
None
):
kwargs
[
"
pad_token_id
"
]
=
self
.
tokenizer
.
pad_token_id
self
.
model
.
generation_config
.
pad_token_id
=
self
.
tokenizer
.
pad_token_id
self
.
call_count
=
0
self
.
_batch_size
=
kwargs
.
pop
(
"batch_size"
,
None
)
...
...
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