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
75a99b98
Unverified
Commit
75a99b98
authored
Jul 15, 2025
by
Brayden Zhong
Committed by
GitHub
Jul 15, 2025
Browse files
[Chore] Remove outdated transformers check (#20989)
Signed-off-by:
Brayden Zhong
<
b8zhong@uwaterloo.ca
>
parent
b5c3b683
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
vllm/model_executor/models/idefics3.py
vllm/model_executor/models/idefics3.py
+4
-11
No files found.
vllm/model_executor/models/idefics3.py
View file @
75a99b98
...
...
@@ -22,8 +22,8 @@ from typing import Literal, Optional, TypedDict, Union
import
torch
from
torch
import
nn
from
transformers
import
(
AddedToken
,
BatchFeature
,
Idefics3Config
,
Idefics3ImageProcessor
,
Idefics3Processor
)
from
transformers
import
(
BatchFeature
,
Idefics3Config
,
Idefics3ImageProcessor
,
Idefics3Processor
)
from
vllm.config
import
VllmConfig
from
vllm.model_executor.layers.linear
import
ReplicatedLinear
...
...
@@ -199,21 +199,14 @@ class Idefics3ProcessingInfo(BaseProcessingInfo):
return
grid_w
*
grid_h
+
1
# TODO: Remove after requiring transformers>=4.52
def
_get_content
(
self
,
token
:
Union
[
AddedToken
,
str
])
->
str
:
if
isinstance
(
token
,
str
):
return
token
return
token
.
content
def
_get_image_token
(
self
,
processor
:
Optional
[
Idefics3Processor
])
->
tuple
[
str
,
str
,
str
]:
if
processor
is
None
:
processor
=
self
.
get_hf_processor
()
image_token
=
self
.
_get_content
(
processor
.
image_token
)
fake_image_token
=
self
.
_get_content
(
processor
.
fake_image_token
)
image_token
=
processor
.
image_token
fake_image_token
=
processor
.
fake_image_token
global_image_token
=
processor
.
global_image_tag
return
image_token
,
fake_image_token
,
global_image_token
...
...
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