[Model]Support Step-3.7-Flash (#43859)

Signed-off-by: luotingdan <luotingdan@stepfun.com>
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
Co-authored-by: luotingdan <luotingdan@stepfun.com>
Co-authored-by: Isotr0py <Isotr0py@outlook.com>
Co-authored-by: Yu Huang <yuhuang@nvidia.com>
Co-authored-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
ltd0924
2026-05-28 17:01:48 -07:00
committed by GitHub
co-authored by luotingdan Isotr0py Yu Huang Jee Jee Li
parent 325a1ec4fb
commit b690b2bb67
15 changed files with 698 additions and 27 deletions
@@ -974,6 +974,19 @@ class FusedMoE(PluggableLayer):
# this is needed for compressed-tensors only
loaded_weight = loaded_weight.to(param.data.device)
# ModelOpt NVFP4 stores w13 input scales as two logical shards.
# The generic assignment below would broadcast w1/w3 into the
# whole expert row, so the second shard would overwrite the first.
if (
"ModelOpt" in quant_method_name
and param.data.ndim == 2
and shard_id in ("w1", "w3")
):
scale_expert_id = global_expert_id if use_global_sf else expert_id
scale_shard_id = 0 if shard_id == "w1" else 1
param.data[scale_expert_id][scale_shard_id] = loaded_weight.reshape(())
return True if return_success else None
if (
"compressed" in quant_method_name.lower()
and param.data[expert_id] != 1