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
be067861
Unverified
Commit
be067861
authored
Oct 11, 2025
by
Chauncey
Committed by
GitHub
Oct 11, 2025
Browse files
[Frontend] Improve the performance of `is_reasoning_end` (#25735)
Signed-off-by:
chaunceyjiang
<
chaunceyjiang@gmail.com
>
parent
5bc26c43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
vllm/reasoning/basic_parsers.py
vllm/reasoning/basic_parsers.py
+2
-1
No files found.
vllm/reasoning/basic_parsers.py
View file @
be067861
...
...
@@ -59,7 +59,8 @@ class BaseThinkingReasoningParser(ReasoningParser):
)
def
is_reasoning_end
(
self
,
input_ids
:
list
[
int
])
->
bool
:
return
self
.
end_token_id
in
input_ids
end_token_id
=
self
.
end_token_id
return
any
(
input_id
==
end_token_id
for
input_id
in
reversed
(
input_ids
))
def
extract_content_ids
(
self
,
input_ids
:
list
[
int
])
->
list
[
int
]:
"""
...
...
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