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
OpenDAS
vllm_cscc
Commits
e936e401
Unverified
Commit
e936e401
authored
Jun 30, 2025
by
Isotr0py
Committed by
GitHub
Jun 30, 2025
Browse files
[Bugfix] Fix processor initialization in transformers 4.53.0 (#20244)
Signed-off-by:
Isotr0py
<
2037008807@qq.com
>
parent
f5dfa075
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
vllm/inputs/registry.py
vllm/inputs/registry.py
+7
-1
No files found.
vllm/inputs/registry.py
View file @
e936e401
...
@@ -5,7 +5,9 @@ from dataclasses import dataclass
...
@@ -5,7 +5,9 @@ from dataclasses import dataclass
from
typing
import
TYPE_CHECKING
,
Any
,
NamedTuple
,
Optional
,
Union
from
typing
import
TYPE_CHECKING
,
Any
,
NamedTuple
,
Optional
,
Union
import
torch
import
torch
from
packaging.version
import
Version
from
transformers
import
BatchFeature
,
PretrainedConfig
,
ProcessorMixin
from
transformers
import
BatchFeature
,
PretrainedConfig
,
ProcessorMixin
from
transformers
import
__version__
as
TRANSFORMERS_VERSION
from
typing_extensions
import
TypeVar
from
typing_extensions
import
TypeVar
from
vllm.jsontree
import
JSONTree
,
json_map_leaves
from
vllm.jsontree
import
JSONTree
,
json_map_leaves
...
@@ -128,9 +130,13 @@ class InputProcessingContext(InputContext):
...
@@ -128,9 +130,13 @@ class InputProcessingContext(InputContext):
/
,
/
,
**
kwargs
:
object
,
**
kwargs
:
object
,
)
->
_P
:
)
->
_P
:
# Transformers 4.53.0 has issue with passing tokenizer to
# initialize processor. We disable it for this version.
# See: https://github.com/vllm-project/vllm/issues/20224
if
Version
(
TRANSFORMERS_VERSION
)
!=
Version
(
"4.53.0"
):
kwargs
[
"tokenizer"
]
=
self
.
tokenizer
return
super
().
get_hf_processor
(
return
super
().
get_hf_processor
(
typ
,
typ
,
tokenizer
=
self
.
tokenizer
,
**
kwargs
,
**
kwargs
,
)
)
...
...
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