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 14, 05:30 UTC
[Misc] Add check for dual_chunk_attention (#24070)
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Jiangyun Zhu committed
Sep 3, 2025 at 12:19 UTC
e81d4e69c16c05c147b692a9f028265bd0d49092
1 file changed
+6
-1
vllm/config/__init__.py
+6
-1
@@ -49,7 +49,8 @@ from vllm.transformers_utils.config import (
49
try_get_tokenizer_config, uses_mrope)
50
from vllm.transformers_utils.s3_utils import S3Model
51
from vllm.transformers_utils.utils import is_s3, maybe_model_redirect
52
-from vllm.utils import (DEFAULT_MAX_NUM_BATCHED_TOKENS, LayerBlockType,
52
+from vllm.utils import (DEFAULT_MAX_NUM_BATCHED_TOKENS,
53
+ STR_DUAL_CHUNK_FLASH_ATTN_VAL, LayerBlockType,
54
LazyLoader, common_broadcastable_dtype, random_uuid)
55
56
if TYPE_CHECKING:
@@ -1304,6 +1305,10 @@ class ModelConfig:
1305
self.hf_config.dual_chunk_attention_config[
1306
"sparse_attention_enabled"] = True
1307
1308
+ if envs.VLLM_ATTENTION_BACKEND != STR_DUAL_CHUNK_FLASH_ATTN_VAL:
1309
+ raise ValueError("please set VLLM_ATTENTION_BACKEND to "
1310
+ f"{STR_DUAL_CHUNK_FLASH_ATTN_VAL}")
1311
+
1312
def verify_async_output_proc(self, parallel_config, speculative_config,
1313
device_config) -> None:
1314
if not self.use_async_output_proc: