Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d53598a
rename FusedMoE -> FusedMoEFactory
bnellnm Jun 8, 2026
0a0bc2e
fix
bnellnm Jun 8, 2026
d3ea2e2
Merge branch 'main' into fused-moe-rename
bnellnm Jun 10, 2026
1a5cdf5
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jun 17, 2026
b7a3a20
Merge remote-tracking branch 'nm-vllm/fused-moe-rename' into fused-mo…
bnellnm Jun 17, 2026
ab9cf60
rename new uses
bnellnm Jun 17, 2026
5ed725a
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jun 18, 2026
067c2ca
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jun 18, 2026
c2b0e69
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jun 22, 2026
35c8952
Merge branch 'main' into fused-moe-rename
bnellnm Jun 23, 2026
7ace30f
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jun 23, 2026
dfa4eb8
Merge remote-tracking branch 'nm-vllm/fused-moe-rename' into fused-mo…
bnellnm Jun 23, 2026
b7772c1
Update vllm/model_executor/layers/fused_moe/layer.py
bnellnm Jul 13, 2026
4952d20
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 13, 2026
385dd6b
update some comments and messages
bnellnm Jul 15, 2026
ec345d5
Merge branch 'main' into fused-moe-rename
bnellnm Jul 15, 2026
e4fd672
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 16, 2026
c5dcd97
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 21, 2026
19a264d
Merge remote-tracking branch 'nm-vllm/fused-moe-rename' into fused-mo…
bnellnm Jul 21, 2026
72d314d
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 22, 2026
ce89909
fix new model
bnellnm Jul 22, 2026
557bdf9
Merge branch 'main' into fused-moe-rename
bnellnm Jul 23, 2026
7e77663
Update tests/kernels/moe/test_moe_layer.py
bnellnm Jul 24, 2026
2730746
Update vllm/lora/model_manager.py
bnellnm Jul 24, 2026
d8ab1cf
Update tests/kernels/moe/test_moe_layer.py
bnellnm Jul 24, 2026
ad92e2c
Update tests/kernels/moe/test_moe_layer.py
bnellnm Jul 24, 2026
e5d72a4
Update tests/lora/test_lora_manager.py
bnellnm Jul 24, 2026
7d0390b
Update vllm/lora/layers/fused_moe.py
bnellnm Jul 24, 2026
17c345c
Update vllm/lora/model_manager.py
bnellnm Jul 24, 2026
46ac02a
Update vllm/model_executor/layers/fused_moe/oracle/int_wna16.py
bnellnm Jul 24, 2026
b2095bf
Update vllm/model_executor/layers/fused_moe/oracle/int_wna16.py
bnellnm Jul 24, 2026
17ac855
Update vllm/model_executor/layers/fused_moe/runner/moe_runner.py
bnellnm Jul 24, 2026
fd45eee
Update vllm/model_executor/layers/fused_moe/runner/moe_runner.py
bnellnm Jul 24, 2026
cb15e67
Update vllm/model_executor/layers/fused_moe/runner/moe_runner.py
bnellnm Jul 24, 2026
983e90b
Update vllm/_custom_ops.py
bnellnm Jul 24, 2026
af4898b
Update vllm/model_executor/models/openpangu.py
bnellnm Jul 24, 2026
4692549
Update vllm/model_executor/models/qwen3_next.py
bnellnm Jul 24, 2026
d4ed309
Update vllm/model_executor/models/qwen3_moe.py
bnellnm Jul 24, 2026
58d779f
Update vllm/model_executor/models/qwen3_moe.py
bnellnm Jul 24, 2026
012a59e
Update vllm/model_executor/model_loader/weight_utils.py
bnellnm Jul 24, 2026
69ff3fc
Update vllm/model_executor/layers/quantization/modelopt.py
bnellnm Jul 24, 2026
5b8f734
Update vllm/model_executor/model_loader/bitsandbytes_loader.py
bnellnm Jul 24, 2026
60739f2
Update vllm/model_executor/layers/quantization/compressed_tensors/com…
bnellnm Jul 24, 2026
11c5b4e
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 24, 2026
4845f93
Merge branch 'main' into fused-moe-rename
bnellnm Jul 27, 2026
0925fe1
Update vllm/models/deepseek_v4/nvidia/model.py
bnellnm Jul 28, 2026
70bfdfd
Update vllm/models/deepseek_v4/amd/mtp.py
bnellnm Jul 28, 2026
c9d9b04
Update vllm/models/deepseek_v4/amd/model.py
bnellnm Jul 28, 2026
f06eae9
Update vllm/model_executor/warmup/deep_gemm_warmup.py
bnellnm Jul 28, 2026
f020495
Update vllm/model_executor/models/step3p5.py
bnellnm Jul 28, 2026
07c04f3
Update vllm/model_executor/models/sarvam.py
bnellnm Jul 28, 2026
5b7210c
Update vllm/model_executor/models/longcat_flash.py
bnellnm Jul 28, 2026
bcff0f5
Update vllm/model_executor/models/longcat_flash.py
bnellnm Jul 28, 2026
85a8f7f
Update vllm/model_executor/models/laguna.py
bnellnm Jul 28, 2026
5cd5853
Update vllm/model_executor/models/laguna.py
bnellnm Jul 28, 2026
9d9532b
Update vllm/model_executor/models/laguna.py
bnellnm Jul 28, 2026
e72092c
Update vllm/model_executor/models/gemma4.py
bnellnm Jul 28, 2026
d04e866
Update vllm/model_executor/models/ernie45_moe.py
bnellnm Jul 28, 2026
47429b0
Update vllm/model_executor/models/gemma4.py
bnellnm Jul 28, 2026
8cc2d43
Update vllm/model_executor/models/bailing_moe.py
bnellnm Jul 28, 2026
7875676
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 28, 2026
71cdb28
fix lint
bnellnm Jul 29, 2026
070c1c1
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 29, 2026
0fec403
update for kimi
bnellnm Jul 29, 2026
fba6b61
Merge remote-tracking branch 'origin/main' into fused-moe-rename
bnellnm Jul 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/distributed/test_eplb_fused_moe_layer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project

# Test that the interaction between EPLB and FusedMoE Layer is okay
# Test that the interaction between EPLB and FusedMoEFactory Layer is okay

from dataclasses import dataclass

Expand All @@ -16,7 +16,7 @@
get_eplb_group,
get_tp_group,
)
from vllm.model_executor.layers.fused_moe.layer import FusedMoE
from vllm.model_executor.layers.fused_moe import FusedMoEFactory, MoERunner

from .eplb_utils import distributed_run, set_env_vars_and_device

Expand Down Expand Up @@ -69,8 +69,8 @@ def make_fused_moe_layer(
rank: int,
layer_idx: int,
test_config: TestConfig,
) -> FusedMoE:
fml = FusedMoE(
) -> MoERunner:
fml = FusedMoEFactory(
num_experts=test_config.num_experts,
top_k=test_config.num_topk,
hidden_size=test_config.hidden_size,
Expand Down
8 changes: 4 additions & 4 deletions tests/distributed/test_eplb_fused_moe_layer_dep_nvfp4.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project

# Test that the interaction between EPLB and FusedMoE Layer is okay for DP w/ NVFP4
# Test that the interaction between EPLB and MoERunner Layer is okay for DP w/ NVFP4

from dataclasses import dataclass

Expand All @@ -19,7 +19,7 @@
get_eplb_group,
)
from vllm.forward_context import set_forward_context
from vllm.model_executor.layers.fused_moe.layer import FusedMoE
from vllm.model_executor.layers.fused_moe.layer import FusedMoEFactory, MoERunner
from vllm.model_executor.layers.quantization.modelopt import (
ModelOptNvFp4Config,
ModelOptNvFp4FusedMoE,
Expand All @@ -44,7 +44,7 @@ def make_fused_moe_layer(
rank: int,
layer_idx: int,
test_config: TestConfig,
) -> FusedMoE:
) -> MoERunner:
quant_config = None

device = torch.device(f"cuda:{rank}")
Expand All @@ -55,7 +55,7 @@ def make_fused_moe_layer(
exclude_modules=[],
)

fml = FusedMoE(
fml = FusedMoEFactory(
num_experts=test_config.num_experts,
top_k=test_config.num_topk,
hidden_size=test_config.hidden_size,
Expand Down
2 changes: 1 addition & 1 deletion tests/kernels/moe/test_deepep_v2_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _deep_ep_v2_moe_cudagraph(
vllm_cfg.kernel_config = KernelConfig(moe_backend="flashinfer_trtllm")

with set_current_vllm_config(vllm_cfg):
# Initialize vLLM parallel state (needed by FusedMoE layer)
# Initialize vLLM parallel state (needed by MoERunner layer)
temp_file = tempfile.mktemp()
init_distributed_environment(
world_size=pgi.world_size,
Expand Down
19 changes: 12 additions & 7 deletions tests/kernels/moe/test_moe_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
from vllm.distributed.eplb.eplb_communicator import create_eplb_communicator
from vllm.distributed.eplb.rebalance_execute import rearrange_expert_weights_inplace
from vllm.forward_context import set_forward_context
from vllm.model_executor.layers.fused_moe import FusedMoE, MoERunner, fused_experts
from vllm.model_executor.layers.fused_moe import (
FusedMoEFactory,
MoERunner,
fused_experts,
)
from vllm.model_executor.layers.fused_moe.activation import MoEActivation
from vllm.model_executor.layers.fused_moe.config import FusedMoEQuantConfig
from vllm.model_executor.layers.fused_moe.router.router_factory import (
Expand Down Expand Up @@ -80,7 +84,7 @@
TOP_KS = [2, 6]

# dp_size, tp_size, use_ep
# Note: DP+TP is not yet supported in the FusedMoE layer.
# Note: DP+TP is not yet supported in the FusedMoEFactory layer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Note: DP+TP is not yet supported in the FusedMoEFactory layer.
# Note: DP+TP is not yet supported in the MoERunner layer.

PARALLEL_COMBOS = [
[1, 2, False],
[1, 4, False],
Expand Down Expand Up @@ -1023,7 +1027,7 @@ def make_fused_moe_layer(
kwargs["routed_input_transform"] = routed_input_transform
kwargs["routed_output_transform"] = routed_output_transform

layer = FusedMoE(
layer = FusedMoEFactory(
num_experts=global_num_experts,
top_k=top_k,
hidden_size=hidden_size,
Expand Down Expand Up @@ -1267,7 +1271,7 @@ def _test_body_eplb(
):
output_before = sp_wrapper(moe_layer)(hidden_states, router_logits)

# Create a fresh FusedMoE layer with enable_eplb=True
# Create a fresh MoERunner layer with enable_eplb=True
# Delete the original layer's registration so the constructor can
# re-use the same "from_forward_context" prefix
cc = vllm_config.compilation_config
Expand Down Expand Up @@ -1401,7 +1405,8 @@ def _run_one_config(

- When is_sequence_parallel=True (EP + sequence splitting):
* ep_size: Number of expert parallel ranks (equals dp_size * tp_size)
* tp_size: Number of ranks to split sequence across (becomes sp_size in FusedMoE)
* tp_size: Number of ranks to split sequence across (becomes sp_size in
MoERunner)
* Weights are chunked by ep_size (experts) but NOT by tp_size
* Input sequences are chunked by tp_size (via sp_wrapper)
"""
Expand Down Expand Up @@ -1476,8 +1481,8 @@ def _run_one_config(
torch.accelerator.empty_cache()

with set_current_vllm_config(vllm_config):
# Chunk weights for EP BEFORE creating FusedMoE
# FusedMoE uses EP-chunked weights and handles reductions internally
# Chunk weights for EP BEFORE creating MoERunner.
# MoERunner uses EP-chunked weights and handles reductions internally.
if ep_size > 1:
# Split experts across ranks (dimension 0 is the expert dimension)
# When EP is enabled, use EP group rank and ep_size for chunking
Expand Down
2 changes: 1 addition & 1 deletion tests/kernels/moe/test_moe_weight_loading_padded.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Tests for FusedMoE weight loading with padded hidden dimensions.
"""Tests for FusedMoEFactory weight loading with padded hidden dimensions.

When using DeepEP backends or NIXL EP with models like nemotron_h,
hidden_size may be rounded up (e.g., 2688 -> 3072) for backend requirements.
Expand Down
8 changes: 4 additions & 4 deletions tests/kernels/moe/test_routing_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This script demonstrates how to use the routing simulator to test
different routing strategies and analyze their performance, including
integration tests with FusedMoE layer.
integration tests with FusedMoEFactory layer.
"""

import tempfile
Expand Down Expand Up @@ -77,11 +77,11 @@ def test_basic_functionality(

def test_routing_strategy_integration(monkeypatch, device):
"""Test that the routing strategy environment variable works with
FusedMoE."""
FusedMoEFactory."""
pytest.importorskip("vllm.model_executor.layers.fused_moe.layer")

import vllm.envs as envs
from vllm.model_executor.layers.fused_moe.layer import FusedMoE
from vllm.model_executor.layers.fused_moe.layer import FusedMoEFactory

# Test parameters
num_tokens = 32
Expand Down Expand Up @@ -111,7 +111,7 @@ def test_routing_strategy_integration(monkeypatch, device):
)

for strategy in strategies:
fused_moe = FusedMoE(
fused_moe = FusedMoEFactory(
num_experts=num_experts,
top_k=top_k,
hidden_size=hidden_size,
Expand Down
20 changes: 10 additions & 10 deletions tests/kernels/moe/test_shared_fused_moe_routed_transform.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
Tests for FusedMoE with routed_input_transform.
Tests for FusedMoEFactory with routed_input_transform.

Verifies that applying routed_input_transform inside FusedMoE
Verifies that applying routed_input_transform inside FusedMoEFactory
produces the same results as applying the transform manually outside.
"""

Expand All @@ -13,7 +13,7 @@

from vllm.config import VllmConfig, set_current_vllm_config
from vllm.forward_context import set_forward_context
from vllm.model_executor.layers.fused_moe import FusedMoE
from vllm.model_executor.layers.fused_moe import FusedMoEFactory
from vllm.platforms import current_platform
from vllm.utils.torch_utils import is_torch_equal_or_newer, set_random_seed

Expand Down Expand Up @@ -133,9 +133,9 @@ def test_routed_input_transform_inside_vs_outside(
workspace_init,
monkeypatch,
):
"""Compare FusedMoE with transform inside vs manually applying outside.
Method A (inside): FusedMoE with routed_input_transform
Method B (outside): Manually transform, then FusedMoE without transform
"""Compare FusedMoEFactory with transform inside vs manually applying outside.
Method A (inside): FusedMoEFactory with routed_input_transform
Method B (outside): Manually transform, then FusedMoEFactory without transform
"""
if current_platform.is_rocm():
monkeypatch.setenv("VLLM_ROCM_USE_AITER", "1" if use_rocm_aiter else "0")
Expand All @@ -157,8 +157,8 @@ def test_routed_input_transform_inside_vs_outside(
routed_transform = SimpleLinear(hidden_size, latent_size, dtype)

with set_current_vllm_config(vllm_config):
# Method A: FusedMoE WITH routed_input_transform
moe_with_transform = FusedMoE(
# Method A: FusedMoEFactory WITH routed_input_transform
moe_with_transform = FusedMoEFactory(
shared_experts=shared_experts,
routed_input_transform=routed_transform,
num_experts=num_experts,
Expand All @@ -173,9 +173,9 @@ def test_routed_input_transform_inside_vs_outside(
prefix="moe_with_transform",
)

# Method B: FusedMoE WITHOUT routed_input_transform
# Method B: FusedMoEFactory WITHOUT routed_input_transform
# Note: shared_experts=None because when transform is done outside,
moe_without_transform = FusedMoE(
moe_without_transform = FusedMoEFactory(
shared_experts=None,
routed_input_transform=None,
num_experts=num_experts,
Expand Down
29 changes: 16 additions & 13 deletions tests/kernels/moe/test_zero_expert_moe.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Tests for FusedMoE with zero experts.
"""Tests for FusedMoEFactory with zero experts.

Verifies that:
- The ZeroExpertRouter is properly created and used as the layer router.
- A forward pass through FusedMoE with zero experts produces correct output.
- A forward pass through FusedMoEFactory with zero experts produces correct output.
- The output decomposes correctly into real expert + zero expert contributions.

Note: tests generated with Claude.
Expand All @@ -15,7 +15,7 @@

from vllm.config import VllmConfig, set_current_vllm_config
from vllm.forward_context import get_forward_context, set_forward_context
from vllm.model_executor.layers.fused_moe.layer import FusedMoE
from vllm.model_executor.layers.fused_moe.layer import FusedMoEFactory
from vllm.model_executor.layers.fused_moe.router.zero_expert_router import (
ZeroExpertRouter,
)
Expand All @@ -24,7 +24,7 @@

@pytest.fixture
def zero_expert_moe(dist_init, default_vllm_config):
"""Create a FusedMoE layer with zero experts."""
"""Create a FusedMoEFactory layer with zero experts."""
num_experts = 4
top_k = 2
# hidden_size must be >= 256 for the zero expert identity kernel to
Expand All @@ -45,7 +45,7 @@ def zero_expert_moe(dist_init, default_vllm_config):
with set_current_vllm_config(vllm_config), set_forward_context(None, vllm_config):
init_workspace_manager(torch.accelerator.current_device_index())

layer = FusedMoE(
layer = FusedMoEFactory(
zero_expert_type="identity",
e_score_correction_bias=e_score_correction_bias,
num_experts=num_experts,
Expand All @@ -66,7 +66,7 @@ def zero_expert_moe(dist_init, default_vllm_config):

@pytest.mark.parametrize("num_tokens", [1, 32])
def test_zero_expert_moe_router_is_zero_expert_router(zero_expert_moe, num_tokens):
"""Verify that FusedMoE with zero_expert_type creates a ZeroExpertRouter."""
"""Verify that FusedMoEFactory with zero_expert_type creates a ZeroExpertRouter."""
layer, _ = zero_expert_moe
assert isinstance(layer.router, ZeroExpertRouter), (
f"Expected ZeroExpertRouter but got {type(layer.router).__name__}."
Expand All @@ -83,7 +83,10 @@ def test_zero_expert_moe_router_is_zero_expert_router(zero_expert_moe, num_token

@pytest.mark.parametrize("num_tokens", [1, 32])
def test_zero_expert_moe_forward(zero_expert_moe, num_tokens):
"""Run a forward pass through FusedMoE with zero experts and verify output shape."""
"""
Run a forward pass through FusedMoEFactory with zero experts
and verify output shape.
"""
layer, vllm_config = zero_expert_moe

hidden_size = layer.routed_experts.hidden_size
Expand Down Expand Up @@ -118,16 +121,16 @@ def test_zero_expert_moe_forward(zero_expert_moe, num_tokens):

@pytest.mark.parametrize("num_tokens", [1, 32])
def test_zero_expert_moe_output_decomposition(zero_expert_moe, num_tokens):
"""Validate that the FusedMoE output equals a plain FusedMoE
"""Validate that the FusedMoEFactory output equals a plain FusedMoEFactory
output (real experts only) plus the zero expert contribution.

The key invariant is:
zero_layer.forward(h, r_full) == plain_layer.forward(h, r_real)
+ zero_expert_output

We create a plain FusedMoE layer with the same weights and real-expert-only
We create a plain FusedMoEFactory layer with the same weights and real-expert-only
router logits, compute the zero expert output via the ZeroExpertRouter, and
verify the sum matches the FusedMoE output.
verify the sum matches the FusedMoEFactory output.
"""
layer, vllm_config = zero_expert_moe
num_experts = 4
Expand All @@ -152,9 +155,9 @@ def test_zero_expert_moe_output_decomposition(zero_expert_moe, num_tokens):
with set_current_vllm_config(vllm_config), set_forward_context(None, vllm_config):
get_forward_context().all_moe_layers = None

# Create a plain FusedMoE layer with the same config but no zero
# Create a plain FusedMoEFactory layer with the same config but no zero
# experts. Use a separate prefix to avoid collision.
plain_layer = FusedMoE(
plain_layer = FusedMoEFactory(
num_experts=num_experts,
top_k=layer.routed_experts.top_k,
hidden_size=layer.routed_experts.hidden_size,
Expand Down Expand Up @@ -210,7 +213,7 @@ def test_zero_expert_moe_output_decomposition(zero_expert_moe, num_tokens):
expected,
atol=4e-3,
rtol=4e-3,
msg="FusedMoE output should equal plain FusedMoE output "
msg="FusedMoEFactory output should equal plain FusedMoEFactory output "
"plus zero expert contribution",
)

Expand Down
2 changes: 1 addition & 1 deletion tests/lora/test_lora_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def __init__(self, gate: nn.Module):
self.gate = gate # canonical path: "moe.gate"

# Inner submodule holding the SAME gate instance under another
# path. This mirrors how FusedMoE.runner.gate references the
# path. This mirrors how MoERunner.runner.gate references the
# block's gate in qwen3_moe.
class _Runner(nn.Module):
def __init__(self, g):
Expand Down
4 changes: 2 additions & 2 deletions tests/quantization/test_fp8.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Attention,
set_default_quant_scales,
)
from vllm.model_executor.layers.fused_moe import FusedMoE
from vllm.model_executor.layers.fused_moe import FusedMoEFactory
from vllm.model_executor.layers.quantization.fp8 import (
Fp8Config,
Fp8KVCacheMethod,
Expand Down Expand Up @@ -393,7 +393,7 @@ def test_fp8_reloading(
method.use_marlin = use_marlin

else:
layer = FusedMoE(
layer = FusedMoEFactory(
num_experts=1,
top_k=1,
hidden_size=1,
Expand Down
2 changes: 1 addition & 1 deletion vllm/_custom_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ def cutlass_fp4_moe_mm(
An FP4 Blockscaled Group Gemm that takes in a_tensors, b_tensors and runs
the gemms for each combination based on the specified problem sizes.

This is used as the MoE gemm during NVFP4 Quantized FusedMoE forward.
This is used as the MoE gemm during NVFP4 Quantized MoERunner forward.
- a/b_tensors: the NVFP4 a_ptrs and b_ptrs tensors which are quantized
input and expert weights.
- a_/b_scales: The blockscales in FP8-E4M3 precision
Expand Down
2 changes: 1 addition & 1 deletion vllm/config/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class QuantizationConfigArgs:
"""Spec applied to ``LinearBase`` layers."""

moe: QuantSpec | None = None
"""Spec applied to ``FusedMoE`` layers."""
"""Spec applied to ``FusedMoEFactory`` layers."""

ignore: list[str] = Field(default_factory=list)
"""Layers to skip quantization for."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def inject_kv_into_layer(

# Only process layers that have kv_cache
# attribute (attention layers) Skip non-attention
# layers like FusedMoE/MLP etc.
# layers like FusedMoEFactory/MLP etc.
kv_cache_layer = getattr(layer, "kv_cache", None)
if kv_cache_layer is None:
continue
Expand Down
2 changes: 1 addition & 1 deletion vllm/lora/layers/fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, base_layer: MoERunner) -> None:
"Monolithic kernels are not supported for Fused MoE LoRA."
)

# Use the MoE-aware TP rank/size: when EP is active, FusedMoE collapses
# Use the MoE-aware TP rank/size: when EP is active, MoERunner collapses
# moe_parallel_config.tp_size to 1 (experts are sharded across the
# TP group instead).
moe_parallel_config = self.moe_config.moe_parallel_config
Expand Down
Loading
Loading