Fix tiny misalign with previous truncation setting in tokenizer_manager (#9430)
This commit is contained in:
@@ -566,7 +566,7 @@ class TokenizerManager:
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Validates that the input token count and the requested token count doesn't exceed the model's context length."""
|
"""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.
|
# 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
|
input_token_num = len(input_ids) if input_ids is not None else 0
|
||||||
if input_token_num >= self.context_len:
|
if input_token_num >= self.context_len:
|
||||||
|
|||||||
Reference in New Issue
Block a user