@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / dad2d6a590
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 9, 01:15 UTC

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

Signed-off-by: l4b4r4b4b4 <lucas.cansino@mail.de>

Lucas Hänke de Cansino committed Feb 3, 2026 at 09:35 UTC dad2d6a590207cb8938fb915602794665b8e9326
1 file changed +5 -4
vllm/transformers_utils/configs/deepseek_vl2.py
+5 -4
@@ -119,8 +119,9 @@ class DeepseekVLV2Config(PretrainedConfig):
119 self.candidate_resolutions = candidate_resolutions
120 self.vocab_size = self.text_config.vocab_size
121
122 - # update model_type for OCR model
123 - if "DeepseekOCRForCausalLM" in (
124 - self.architectures or kwargs.get("architectures", [])
125 - ):
122 + # update model_type for OCR models
123 + architectures = self.architectures or kwargs.get("architectures", [])
124 + if "DeepseekOCRForCausalLM" in architectures:
125 self.model_type = "deepseek_ocr"
126 + elif "DeepseekOCR2ForCausalLM" in architectures:
127 + self.model_type = "deepseek_ocr2"