[Bugfix][Model] Fix DeepSeek-OCR-2 chat template to include BOS token (#33642)

Signed-off-by: l4b4r4b4b4 <lucas.cansino@mail.de>
This commit is contained in:
Lucas Hänke de Cansino
2026-02-03 09:35:58 +01:00
committed by GitHub
parent 32e84fa1ff
commit dad2d6a590

View File

@@ -119,8 +119,9 @@ class DeepseekVLV2Config(PretrainedConfig):
self.candidate_resolutions = candidate_resolutions
self.vocab_size = self.text_config.vocab_size
# update model_type for OCR model
if "DeepseekOCRForCausalLM" in (
self.architectures or kwargs.get("architectures", [])
):
# update model_type for OCR models
architectures = self.architectures or kwargs.get("architectures", [])
if "DeepseekOCRForCausalLM" in architectures:
self.model_type = "deepseek_ocr"
elif "DeepseekOCR2ForCausalLM" in architectures:
self.model_type = "deepseek_ocr2"