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
31c5d0a1
Unverified
Commit
31c5d0a1
authored
Jul 07, 2025
by
Woosuk Kwon
Committed by
GitHub
Jul 07, 2025
Browse files
[Optimize] Don't send token ids when kv connector is not used (#20586)
Signed-off-by:
Woosuk Kwon
<
woosuk.kwon@berkeley.edu
>
parent
afb7cff1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
vllm/v1/core/sched/scheduler.py
vllm/v1/core/sched/scheduler.py
+5
-1
No files found.
vllm/v1/core/sched/scheduler.py
View file @
31c5d0a1
...
...
@@ -621,6 +621,7 @@ class Scheduler(SchedulerInterface):
new_block_ids
:
list
[
tuple
[
list
[
int
],
...]]
=
[]
num_computed_tokens
:
list
[
int
]
=
[]
use_connector
=
self
.
connector
is
not
None
for
req
in
itertools
.
chain
(
running_reqs
,
resumed_reqs
):
req_id
=
req
.
request_id
req_ids
.
append
(
req_id
)
...
...
@@ -635,7 +636,10 @@ class Scheduler(SchedulerInterface):
token_ids
=
req
.
all_token_ids
[
req
.
num_computed_tokens
:
req
.
num_computed_tokens
+
num_tokens
]
new_token_ids
.
append
(
token_ids
)
else
:
elif
use_connector
:
# When using a KVConnector, we add a placeholder to avoid index
# out of bounds errors. TODO: Remove this once the KVConnector
# is updated to handle token IDs properly.
new_token_ids
.
append
([])
new_block_ids
.
append
(
req_to_new_block_ids
[
req_id
])
num_computed_tokens
.
append
(
req
.
num_computed_tokens
)
...
...
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