Unverified Commit 5b2a9422 authored by danisereb's avatar danisereb Committed by GitHub
Browse files

[BugFix] Fix LoRA Fp8 (#33879)


Signed-off-by: default avatarDaniel Serebrenik <daserebrenik@nvidia.com>
parent c1858b7e
......@@ -130,6 +130,11 @@ class FusedMoEWithLoRA(BaseLayerWithLoRA):
self.base_layer.ensure_moe_quant_config_init()
quant_config = self.base_layer.quant_method.moe_quant_config
if getattr(self.base_layer.quant_method, "supports_internal_mk", False):
# Use the existing modular kernel from the quant method
m_fused_moe_fn = self.base_layer.quant_method.moe_mk
else:
# Create a new modular kernel via select_gemm_impl
prepare_finalize = MoEPrepareAndFinalizeNoEP()
m_fused_moe_fn = FusedMoEModularKernel(
prepare_finalize,
......@@ -138,6 +143,7 @@ class FusedMoEWithLoRA(BaseLayerWithLoRA):
),
self.base_layer.shared_experts,
)
if quant_config.use_mxfp4_w4a16:
assert isinstance(
m_fused_moe_fn.fused_experts, (MarlinExperts, UnfusedOAITritonExperts)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment