Unverified Commit 63b22e0d authored by CSWYF3634076's avatar CSWYF3634076 Committed by GitHub
Browse files

[Model][Bugfix] fix ernie45 moe 300B SharedFusedMoE output tuple (#27316)


Signed-off-by: default avatarwangyafeng <wangyafeng@baidu.com>
parent 5980604c
...@@ -215,6 +215,8 @@ class Ernie4_5_MoeMoE(nn.Module): ...@@ -215,6 +215,8 @@ class Ernie4_5_MoeMoE(nn.Module):
if self.has_shared_experts: if self.has_shared_experts:
final_hidden_states = final_hidden_states[0] + final_hidden_states[1] final_hidden_states = final_hidden_states[0] + final_hidden_states[1]
else:
final_hidden_states = final_hidden_states[1]
if self.tp_size > 1: if self.tp_size > 1:
final_hidden_states = self.experts.maybe_all_reduce_tensor_model_parallel( final_hidden_states = self.experts.maybe_all_reduce_tensor_model_parallel(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment