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
c3948ba6
"vscode:/vscode.git/clone" did not exist on "b50a4861b891bdb2c9a8e8b969e942b005ec0377"
Unverified
Commit
c3948ba6
authored
Apr 26, 2025
by
Ke Bao
Committed by
GitHub
Apr 25, 2025
Browse files
Reorder loop in shared expert weight loading (#5719)
parent
269c457e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
python/sglang/srt/models/deepseek_nextn.py
python/sglang/srt/models/deepseek_nextn.py
+6
-6
python/sglang/srt/models/deepseek_v2.py
python/sglang/srt/models/deepseek_v2.py
+6
-6
No files found.
python/sglang/srt/models/deepseek_nextn.py
View file @
c3948ba6
...
...
@@ -215,11 +215,11 @@ class DeepseekV3ForCausalLMNextN(DeepseekV3ForCausalLM):
"up_proj.weight_scale_inv"
,
]
names_to_remove
=
[]
for
num_repeat
in
range
(
self
.
n_share_experts_fusion
):
for
suffix
in
suffix_list
:
shared_expert_weight_name
=
(
f
"model.layers.0.mlp.shared_experts.
{
suffix
}
"
)
for
num_repeat
in
range
(
self
.
n_share_experts_fusion
):
weights_list
.
append
(
(
f
"model.layers.0."
...
...
python/sglang/srt/models/deepseek_v2.py
View file @
c3948ba6
...
...
@@ -1650,11 +1650,11 @@ class DeepseekV2ForCausalLM(nn.Module):
desc
=
f
"Cloning
{
self
.
n_share_experts_fusion
}
"
"replicas of the shared expert into MoE"
,
):
for
num_repeat
in
range
(
self
.
n_share_experts_fusion
):
for
suffix
in
suffix_list
:
shared_expert_weight_name
=
(
f
"model.layers.
{
moe_layer
}
.mlp.shared_experts.
{
suffix
}
"
)
for
num_repeat
in
range
(
self
.
n_share_experts_fusion
):
weights_list
.
append
(
(
f
"model.layers.
{
moe_layer
}
."
...
...
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