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
2838d6b3
Unverified
Commit
2838d6b3
authored
Oct 04, 2024
by
Domen Vreš
Committed by
GitHub
Oct 03, 2024
Browse files
[Bugfix] Weight loading fix for OPT model (#9042)
Co-authored-by:
dvres
<
dvres@fri.uni-lj.si
>
parent
91add85e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
vllm/model_executor/models/opt.py
vllm/model_executor/models/opt.py
+1
-1
No files found.
vllm/model_executor/models/opt.py
View file @
2838d6b3
...
@@ -353,7 +353,7 @@ class OPTForCausalLM(nn.Module):
...
@@ -353,7 +353,7 @@ class OPTForCausalLM(nn.Module):
]
]
params_dict
=
dict
(
self
.
named_parameters
(
remove_duplicate
=
False
))
params_dict
=
dict
(
self
.
named_parameters
(
remove_duplicate
=
False
))
for
name
,
loaded_weight
in
weights
:
for
name
,
loaded_weight
in
weights
:
if
"lm_head.weight"
in
name
:
if
"lm_head.weight"
in
name
and
self
.
config
.
tie_word_embeddings
:
continue
continue
if
name
.
startswith
(
"decoder."
):
if
name
.
startswith
(
"decoder."
):
name
=
"model."
+
name
name
=
"model."
+
name
...
...
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