Fix edge case for truncated (#1747)

This commit is contained in:
Byron Hsu
2024-10-22 21:00:25 -07:00
committed by GitHub
parent 1f26e8b8e4
commit 17536e7e3d

View File

@@ -416,7 +416,7 @@ class Scheduler:
)
# Truncate prompts that are too long
if len(req.origin_input_ids) >= self.max_req_input_len:
if len(req.origin_input_ids) > self.max_req_input_len:
logger.warning(
"Request length is longer than the KV cache pool size or "
"the max context length. Truncated!!!"