Skip to content

Commit

Permalink
use ValueError
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
  • Loading branch information
youkaichao committed Jan 22, 2025
1 parent 5ff5423 commit cbdbcea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,8 @@ def __init__(

from vllm.platforms import current_platform

if self.enable_sleep_mode:
assert current_platform.is_cuda(), (
"Sleep mode is only supported on CUDA devices.")
if self.enable_sleep_mode and not current_platform.is_cuda():
raise ValueError("Sleep mode is only supported on CUDA devices.")

hf_config = get_config(self.model, trust_remote_code, revision,
code_revision, config_format)
Expand Down

0 comments on commit cbdbcea

Please sign in to comment.