From 17536e7e3dde0518097dd4c22cea35f7db8e5d5a Mon Sep 17 00:00:00 2001 From: Byron Hsu Date: Tue, 22 Oct 2024 21:00:25 -0700 Subject: [PATCH] Fix edge case for truncated (#1747) --- python/sglang/srt/managers/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/managers/scheduler.py b/python/sglang/srt/managers/scheduler.py index 210a243a4..16f4196bd 100644 --- a/python/sglang/srt/managers/scheduler.py +++ b/python/sglang/srt/managers/scheduler.py @@ -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!!!"