Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
346e5645
Unverified
Commit
346e5645
authored
Jan 05, 2026
by
CHENYUE
Committed by
GitHub
Jan 05, 2026
Browse files
Add chat prefix completion feature to DeepSeek v3.2 (#31147)
parent
8be6432b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
vllm/tokenizers/deepseek_v32_encoding.py
vllm/tokenizers/deepseek_v32_encoding.py
+9
-5
No files found.
vllm/tokenizers/deepseek_v32_encoding.py
View file @
346e5645
...
@@ -169,6 +169,7 @@ def render_message(
...
@@ -169,6 +169,7 @@ def render_message(
response_format
=
msg
.
get
(
"response_format"
)
response_format
=
msg
.
get
(
"response_format"
)
tool_calls
=
msg
.
get
(
"tool_calls"
)
tool_calls
=
msg
.
get
(
"tool_calls"
)
reasoning_content
=
msg
.
get
(
"reasoning"
)
or
msg
.
get
(
"reasoning_content"
)
reasoning_content
=
msg
.
get
(
"reasoning"
)
or
msg
.
get
(
"reasoning_content"
)
is_prefix
=
msg
.
get
(
"prefix"
,
False
)
if
tools
:
if
tools
:
tools
=
tools_from_openai_format
(
tools
)
tools
=
tools_from_openai_format
(
tools
)
...
@@ -273,11 +274,14 @@ def render_message(
...
@@ -273,11 +274,14 @@ def render_message(
+
thinking_end_token
+
thinking_end_token
)
)
prompt
+=
assistant_msg_template
.
format
(
if
not
tool_calls
and
is_prefix
:
reasoning
=
thinking_part
,
prompt
+=
summary_content
content
=
summary_content
,
else
:
tool_calls
=
tool_calls_content
,
prompt
+=
assistant_msg_template
.
format
(
)
reasoning
=
thinking_part
,
content
=
summary_content
,
tool_calls
=
tool_calls_content
,
)
else
:
else
:
raise
NotImplementedError
(
f
"Unknown role:
{
role
}
"
)
raise
NotImplementedError
(
f
"Unknown role:
{
role
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment