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
a36c6758
Unverified
Commit
a36c6758
authored
Sep 19, 2025
by
Maximilien de Bayser
Committed by
GitHub
Sep 19, 2025
Browse files
Don't skip special tokens with hermes-style tool calling (#25281)
Signed-off-by:
Max de Bayser
<
mbayser@br.ibm.com
>
parent
3da17c2c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py
vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py
+9
-0
No files found.
vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py
View file @
a36c6758
...
@@ -98,6 +98,15 @@ class Hermes2ProToolParser(ToolParser):
...
@@ -98,6 +98,15 @@ class Hermes2ProToolParser(ToolParser):
else
:
else
:
return
delta_text
return
delta_text
def
adjust_request
(
self
,
request
:
ChatCompletionRequest
)
->
ChatCompletionRequest
:
if
request
.
tools
and
request
.
tool_choice
!=
'none'
:
# do not skip special tokens because the tool_call tokens are
# marked "special" in some models. Since they are skipped
# prior to the call to the tool parser, it breaks tool calling.
request
.
skip_special_tokens
=
False
return
request
def
extract_tool_calls
(
def
extract_tool_calls
(
self
,
self
,
model_output
:
str
,
model_output
:
str
,
...
...
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