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
ec2dcd80
Unverified
Commit
ec2dcd80
authored
Jun 03, 2025
by
Isotr0py
Committed by
GitHub
Jun 03, 2025
Browse files
[Misc] Update `WeightsMapper` for qwen2-vl/qwen2.5-vl (#19054)
Signed-off-by:
Isotr0py
<
2037008807@qq.com
>
parent
42243fbd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
vllm/model_executor/models/qwen2_5_vl.py
vllm/model_executor/models/qwen2_5_vl.py
+9
-4
vllm/model_executor/models/qwen2_vl.py
vllm/model_executor/models/qwen2_vl.py
+9
-4
No files found.
vllm/model_executor/models/qwen2_5_vl.py
View file @
ec2dcd80
...
...
@@ -823,7 +823,12 @@ class Qwen2_5_VLForConditionalGeneration(nn.Module, SupportsMultiModal,
SupportsLoRA
,
SupportsPP
):
# To ensure correct weight loading and mapping.
hf_to_vllm_mapper
=
WeightsMapper
(
orig_to_new_prefix
=
{
hf_to_vllm_mapper
=
WeightsMapper
(
orig_to_new_prefix
=
{
# mapping for new names in checkpoint saved after transformers v4.52
"model.language_model."
:
"language_model.model."
,
"model.visual."
:
"visual."
,
# mapping for original checkpoint
"lm_head."
:
"language_model.lm_head."
,
"model."
:
"language_model.model."
,
})
...
...
vllm/model_executor/models/qwen2_vl.py
View file @
ec2dcd80
...
...
@@ -1071,7 +1071,12 @@ class Qwen2VLForConditionalGeneration(nn.Module, SupportsMultiModal,
SupportsLoRA
,
SupportsPP
):
# To ensure correct weight loading and mapping.
hf_to_vllm_mapper
=
WeightsMapper
(
orig_to_new_prefix
=
{
hf_to_vllm_mapper
=
WeightsMapper
(
orig_to_new_prefix
=
{
# mapping for new names in checkpoint saved after transformers v4.52
"model.language_model."
:
"language_model.model."
,
"model.visual."
:
"visual."
,
# mapping for original checkpoint
"lm_head."
:
"language_model.lm_head."
,
"model."
:
"language_model.model."
,
})
...
...
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