A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 8, 08:45 UTC
[BugFix] Add block_size validation for mamba cache align mode (#34445)
Signed-off-by: huanghaoyan.hhy <huanghaoyan.hhy@alibaba-inc.com>
Harry Huang committed
Feb 13, 2026 at 10:18 UTC
6f019e6e0a0cde34a33826bc08756480816448dd
1 file changed
+9
vllm/config/vllm.py
+9
@@ -1110,6 +1110,15 @@ class VllmConfig:
1110
self.scheduler_config.disable_hybrid_kv_cache_manager = False
1111
1112
if self.cache_config.mamba_cache_mode == "align":
1113
+ assert (
1114
+ self.cache_config.block_size
1115
+ <= self.scheduler_config.max_num_batched_tokens
1116
+ ), (
1117
+ "In Mamba cache align mode, block_size "
1118
+ f"({self.cache_config.block_size}) must be <= "
1119
+ "max_num_batched_tokens "
1120
+ f"({self.scheduler_config.max_num_batched_tokens})."
1121
+ )
1122
if self.scheduler_config.long_prefill_token_threshold > 0:
1123
assert (
1124
self.scheduler_config.long_prefill_token_threshold