[Bugfix]: Fix Quark gpt-oss weight loading broken by FusedMoe refactor (#45067)

Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Rohan Potdar
2026-06-10 18:17:46 -07:00
committed by GitHub
co-authored by Andreas Karatzas
parent 86111c00c7
commit 7920ccb97c
+7
View File
@@ -635,6 +635,13 @@ class GptOssModel(nn.Module, EagleModelMixin):
"an unexpected condition. Please open an issue if encountered."
)
# The MoE refactor (#41184) moved expert params under
# `mlp.experts.routed_experts.*`; remap the legacy checkpoint
# name so keys like w2_bias resolve against params_dict.
fused_name = fused_name.replace(
".mlp.experts.", ".mlp.experts.routed_experts."
)
moe_quant_method = _get_moe_weight_dtype(layer_id=layer_id)
if (