load draft model fix (#7506)

This commit is contained in:
yilian49
2025-07-17 21:41:32 -07:00
committed by GitHub
parent 8a32355704
commit 8aa5ae6b04
+6
View File
@@ -575,6 +575,12 @@ class DummyModelLoader(BaseModelLoader):
# 2. Post-processing of weights, including assigning specific member variables. # 2. Post-processing of weights, including assigning specific member variables.
# For `dummy_init`, only the second stage is required. # For `dummy_init`, only the second stage is required.
if hasattr(model, "post_load_weights"): if hasattr(model, "post_load_weights"):
if (
model_config.hf_config.architectures[0]
== "DeepseekV3ForCausalLMNextN"
):
model.post_load_weights(is_nextn=True)
else:
model.post_load_weights() model.post_load_weights()
return model.eval() return model.eval()