[deepseek] Enable DP attention + TBO + shared experts fusion (#27510)
This commit is contained in:
@@ -680,6 +680,11 @@ class TboForwardBatchPreparer:
|
||||
):
|
||||
output_dict[key] = None
|
||||
continue
|
||||
elif key == "rids" and len(old_value) != num_seqs:
|
||||
output_dict[key] = old_value[
|
||||
start_seq_index : min(end_seq_index, len(old_value))
|
||||
]
|
||||
continue
|
||||
assert (
|
||||
len(old_value) == num_seqs
|
||||
), f"{key=} {old_value=} {num_seqs=} {batch=}"
|
||||
|
||||
@@ -1339,9 +1339,7 @@ class DeepseekV2MoE(nn.Module):
|
||||
return None
|
||||
|
||||
def op_gate(self, state):
|
||||
if is_non_idle_and_non_empty(
|
||||
state.forward_batch.forward_mode, state.hidden_states_mlp_input
|
||||
):
|
||||
if state.hidden_states_mlp_input.shape[0] > 0:
|
||||
# router_logits: (num_tokens, n_experts)
|
||||
state.router_logits = self.gate(state.hidden_states_mlp_input)
|
||||
else:
|
||||
|
||||
@@ -7858,11 +7858,6 @@ class ServerArgs:
|
||||
"When enabling two batch overlap, moe_a2a_backend cannot be 'none'."
|
||||
)
|
||||
|
||||
if self.enable_two_batch_overlap and self.enforce_shared_experts_fusion:
|
||||
raise ValueError(
|
||||
"--enable-two-batch-overlap and --enforce-shared-experts-fusion cannot be used together."
|
||||
)
|
||||
|
||||
# Check communications compression
|
||||
if self.enable_quant_communications and self.tp_size == 1:
|
||||
raise ValueError(
|
||||
|
||||
Reference in New Issue
Block a user