Unverified Commit ace34e37 authored by Chen Zhang's avatar Chen Zhang Committed by GitHub
Browse files

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


Signed-off-by: default avatarChen Zhang <zhangch99@outlook.com>
parent e5db3e27
...@@ -1092,6 +1092,8 @@ class Qwen3NextModel(nn.Module): ...@@ -1092,6 +1092,8 @@ class Qwen3NextModel(nn.Module):
name.endswith(".bias") or name.endswith("_bias") name.endswith(".bias") or name.endswith("_bias")
) and name not in params_dict: ) and name not in params_dict:
continue continue
if name not in params_dict:
continue
param = params_dict[name] param = params_dict[name]
weight_loader = param.weight_loader weight_loader = param.weight_loader
weight_loader( weight_loader(
...@@ -1108,6 +1110,11 @@ class Qwen3NextModel(nn.Module): ...@@ -1108,6 +1110,11 @@ class Qwen3NextModel(nn.Module):
continue continue
if is_pp_missing_parameter(name, self): if is_pp_missing_parameter(name, self):
continue 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] param = params_dict[name]
weight_loader = getattr( weight_loader = getattr(
param, "weight_loader", default_weight_loader param, "weight_loader", default_weight_loader
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment