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
9b5f0f64
Unverified
Commit
9b5f0f64
authored
Aug 21, 2025
by
Liangsheng Yin
Committed by
GitHub
Aug 21, 2025
Browse files
Fix tiny misalign with previous truncation setting in tokenizer_manager (#9430)
parent
70bb066e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/managers/tokenizer_manager.py
python/sglang/srt/managers/tokenizer_manager.py
+1
-1
No files found.
python/sglang/srt/managers/tokenizer_manager.py
View file @
9b5f0f64
...
...
@@ -566,7 +566,7 @@ class TokenizerManager:
)
->
None
:
"""Validates that the input token count and the requested token count doesn't exceed the model's context length."""
# FIXME: unify the length validation logic with the one in the scheduler.
_max_req_len
=
self
.
context_len
-
1
_max_req_len
=
self
.
context_len
input_token_num
=
len
(
input_ids
)
if
input_ids
is
not
None
else
0
if
input_token_num
>=
self
.
context_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