{"record":{"id":"0d507f1f308fddab","repo":"vllm-project/vllm","slug":"max-num-seqs-max-num-reqs-exceeds-available-ma","errorCode":null,"errorMessage":"max_num_seqs ({max_num_reqs}) exceeds available Mamba cache blocks ({kv_cache_config.num_blocks}). Each decode sequence requires one Mamba cache block, so CUDA graph capture cannot proceed. Please lower max_num_seqs to at most {kv_cache_config.num_blocks} or increase gpu_memory_utilization.","messagePattern":"max_num_seqs \\((.+?)\\) exceeds available Mamba cache blocks \\((.+?)\\)\\. Each decode sequence requires one Mamba cache block, so CUDA graph capture cannot proceed\\. Please lower max_num_seqs to at most (.+?) or increase gpu_memory_utilization\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/compilation.py","lineNumber":1507,"sourceCode":"                tensor_parallel_size,\n            )\n\n        # For Mamba models with FULL decode cudagraphs, each decode\n        # sequence needs one Mamba cache block. The decode cudagraph\n        # dispatcher already caps batch sizes at max_num_seqs, so we just\n        # need to verify that enough blocks exist. Raising here instead\n        # of silently capping cudagraph_capture_sizes avoids unintended\n        # restrictions on PIECEWISE (prefill) cudagraphs.\n        # See: https://github.com/vllm-project/vllm/issues/34094\n        if (\n            kv_cache_config is not None\n            and max_num_reqs is not None\n            and cudagraph_mode.has_full_cudagraphs()\n            and not is_profiling\n            and kv_cache_config.has_mamba_layers\n            and max_num_reqs > kv_cache_config.num_blocks\n        ):\n            raise ValueError(\n                f\"max_num_seqs ({max_num_reqs}) exceeds available Mamba cache \"\n                f\"blocks ({kv_cache_config.num_blocks}). Each decode sequence \"\n                \"requires one Mamba cache block, so CUDA graph capture cannot \"\n                \"proceed. Please lower max_num_seqs to at most \"\n                f\"{kv_cache_config.num_blocks} or increase \"\n                \"gpu_memory_utilization.\"\n            )\n\n        self.cudagraph_mode = cudagraph_mode\n        return cudagraph_mode\n\n    def adjust_cudagraph_sizes_for_spec_decode(\n        self, uniform_decode_query_len: int, tensor_parallel_size: int\n    ):\n        multiple_of = uniform_decode_query_len\n        if tensor_parallel_size > 1 and self.pass_config.enable_sp:\n            multiple_of = max(uniform_decode_query_len, tensor_parallel_size)\n            if (","sourceCodeStart":1489,"sourceCodeEnd":1525,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/compilation.py#L1489-L1525","documentation":"Error \"max_num_seqs ({max_num_reqs}) exceeds available Mamba cache blocks ({kv_cache_config.num_blocks}). Each decode sequence requires one Mamba cache block, so CUDA graph capture cannot proceed. Please lower max_num_seqs to at most {kv_cache_config.num_blocks} or increase gpu_memory_utilization.\" thrown in vllm-project/vllm.","triggerScenarios":"Raised at vllm/config/compilation.py:1507 when validation fails: max_num_seqs exceeds available Mamba cache blocks so CUDA graph capture cannot proceed. Typically triggered by an incompatible or incomplete vLLM configuration, an unsupported platform/backend combination, or a runtime resource/dependency that is missing.","commonSituations":"Commonly encountered at vllm/config/compilation.py:1507 during vLLM startup/config validation or runtime setup when: (1) conflicting CLI flags or config fields are combined, (2) the current platform (CUDA/ROCm/CPU/XPU) or installed optional packages do not support the requested feature, or (3) a required value is absent or out of range. Resolve by correcting the configuration as described in the message, or by selecting a supported alternative.","solutions":["Lower max_num_seqs to at most the number of available Mamba cache blocks reported in the error.","Or increase gpu_memory_utilization so more Mamba cache blocks are allocated."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}