Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion vllm/lora/layers/fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ def _inject_lora_into_fused_moe(self):
m_fused_moe_fn.fused_experts, (MarlinExperts, UnfusedOAITritonExperts)
)
else:
assert isinstance(m_fused_moe_fn.fused_experts, TritonExperts)
# MarlinExperts used for NVFP4 (see select_nvfp4_moe_backend)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove comment

assert isinstance(
m_fused_moe_fn.fused_experts, (TritonExperts, MarlinExperts)
)

def fwd_decorator(layer, func):
def wrapper(*args, **kwargs):
Expand Down
3 changes: 3 additions & 0 deletions vllm/model_executor/layers/fused_moe/oracle/nvfp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def select_nvfp4_moe_backend(
Note: Shape-specific fallbacks may still occur at runtime.
"""

if config.is_lora_enabled:
return NvFp4MoeBackend.MARLIN, backend_to_kernel_cls(NvFp4MoeBackend.MARLIN)

# NOTE: the kernels are selected in the following order.
AVAILABLE_BACKENDS = [
NvFp4MoeBackend.FLASHINFER_TRTLLM,
Expand Down