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
2f4ec752
Unverified
Commit
2f4ec752
authored
Jun 13, 2025
by
pansicheng
Committed by
GitHub
Jun 13, 2025
Browse files
filter by num_hidden_layers (#7056)
parent
da47621c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
python/sglang/srt/models/deepseek_v2.py
python/sglang/srt/models/deepseek_v2.py
+1
-2
No files found.
python/sglang/srt/models/deepseek_v2.py
View file @
2f4ec752
...
...
@@ -1786,8 +1786,7 @@ class DeepseekV2ForCausalLM(nn.Module):
for
name
in
weight_names
:
if
"kv_b_proj"
in
name
:
layer_id
=
int
(
name
.
split
(
"."
)[
2
])
# filter the nextn layer.
if
layer_id
!=
self
.
config
.
num_hidden_layers
:
if
layer_id
<
self
.
config
.
num_hidden_layers
:
layer_ids
.
add
(
layer_id
)
for
layer_id
in
layer_ids
:
...
...
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