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
1b1b47a9
"examples/sampling/vscode:/vscode.git/clone" did not exist on "c0ac2f60b7e6622bae3a5b8a79686f55bc7b4ae3"
Unverified
Commit
1b1b47a9
authored
Apr 12, 2025
by
lambert0312
Committed by
GitHub
Apr 11, 2025
Browse files
Fix w8a8_int8 model shared experts fusion load weights error (#5120)
parent
3c9740d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
python/sglang/srt/models/deepseek_v2.py
python/sglang/srt/models/deepseek_v2.py
+18
-8
No files found.
python/sglang/srt/models/deepseek_v2.py
View file @
1b1b47a9
...
@@ -1480,14 +1480,24 @@ class DeepseekV2ForCausalLM(nn.Module):
...
@@ -1480,14 +1480,24 @@ class DeepseekV2ForCausalLM(nn.Module):
if
self
.
n_share_experts_fusion
is
not
None
and
self
.
n_share_experts_fusion
>
0
:
if
self
.
n_share_experts_fusion
is
not
None
and
self
.
n_share_experts_fusion
>
0
:
weights_list
=
list
(
weights
)
weights_list
=
list
(
weights
)
weights_dict
=
dict
(
weights_list
)
weights_dict
=
dict
(
weights_list
)
suffix_list
=
[
if
self
.
quant_config
.
get_name
()
==
"w8a8_int8"
:
"down_proj.weight"
,
suffix_list
=
[
"down_proj.weight_scale_inv"
,
"down_proj.weight"
,
"gate_proj.weight"
,
"down_proj.weight_scale"
,
"gate_proj.weight_scale_inv"
,
"gate_proj.weight"
,
"up_proj.weight"
,
"gate_proj.weight_scale"
,
"up_proj.weight_scale_inv"
,
"up_proj.weight"
,
]
"up_proj.weight_scale"
,
]
else
:
suffix_list
=
[
"down_proj.weight"
,
"down_proj.weight_scale_inv"
,
"gate_proj.weight"
,
"gate_proj.weight_scale_inv"
,
"up_proj.weight"
,
"up_proj.weight_scale_inv"
,
]
names_to_remove
=
[]
names_to_remove
=
[]
for
moe_layer
in
tqdm
(
for
moe_layer
in
tqdm
(
range
(
range
(
...
...
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