From 59464dbf152345ae3795db7a4dee0a556d362b4d Mon Sep 17 00:00:00 2001 From: ant-yy Date: Tue, 25 Nov 2025 18:09:28 +0800 Subject: [PATCH] [Fix]: Further fix the buffer len of future map (#13916) Signed-off-by: vito.yy --- python/sglang/srt/managers/overlap_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/managers/overlap_utils.py b/python/sglang/srt/managers/overlap_utils.py index 10717c6ef..07745cf58 100644 --- a/python/sglang/srt/managers/overlap_utils.py +++ b/python/sglang/srt/managers/overlap_utils.py @@ -50,7 +50,7 @@ class FutureMap: if chunked_prefill_size else 0 ) - self.future_limit = max_running_requests * 3 + max_num_chunks + self.future_limit = max_running_requests * (3 + max_num_chunks) # Adding 2 * max_running_requests to future_limit ensures the buffer is sufficiently large. self.future_buffer_len = self.future_limit + 2 * max_running_requests self.device = device