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
b26cb1c5
Unverified
Commit
b26cb1c5
authored
May 06, 2025
by
Zhiqiang Xie
Committed by
GitHub
May 06, 2025
Browse files
Fix problem of large page size with chunked prefill (#6046)
parent
f8e46093
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
python/sglang/srt/managers/schedule_policy.py
python/sglang/srt/managers/schedule_policy.py
+3
-3
No files found.
python/sglang/srt/managers/schedule_policy.py
View file @
b26cb1c5
...
@@ -499,12 +499,12 @@ class PrefillAdder:
...
@@ -499,12 +499,12 @@ class PrefillAdder:
),
),
)
)
else
:
else
:
if
self
.
rem_chunk_tokens
==
0
:
# Make sure at least one page is available
trunc_len
=
self
.
rem_chunk_tokens
-
self
.
tree_cache
.
page_size
+
1
if
trunc_len
<=
0
:
return
AddReqResult
.
OTHER
return
AddReqResult
.
OTHER
# Chunked prefill
# Chunked prefill
trunc_len
=
self
.
rem_chunk_tokens
req
.
extend_input_len
=
trunc_len
req
.
extend_input_len
=
trunc_len
req
.
fill_ids
=
req
.
fill_ids
[:
len
(
req
.
prefix_indices
)
+
trunc_len
]
req
.
fill_ids
=
req
.
fill_ids
[:
len
(
req
.
prefix_indices
)
+
trunc_len
]
...
...
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