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
5c2acb27
Unverified
Commit
5c2acb27
authored
Oct 18, 2025
by
Lukas Geiger
Committed by
GitHub
Oct 18, 2025
Browse files
[Models][QwenVL] Remove unnecessary `.contiguous()` calls (#27106)
Signed-off-by:
Lukas Geiger
<
lukas.geiger94@gmail.com
>
parent
b26b70be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
vllm/model_executor/models/qwen2_5_vl.py
vllm/model_executor/models/qwen2_5_vl.py
+1
-1
vllm/model_executor/models/qwen2_vl.py
vllm/model_executor/models/qwen2_vl.py
+1
-1
No files found.
vllm/model_executor/models/qwen2_5_vl.py
View file @
5c2acb27
...
...
@@ -396,7 +396,7 @@ class Qwen2_5_VisionAttention(nn.Module):
q
,
k
,
v
=
self
.
split_qkv
(
x
)
batch_size
=
q
.
shape
[
1
]
q
,
k
,
v
=
(
rearrange
(
x
,
"s b ... -> b s ..."
)
.
contiguous
()
for
x
in
(
q
,
k
,
v
))
q
,
k
,
v
=
(
rearrange
(
x
,
"s b ... -> b s ..."
)
for
x
in
(
q
,
k
,
v
))
if
rotary_pos_emb
is
not
None
:
# [2 * b, s, heads, head_dim]
qk_concat
=
torch
.
cat
([
q
,
k
],
dim
=
0
)
...
...
vllm/model_executor/models/qwen2_vl.py
View file @
5c2acb27
...
...
@@ -423,7 +423,7 @@ class Qwen2VisionAttention(nn.Module):
q
,
k
,
v
=
self
.
split_qkv
(
x
)
batch_size
=
q
.
shape
[
1
]
q
,
k
,
v
=
(
rearrange
(
x
,
"s b ... -> b s ..."
)
.
contiguous
()
for
x
in
(
q
,
k
,
v
))
q
,
k
,
v
=
(
rearrange
(
x
,
"s b ... -> b s ..."
)
for
x
in
(
q
,
k
,
v
))
if
rotary_pos_emb
is
not
None
:
# [2 * b, s, heads, head_dim]
qk_concat
=
torch
.
cat
([
q
,
k
],
dim
=
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