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
a2f602b5
Unverified
Commit
a2f602b5
authored
Jan 16, 2025
by
Rin Intachuen
Committed by
GitHub
Jan 16, 2025
Browse files
fixed lm_head.weight error for quantized qwen (#2910)
parent
8f2c522a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/sglang/srt/models/qwen2.py
python/sglang/srt/models/qwen2.py
+2
-0
No files found.
python/sglang/srt/models/qwen2.py
View file @
a2f602b5
...
@@ -356,6 +356,8 @@ class Qwen2ForCausalLM(nn.Module):
...
@@ -356,6 +356,8 @@ class Qwen2ForCausalLM(nn.Module):
break
break
else
:
else
:
# Skip loading extra bias for GPTQ models.
# Skip loading extra bias for GPTQ models.
if
"lm_head.weight"
in
name
:
continue
if
name
.
endswith
(
".bias"
)
and
name
not
in
params_dict
:
if
name
.
endswith
(
".bias"
)
and
name
not
in
params_dict
:
continue
continue
param
=
params_dict
[
name
]
param
=
params_dict
[
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