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
edba1504
Unverified
Commit
edba1504
authored
Mar 03, 2026
by
Andreas Karatzas
Committed by
GitHub
Mar 04, 2026
Browse files
[Bugfix] Guard mm_token_type_ids kwarg in get_mrope_input_positions (#35711)
Signed-off-by:
Andreas Karatzas
<
akaratza@amd.com
>
parent
e3793961
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
vllm/model_executor/models/transformers/multimodal.py
vllm/model_executor/models/transformers/multimodal.py
+13
-1
No files found.
vllm/model_executor/models/transformers/multimodal.py
View file @
edba1504
...
...
@@ -474,7 +474,19 @@ class MultiModalMixin(SupportsMultiModal, SupportsMRoPE):
# can't accept arbitrary args, even if its value is `None`
kwargs
=
{}
if
mm_token_type_ids
:
kwargs
[
"mm_token_type_ids"
]
=
torch
.
cat
(
mm_token_type_ids
)
if
not
hasattr
(
self
,
"_get_rope_index_accepts_mm_token_type_ids"
):
import
inspect
sig
=
inspect
.
signature
(
self
.
model
.
get_rope_index
)
params
=
sig
.
parameters
self
.
_get_rope_index_accepts_mm_token_type_ids
=
(
"mm_token_type_ids"
in
params
or
any
(
p
.
kind
==
inspect
.
Parameter
.
VAR_KEYWORD
for
p
in
params
.
values
()
)
)
if
self
.
_get_rope_index_accepts_mm_token_type_ids
:
kwargs
[
"mm_token_type_ids"
]
=
torch
.
cat
(
mm_token_type_ids
)
mrope_positions
,
mrope_position_delta
=
self
.
model
.
get_rope_index
(
input_ids
=
torch
.
tensor
(
input_tokens
).
unsqueeze
(
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