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
a4851cfe
Unverified
Commit
a4851cfe
authored
Jul 14, 2025
by
Chauncey
Committed by
GitHub
Jul 14, 2025
Browse files
[Bugfix]: Fix messy code when using logprobs (#20910)
Signed-off-by:
chaunceyjiang
<
chaunceyjiang@gmail.com
>
parent
9887e8ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
vllm/transformers_utils/detokenizer_utils.py
vllm/transformers_utils/detokenizer_utils.py
+2
-5
No files found.
vllm/transformers_utils/detokenizer_utils.py
View file @
a4851cfe
...
@@ -78,7 +78,6 @@ def convert_prompt_ids_to_tokens(
...
@@ -78,7 +78,6 @@ def convert_prompt_ids_to_tokens(
def
convert_ids_list_to_tokens
(
def
convert_ids_list_to_tokens
(
tokenizer
:
AnyTokenizer
,
tokenizer
:
AnyTokenizer
,
token_ids
:
list
[
int
],
token_ids
:
list
[
int
],
skip_special_tokens
:
bool
=
False
,
)
->
list
[
str
]:
)
->
list
[
str
]:
"""Detokenize the input ids individually.
"""Detokenize the input ids individually.
...
@@ -92,10 +91,8 @@ def convert_ids_list_to_tokens(
...
@@ -92,10 +91,8 @@ def convert_ids_list_to_tokens(
"""
"""
token_str_lst
=
[]
token_str_lst
=
[]
for
token_id
in
token_ids
:
for
token_id
in
token_ids
:
token_str
=
tokenizer
.
decode
(
# use default skip_special_tokens.
[
token_id
],
token_str
=
tokenizer
.
decode
([
token_id
])
skip_special_tokens
=
skip_special_tokens
,
)
if
token_str
is
None
:
if
token_str
is
None
:
token_str
=
""
token_str
=
""
token_str_lst
.
append
(
token_str
)
token_str_lst
.
append
(
token_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