convert : respect Mistral format for DeepseekV2Model (#30669)

Use the instance's is_mistral_format flag when DeepseekV2Model reloads
configuration, allowing Mistral MoE checkpoints to read params.json.

Fixes #29899

Signed-off-by: aiqubits <aiqubits@hotmail.com>
This commit is contained in:
aiqubits
2026-10-16 21:17:30 +08:00
committed by GitHub
parent f3363593f4
commit 2a667032dc
+1 -1
View File
@@ -243,7 +243,7 @@ class DeepseekV2Model(TextModel):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
hparams: dict = ModelBase.load_hparams(self.dir_model, is_mistral_format=False)
hparams: dict = ModelBase.load_hparams(self.dir_model, is_mistral_format=self.is_mistral_format)
self.origin_hf_arch = hparams.get('architectures', [None])[0]
# special handling for Deepseek OCR