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
7f3ee861
Unverified
Commit
7f3ee861
authored
Jun 21, 2025
by
pansicheng
Committed by
GitHub
Jun 21, 2025
Browse files
fix overlap pagecount (#6984)
Co-authored-by:
Zhiqiang Xie
<
xiezhq@stanford.edu
>
parent
bec58910
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
python/sglang/srt/managers/schedule_batch.py
python/sglang/srt/managers/schedule_batch.py
+5
-1
No files found.
python/sglang/srt/managers/schedule_batch.py
View file @
7f3ee861
...
...
@@ -1359,7 +1359,11 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
return
len
(
self
.
reqs
)
# In the decoding phase, the length of a request's KV cache should be
# the total length of the request minus 1
return
sum
(
1
for
req
in
self
.
reqs
if
(
req
.
seqlen
-
1
)
%
page_size
==
0
)
return
(
sum
(
1
for
req
in
self
.
reqs
if
req
.
seqlen
%
page_size
==
0
)
if
self
.
enable_overlap
else
sum
(
1
for
req
in
self
.
reqs
if
(
req
.
seqlen
-
1
)
%
page_size
==
0
)
)
def
check_decode_mem
(
self
,
buf_multiplier
=
1
):
tokens_required
=
(
...
...
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