Unverified Commit dfb9af20 authored by Sage Moore's avatar Sage Moore Committed by GitHub
Browse files

[Bugfix] Fix Shared Expert/Zero expert code in FusedMoE.process_chunk (#25698)


Signed-off-by: default avatarSage Moore <sage@neuralmagic.com>
Co-authored-by: default avatarRobert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com>
parent 19f76ee6
......@@ -1925,7 +1925,9 @@ class FusedMoE(CustomOp):
assert self.shared_experts is None or isinstance(
final_hidden_states, tuple)
if isinstance(final_hidden_states, tuple):
if self.zero_expert_num is not None and self.zero_expert_num > 0:
assert isinstance(final_hidden_states, tuple)
assert self.shared_experts is None
final_hidden_states, zero_expert_result = final_hidden_states
if zero_expert_result is not None:
final_hidden_states += zero_expert_result
......
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