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
cb432f17
"src/array/vscode:/vscode.git/clone" did not exist on "87fb7ed05be1af47688162f7f77fc72b2f3f6390"
Unverified
Commit
cb432f17
authored
Jul 04, 2025
by
Cheng Wan
Committed by
GitHub
Jul 04, 2025
Browse files
saving hidden_states.clone() (#7705)
parent
1964c325
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
python/sglang/srt/layers/logits_processor.py
python/sglang/srt/layers/logits_processor.py
+2
-2
python/sglang/srt/models/deepseek_v2.py
python/sglang/srt/models/deepseek_v2.py
+0
-5
No files found.
python/sglang/srt/layers/logits_processor.py
View file @
cb432f17
...
@@ -436,8 +436,8 @@ class LogitsProcessor(nn.Module):
...
@@ -436,8 +436,8 @@ class LogitsProcessor(nn.Module):
if
self
.
do_tensor_parallel_all_gather_dp_attn
:
if
self
.
do_tensor_parallel_all_gather_dp_attn
:
logits_metadata
.
compute_dp_attention_metadata
(
hidden_states
)
logits_metadata
.
compute_dp_attention_metadata
(
hidden_states
)
hidden_states
,
local_hidden_states
=
(
hidden_states
,
local_hidden_states
=
(
logits_metadata
.
gathered_buffer
,
torch
.
empty_like
(
logits_metadata
.
gathered_buffer
)
,
hidden_states
.
clone
()
,
hidden_states
,
)
)
dp_gather_replicate
(
hidden_states
,
local_hidden_states
,
logits_metadata
)
dp_gather_replicate
(
hidden_states
,
local_hidden_states
,
logits_metadata
)
...
...
python/sglang/srt/models/deepseek_v2.py
View file @
cb432f17
...
@@ -1840,11 +1840,6 @@ class DeepseekV2DecoderLayer(nn.Module):
...
@@ -1840,11 +1840,6 @@ class DeepseekV2DecoderLayer(nn.Module):
hidden_states
,
residual
,
forward_batch
hidden_states
,
residual
,
forward_batch
)
)
if
self
.
enable_dp_attention
and
self
.
speculative_algorithm
.
is_eagle
():
# NOTE: this line resolves the degradation of MTP reception rate for non-zero DP ranks.
# See discussion here (https://github.com/sgl-project/sglang/pull/6081#discussion_r2147452251).
hidden_states
=
hidden_states
.
clone
()
return
hidden_states
,
residual
return
hidden_states
,
residual
def
op_comm_prepare_attn
(
def
op_comm_prepare_attn
(
...
...
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