[Fix] EXAONE MoE under DP attention and DeepEP (#42305)

This commit is contained in:
Cheng Wan
2026-10-03 02:19:19 -07:00
committed by GitHub
parent 2fa17a6467
commit b7fc516986
+3 -1
View File
@@ -406,6 +406,8 @@ class ExaoneMoEAttention(nn.Module):
hidden_states: torch.Tensor,
forward_batch: ForwardBatch,
) -> torch.Tensor:
if hidden_states.shape[0] == 0:
return hidden_states
qkv, _ = self.qkv_proj(hidden_states)
q, k, v = qkv.split([self.q_size, self.kv_size, self.kv_size], dim=-1)
@@ -532,7 +534,7 @@ class ExaoneMoEDecoderLayer(nn.Module):
hidden_states = self.ffn_boundary.prepare(hidden_states, forward_batch)
# Fully Connected
with self.ffn_boundary.exit(forward_batch) as ffn_exit:
hidden_states = self.mlp(hidden_states)
hidden_states = self.mlp(hidden_states, forward_batch)
return ffn_exit.finish(hidden_states)