Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
95dc093b
"tests/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "20379d9d1395b8e95977faf80facff43065ba75f"
Unverified
Commit
95dc093b
authored
Jul 02, 2024
by
Daniel Hernandez Garcia
Committed by
GitHub
Jul 01, 2024
Browse files
[BugFix] gemma loading weights "lm_head.weight" key error (#577)
parent
d9ac6392
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
python/sglang/srt/models/gemma.py
python/sglang/srt/models/gemma.py
+4
-0
No files found.
python/sglang/srt/models/gemma.py
View file @
95dc093b
...
@@ -310,6 +310,10 @@ class GemmaForCausalLM(nn.Module):
...
@@ -310,6 +310,10 @@ class GemmaForCausalLM(nn.Module):
weight_loader
(
param
,
loaded_weight
,
shard_id
)
weight_loader
(
param
,
loaded_weight
,
shard_id
)
break
break
else
:
else
:
# lm_head is not used in vllm as it is tied with embed_token.
# To prevent errors, skip loading lm_head.weight.
if
"lm_head.weight"
in
name
:
continue
# Skip loading extra bias for GPTQ models.
# Skip loading extra bias for GPTQ models.
if
name
.
endswith
(
".bias"
)
and
name
not
in
params_dict
:
if
name
.
endswith
(
".bias"
)
and
name
not
in
params_dict
:
continue
continue
...
...
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