[ROCm][Perf] Add Fused Shared Expert (FSE) support for Qwen3-Next (#39280)
Signed-off-by: nholmber <nholmber@users.noreply.github.com> Signed-off-by: Tres Popp <tres.popp@amd.com> Signed-off-by: Doug Lehr <douglehr@amd.com> Co-authored-by: nholmber <nholmber@users.noreply.github.com> Co-authored-by: Tres <tpopp@users.noreply.github.com> Co-authored-by: Tres Popp <tres.popp@amd.com> Co-authored-by: Doug Lehr <douglehr@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Douglas Lehr <91553416+dllehr-amd@users.noreply.github.com>
This commit is contained in:
co-authored by
nholmber
Tres
Tres Popp
Doug Lehr
Cursor
Douglas Lehr
parent
44e6b44a21
commit
2c6b59b807
@@ -285,6 +285,7 @@ class FusedMoE(PluggableLayer):
|
||||
router_logits_dtype: torch.dtype | None = None,
|
||||
gate: torch.nn.Module | None = None,
|
||||
shared_experts: torch.nn.Module | None = None,
|
||||
shared_expert_gate: torch.nn.Module | None = None,
|
||||
routed_input_transform: torch.nn.Module | None = None,
|
||||
routed_output_transform: torch.nn.Module | None = None,
|
||||
apply_routed_scale_to_output: bool = False,
|
||||
@@ -370,6 +371,8 @@ class FusedMoE(PluggableLayer):
|
||||
if n_shared_experts is not None and self.aiter_fmoe_shared_expert_enabled
|
||||
else 0
|
||||
)
|
||||
self.shared_expert_gate = shared_expert_gate
|
||||
|
||||
if (
|
||||
not self.aiter_fmoe_shared_expert_enabled
|
||||
and self.num_fused_shared_experts != 0
|
||||
@@ -608,6 +611,7 @@ class FusedMoE(PluggableLayer):
|
||||
router=self.router,
|
||||
gate=gate,
|
||||
shared_experts=shared_experts,
|
||||
shared_expert_gate=self.shared_expert_gate,
|
||||
quant_method=self.quant_method,
|
||||
enable_dbo=self.vllm_config.parallel_config.enable_dbo,
|
||||
routed_input_transform=routed_input_transform,
|
||||
|
||||
Reference in New Issue
Block a user