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
69bff9bc
Unverified
Commit
69bff9bc
authored
Apr 25, 2025
by
Zaida Zhou
Committed by
GitHub
Apr 24, 2025
Browse files
fix float16 support for kimi-vl (#17156)
Co-authored-by:
zhouzaida
<
zhouzaida@msh.team
>
parent
41ca7eb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
vllm/model_executor/models/kimi_vl.py
vllm/model_executor/models/kimi_vl.py
+1
-2
No files found.
vllm/model_executor/models/kimi_vl.py
View file @
69bff9bc
...
@@ -340,8 +340,7 @@ class KimiVLForConditionalGeneration(nn.Module, SupportsMultiModal):
...
@@ -340,8 +340,7 @@ class KimiVLForConditionalGeneration(nn.Module, SupportsMultiModal):
else
:
else
:
pixel_values
=
pixel_values
.
reshape
(
-
1
,
num_channels
,
patch_size
,
pixel_values
=
pixel_values
.
reshape
(
-
1
,
num_channels
,
patch_size
,
patch_size
)
patch_size
)
# fp32 -> bf16
pixel_values
=
pixel_values
.
to
(
self
.
vision_tower
.
dtype
)
pixel_values
=
pixel_values
.
to
(
torch
.
bfloat16
)
# image_grid_hws.shape = (N, 2)
# image_grid_hws.shape = (N, 2)
assert
image_grid_hws
.
ndim
==
2
,
f
"unexpected shape for image_grid_hws:
{
image_grid_hws
.
shape
}
"
assert
image_grid_hws
.
ndim
==
2
,
f
"unexpected shape for image_grid_hws:
{
image_grid_hws
.
shape
}
"
...
...
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