mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-21 18:55:01 +08:00
[Bugfix] Fix Shared Expert/Zero expert code in FusedMoE.process_chunk (#25698)
Signed-off-by: Sage Moore <sage@neuralmagic.com> Co-authored-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com> Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
parent
c761b84d5f
commit
fa55373af1
@ -1925,7 +1925,9 @@ class FusedMoE(CustomOp):
|
|||||||
assert self.shared_experts is None or isinstance(
|
assert self.shared_experts is None or isinstance(
|
||||||
final_hidden_states, tuple)
|
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
|
final_hidden_states, zero_expert_result = final_hidden_states
|
||||||
if zero_expert_result is not None:
|
if zero_expert_result is not None:
|
||||||
final_hidden_states += zero_expert_result
|
final_hidden_states += zero_expert_result
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user