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
e4d61442
Unverified
Commit
e4d61442
authored
Apr 22, 2025
by
Nick Hill
Committed by
GitHub
Apr 22, 2025
Browse files
[BugFix] Fix incremental detokenization perf issue (#16963)
Signed-off-by:
Nick Hill
<
nhill@redhat.com
>
parent
8d32dc60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
vllm/v1/engine/detokenizer.py
vllm/v1/engine/detokenizer.py
+1
-1
No files found.
vllm/v1/engine/detokenizer.py
View file @
e4d61442
...
@@ -161,7 +161,7 @@ class FastIncrementalDetokenizer(BaseIncrementalDetokenizer):
...
@@ -161,7 +161,7 @@ class FastIncrementalDetokenizer(BaseIncrementalDetokenizer):
prompt_suffix
=
request
.
prompt_token_ids
prompt_suffix
=
request
.
prompt_token_ids
prompt_len
=
len
(
prompt_suffix
)
prompt_len
=
len
(
prompt_suffix
)
if
prompt_len
>
4
:
if
prompt_len
>
4
:
for
i
in
range
(
4
,
m
ax
(
prompt_len
+
1
,
3
2
)):
for
i
in
range
(
4
,
m
in
(
prompt_len
+
1
,
2
4
)):
suffix
=
request
.
prompt_token_ids
[
-
i
:]
suffix
=
request
.
prompt_token_ids
[
-
i
:]
if
'�'
not
in
self
.
tokenizer
.
decode
(
suffix
):
if
'�'
not
in
self
.
tokenizer
.
decode
(
suffix
):
prompt_suffix
=
suffix
prompt_suffix
=
suffix
...
...
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