Unverified Commit dad2d6a5 authored by Lucas Hänke de Cansino's avatar Lucas Hänke de Cansino Committed by GitHub
Browse files

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


Signed-off-by: default avatarl4b4r4b4b4 <lucas.cansino@mail.de>
parent 32e84fa1
...@@ -119,8 +119,9 @@ class DeepseekVLV2Config(PretrainedConfig): ...@@ -119,8 +119,9 @@ class DeepseekVLV2Config(PretrainedConfig):
self.candidate_resolutions = candidate_resolutions self.candidate_resolutions = candidate_resolutions
self.vocab_size = self.text_config.vocab_size self.vocab_size = self.text_config.vocab_size
# update model_type for OCR model # update model_type for OCR models
if "DeepseekOCRForCausalLM" in ( architectures = self.architectures or kwargs.get("architectures", [])
self.architectures or kwargs.get("architectures", []) if "DeepseekOCRForCausalLM" in architectures:
):
self.model_type = "deepseek_ocr" self.model_type = "deepseek_ocr"
elif "DeepseekOCR2ForCausalLM" in architectures:
self.model_type = "deepseek_ocr2"
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