[Bugfix] Qwen3-next with --hf-overrides \{\"num_hidden_layers\":8\} (#30433)

Signed-off-by: Chen Zhang <zhangch99@outlook.com>
This commit is contained in:
Chen Zhang 2025-12-13 06:12:45 -08:00 committed by GitHub
parent e5db3e2774
commit ace34e3783
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1092,6 +1092,8 @@ class Qwen3NextModel(nn.Module):
name.endswith(".bias") or name.endswith("_bias")
) and name not in params_dict:
continue
if name not in params_dict:
continue
param = params_dict[name]
weight_loader = param.weight_loader
weight_loader(
@ -1108,6 +1110,11 @@ class Qwen3NextModel(nn.Module):
continue
if is_pp_missing_parameter(name, self):
continue
if name not in params_dict:
logger.warning_once(
f"Parameter {name} not found in params_dict, skip loading"
)
continue
param = params_dict[name]
weight_loader = getattr(
param, "weight_loader", default_weight_loader