config check sleep mode support oot platforms (#16562)

This commit is contained in:
Shuqiao Li
2025-04-15 07:31:50 +08:00
committed by GitHub
parent 1eb3c2ed48
commit d2020acac7
2 changed files with 7 additions and 2 deletions

View File

@@ -417,8 +417,10 @@ class ModelConfig:
from vllm.platforms import current_platform
if self.enable_sleep_mode and not current_platform.is_cuda():
raise ValueError("Sleep mode is only supported on CUDA devices.")
if (self.enable_sleep_mode
and not current_platform.is_sleep_mode_available()):
raise ValueError(
"Sleep mode is not supported on current platform.")
hf_config = get_config(self.hf_config_path or self.model,
trust_remote_code, revision, code_revision,