[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
@@ -21,7 +21,7 @@ from vllm.distributed import (
)
from vllm.model_executor.layers.attention import Attention
from vllm.model_executor.layers.fused_moe import (
FusedMoE,
FusedMoEFactory,
fused_moe_make_expert_params_mapping,
)
from vllm.model_executor.layers.fused_moe.config import FusedMoEParallelConfig
@@ -211,7 +211,7 @@ class MLPBlock(torch.nn.Module):
return_bias=False,
)
assert config.intermediate_size % self.world_size == 0
self.experts = FusedMoE(
self.experts = FusedMoEFactory(
num_experts=config.num_local_experts,
top_k=config.num_experts_per_tok,
hidden_size=config.hidden_size,
@@ -1010,7 +1010,7 @@ class GptOssModel(nn.Module, EagleModelMixin):
tp_rank_end = min((tp_rank + 1) * per_rank_intermediate_size, intermediate_size)
# Use centralized weight remapping for MoE expert parameters.
# The FusedMoE refactor moved expert params under
# The MoERunner refactor moved expert params under
# `mlp.experts.routed_experts.*`; this remaps checkpoint names so
# MoE weight/bias keys resolve against params_dict.
for name, weight in remap_moe_expert_weights(weights, params_dict):