[MoE Refactor] Rename FusedMoE to FusedMoEFactory (#44941)

Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: bnellnm <49004751+bnellnm@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
bnellnm
2026-07-31 11:28:18 +01:00
committed by GitHub
co-authored by Harry Mellor
parent c911120a6f
commit 6e311c6e20
80 changed files with 243 additions and 234 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ from vllm.logger import init_logger
from vllm.model_executor.layers.activation import SiluAndMul, SwigluStepAndMul
from vllm.model_executor.layers.attention import Attention
from vllm.model_executor.layers.fused_moe import (
FusedMoE,
FusedMoEFactory,
MoERunner,
fused_moe_make_expert_params_mapping,
)
@@ -376,7 +376,7 @@ class FusedMoEBlock(nn.Module):
quant_config=quant_config,
prefix=f"{prefix}.share_expert",
)
self.experts = FusedMoE(
self.experts = FusedMoEFactory(
shared_experts=self.share_expert,
gate=self.gate,
num_experts=config.moe_num_experts,
@@ -404,7 +404,7 @@ class FusedMoEBlock(nn.Module):
hidden_states=hidden_states, router_logits=hidden_states
)
else:
# TODO(bnell): this gate could be moved into the FusedMoE?
# TODO(bnell): this gate could be moved into the MoERunner?
router_logits, _ = self.gate(hidden_states)
final_hidden_states = self.experts(
hidden_states=hidden_states, router_logits=router_logits