Fix tiny misalign with previous truncation setting in tokenizer_manager (#9430)
This commit is contained in:
1 parent
70bb066ee4
commit
9b5f0f64f5
1 file changed
+1
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user