[MoE Refactor] Remove MoE legacy code (#51078)

Signed-off-by: Bill Nell <bnell@redhat.com>
This commit is contained in:
bnellnm
2026-08-05 14:35:36 -07:00
committed by GitHub
parent 4282fe52d5
commit 373fe8b83e
22 changed files with 3 additions and 295 deletions
+2 -11
View File
@@ -19,12 +19,8 @@ from vllm.model_executor.layers.fused_moe.fused_moe_modular_method import (
FusedMoEModularMethod,
)
from vllm.model_executor.layers.fused_moe.modular_kernel import (
FusedMoEKernel,
FusedMoEKernelModularImpl,
)
from vllm.model_executor.layers.fused_moe.prepare_finalize import (
MoEPrepareAndFinalizeNoDPEPModular,
)
from vllm.platforms import current_platform
from .utils import _get_lora_aux_cuda_stream, _get_lora_device
@@ -76,13 +72,8 @@ class FusedMoEWithLoRA(BaseLayerWithLoRA):
assert isinstance(moe_kernel.impl, FusedMoEKernelModularImpl)
moe_kernel.impl.shared_experts = None
else:
prepare_finalize = MoEPrepareAndFinalizeNoDPEPModular()
moe_kernel = FusedMoEKernel(
prepare_finalize,
routed_experts.quant_method.select_gemm_impl(
prepare_finalize, routed_experts
),
)
raise RuntimeError("Old-style modular kernel not supported.")
assert moe_kernel.supports_lora(), (
f"{type(moe_kernel.fused_experts).__name__} does not support LoRA. "
"For unquantized MoE, set moe_backend='triton' or moe_backend='auto' "