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
02bf31ef
Unverified
Commit
02bf31ef
authored
Jun 22, 2025
by
Atream
Committed by
GitHub
Jun 21, 2025
Browse files
[fix] PD disaggregation when enable mtp and tp!=dp (#7420)
parent
5ea5d221
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
python/sglang/srt/disaggregation/decode.py
python/sglang/srt/disaggregation/decode.py
+1
-1
python/sglang/srt/layers/dp_attention.py
python/sglang/srt/layers/dp_attention.py
+1
-1
python/sglang/srt/models/deepseek_v2.py
python/sglang/srt/models/deepseek_v2.py
+2
-1
No files found.
python/sglang/srt/disaggregation/decode.py
View file @
02bf31ef
...
...
@@ -766,7 +766,7 @@ class SchedulerDisaggregationDecodeMixin:
if
batch
:
result
=
self
.
run_batch
(
batch
)
if
not
delay_process
:
self
.
pr
epare_mlp_sync_batch
(
batch
,
result
)
self
.
pr
ocess_batch_result
(
batch
,
result
)
return
batch
,
result
def
get_next_disagg_decode_batch_to_run
(
...
...
python/sglang/srt/layers/dp_attention.py
View file @
02bf31ef
...
...
@@ -310,4 +310,4 @@ def attn_tp_reduce_scatter(
def
attn_tp_all_gather
(
output_list
:
List
[
torch
.
Tensor
],
input_
:
torch
.
Tensor
):
return
get_attention_tp_group
().
all_gather
(
input_
,
tensor_list
=
output_list
)
return
get_attention_tp_group
().
all_gather
(
input_
,
output_
tensor_list
=
output_list
)
python/sglang/srt/models/deepseek_v2.py
View file @
02bf31ef
...
...
@@ -1435,7 +1435,7 @@ class DeepseekV2DecoderLayer(nn.Module):
self
.
layer_scatter_modes
=
LayerScatterModes
.
init_new
(
layer_id
=
layer_id
,
num_layers
=
config
.
num_hidden_layers
,
num_layers
=
1
if
is_nextn
else
config
.
num_hidden_layers
,
is_layer_sparse
=
self
.
is_layer_sparse
,
is_previous_layer_sparse
=
is_previous_layer_sparse
,
)
...
...
@@ -1488,6 +1488,7 @@ class DeepseekV2DecoderLayer(nn.Module):
residual
:
Optional
[
torch
.
Tensor
],
zero_allocator
:
BumpAllocator
,
)
->
torch
.
Tensor
:
hidden_states
,
residual
=
self
.
layer_communicator
.
prepare_attn
(
hidden_states
,
residual
,
forward_batch
)
...
...
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