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
037bcd94
Unverified
Commit
037bcd94
authored
Mar 31, 2025
by
Mrm
Committed by
GitHub
Mar 31, 2025
Browse files
[Bugfix] Fix missing return value in load_weights method of adapters.py (#15542)
Signed-off-by:
noc-turne
<
2270929247@qq.com
>
parent
c2e7507a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
vllm/model_executor/models/adapters.py
vllm/model_executor/models/adapters.py
+5
-4
No files found.
vllm/model_executor/models/adapters.py
View file @
037bcd94
...
@@ -99,16 +99,17 @@ def _create_pooling_model_cls(
...
@@ -99,16 +99,17 @@ def _create_pooling_model_cls(
mapper
=
WeightsMapper
(
orig_to_new_prefix
=
{
"model."
:
""
})
mapper
=
WeightsMapper
(
orig_to_new_prefix
=
{
"model."
:
""
})
weights
=
mapper
.
apply
(
weights
)
weights
=
mapper
.
apply
(
weights
)
self
.
model
.
load_weights
(
weights
)
loaded_params
=
self
.
model
.
load_weights
(
weights
)
return
loaded_params
=
{
f
"model.
{
name
}
"
for
name
in
loaded_params
}
return
loaded_params
# For most other models
# For most other models
if
hasattr
(
orig_cls
,
"load_weights"
):
if
hasattr
(
orig_cls
,
"load_weights"
):
orig_cls
.
load_weights
(
self
,
weights
)
# type: ignore
return
orig_cls
.
load_weights
(
self
,
weights
)
# type: ignore
# Fallback
# Fallback
else
:
else
:
loader
=
AutoWeightsLoader
(
self
)
loader
=
AutoWeightsLoader
(
self
)
loader
.
load_weights
(
weights
)
return
loader
.
load_weights
(
weights
)
return
ModelForPooling
# type: ignore
return
ModelForPooling
# type: ignore
...
...
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