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 11, 07:30 UTC
Adapt the old parameter enable_thinking in chat_template_kwargs (#30852)
Signed-off-by: xinsong.gao <1418762819@qq.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
高鑫崧 committed
Dec 17, 2025 at 23:10 UTC
b7b6a60aca0405b2d6b2ed6fd13853635f000b5d
2 files changed
+4
vllm/reasoning/deepseek_v3_reasoning_parser.py
+2
@@ -26,6 +26,8 @@ class DeepSeekV3ReasoningParser(ReasoningParser):
26
27
chat_kwargs = kwargs.pop("chat_template_kwargs", {}) or {}
28
thinking = bool(chat_kwargs.pop("thinking", False))
29
+ enable_thinking = bool(chat_kwargs.pop("enable_thinking", False))
30
+ thinking = thinking or enable_thinking
31
32
if thinking:
33
self._parser = DeepSeekR1ReasoningParser(tokenizer, *args, **kwargs)
vllm/tokenizers/deepseek_v32.py
+2
@@ -50,6 +50,8 @@ class DeepseekV32Tokenizer(CachedHfTokenizer):
50
**kwargs,
51
) -> str | list[int]:
52
thinking = kwargs.get("thinking", False)
53
+ enable_thinking = kwargs.get("enable_thinking", False)
54
+ thinking = thinking or enable_thinking
55
thinking_mode = "thinking"
56
if not thinking:
57
thinking_mode = "chat"