[Refactor] refactor humming linear and moe backends to use explicit layer configs (#49610)

Signed-off-by: Jinzhen Lin <jinzhen.ljz@antgroup.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
Jinzhen Lin
2026-08-07 10:03:19 -07:00
committed by GitHub
co-authored by OpenAI Codex
parent e229fdbc87
commit fcde8e1460
37 changed files with 448 additions and 341 deletions
@@ -751,7 +751,6 @@ class AutoAWQMoEMethod(FusedMoEMethodBase):
moe_config=self.moe,
experts_cls=self.experts_cls,
backend=self.wna16_moe_backend,
layer=layer,
is_k_full=self.is_k_full,
w13_g_idx=getattr(layer, "w13_g_idx", None),
w2_g_idx=getattr(layer, "w2_g_idx", None),
@@ -766,7 +765,12 @@ class AutoAWQMoEMethod(FusedMoEMethodBase):
get_humming_moe_quant_config,
)
return get_humming_moe_quant_config(layer)
return get_humming_moe_quant_config(
layer,
gemm1_alpha=getattr(layer, "swiglu_alpha", None),
gemm1_beta=getattr(layer, "swiglu_beta", None),
gemm1_clamp_limit=getattr(layer, "swiglu_limit", None),
)
return make_wna16_moe_quant_config(
w1_scale=layer.w13_scales,
w2_scale=layer.w2_scales,