diff --git a/python/sglang/srt/model_executor/model_runner_kv_cache_mixin.py b/python/sglang/srt/model_executor/model_runner_kv_cache_mixin.py index c46ff0a38..32cf5d7e8 100644 --- a/python/sglang/srt/model_executor/model_runner_kv_cache_mixin.py +++ b/python/sglang/srt/model_executor/model_runner_kv_cache_mixin.py @@ -342,10 +342,11 @@ class ModelRunnerKVCacheMixin: additional_ratio = 0 if self.server_args.enable_mamba_extra_buffer(): - if not self.spec_algorithm.is_none(): - additional_ratio = MAMBA_CACHE_V2_ADDITIONAL_RATIO_NO_OVERLAP - else: + # ping-pong buffer size is 2 when overlap schedule is on, 1 otherwise. + if not self.server_args.disable_overlap_schedule: additional_ratio = MAMBA_CACHE_V2_ADDITIONAL_RATIO_OVERLAP + else: + additional_ratio = MAMBA_CACHE_V2_ADDITIONAL_RATIO_NO_OVERLAP return MAMBA_CACHE_SIZE_MAX_RUNNING_REQUESTS_RATIO + additional_ratio