load draft model fix (#7506)

This commit is contained in:
yilian49
2025-07-18 00:41:32 -04:00
committed by GitHub
parent 8a32355704
commit 8aa5ae6b04

View File

@@ -575,7 +575,13 @@ class DummyModelLoader(BaseModelLoader):
# 2. Post-processing of weights, including assigning specific member variables.
# For `dummy_init`, only the second stage is required.
if hasattr(model, "post_load_weights"):
model.post_load_weights()
if (
model_config.hf_config.architectures[0]
== "DeepseekV3ForCausalLMNextN"
):
model.post_load_weights(is_nextn=True)
else:
model.post_load_weights()
return model.eval()