Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
6a1a64fa
Unverified
Commit
6a1a64fa
authored
Nov 06, 2025
by
Yi Zhang
Committed by
GitHub
Nov 05, 2025
Browse files
[BUGFIX] fix output_ids in abort (#12737)
parent
e2715cf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
python/sglang/srt/managers/tokenizer_manager.py
python/sglang/srt/managers/tokenizer_manager.py
+3
-1
No files found.
python/sglang/srt/managers/tokenizer_manager.py
View file @
6a1a64fa
...
...
@@ -1819,9 +1819,11 @@ class TokenizerManager(TokenizerCommunicatorMixin):
output_ids
=
state
.
output_ids
meta_info
[
"completion_tokens"
]
=
len
(
output_ids
)
if
is_stream
:
output_ids
=
[
output_ids
[
-
1
]]
if
len
(
output_ids
)
>
0
else
[]
out
=
{
"text"
:
state
.
text
,
"output_ids"
:
[
output_ids
[
-
1
]]
if
is_stream
else
output_ids
,
"output_ids"
:
output_ids
,
"meta_info"
:
meta_info
,
}
state
.
out_list
.
append
(
out
)
...
...
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