10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef32d85 commit 448491bCopy full SHA for 448491b
lmdeploy/serve/openai/reasoning_parser/deepseek_r1_reasoning_parser.py
@@ -51,8 +51,11 @@ def extract_reasoning_content_streaming(
51
about what has previously been parsed and extracted (see constructor)
52
"""
53
# Skip single special tokens
54
- if len(delta_token_ids) == 1 and (delta_token_ids[0] in [self.think_start_token_id, self.think_end_token_id]):
55
- return None
+ if len(delta_token_ids) == 1:
+ if delta_token_ids[0] == self.think_end_token_id:
56
+ return DeltaMessage(content='')
57
+ elif delta_token_ids[0] == self.think_start_token_id:
58
+ return None
59
60
# Check if <think> is present in previous or delta.
61
# Keep compatibility with models that don't generate <think> tokens.
0 commit comments