Refactor TopK to ensure readability and extensibility (#9338)

This commit is contained in:
Cheng Wan
2025-09-14 19:16:25 -07:00
committed by GitHub
parent b7d385e812
commit 4844fac91d
14 changed files with 52 additions and 47 deletions

View File

@@ -121,7 +121,7 @@ class GptOssSparseMoeBlock(nn.Module):
)
self.top_k = config.num_experts_per_tok
experts_type = get_moe_impl_class()
experts_type = get_moe_impl_class(quant_config)
extra_kwargs = {}
if experts_type.__name__ == "FusedMoE":
quant_config_name = (