Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vllm_ascend/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from vllm.logger import logger
from vllm.platforms import Platform, PlatformEnum

import vllm_ascend.envs as envs_ascend
from vllm_ascend.ascend_config import check_ascend_config, init_ascend_config
from vllm_ascend.utils import ASCEND_QUATIZATION_METHOD, update_aclgraph_sizes

Expand Down Expand Up @@ -144,6 +145,10 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:

check_ascend_config(vllm_config, enforce_eager)

if vllm_config.speculative_config and envs_ascend.VLLM_ASCEND_ENABLE_DBO:
raise NotImplementedError(
"DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using NotImplementedError here might not be the most semantically correct choice. This exception is typically raised when an abstract method that must be implemented by a subclass has not been, or when a feature is not yet implemented. Since this check validates a combination of user-provided configurations, a ValueError would be more appropriate. It clearly signals that the provided configuration values are incompatible.

Suggested change
raise NotImplementedError(
"DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`")
raise ValueError(
"DBO and mtp can't work at the same time. Please `export VLLM_ASCEND_ENABLE_DBO=0`")


if enforce_eager or compilation_config.level == CompilationLevel.NO_COMPILATION:
logger.info("Compilation disabled, using eager mode by default")
compilation_config.level = CompilationLevel.NO_COMPILATION
Expand Down
3 changes: 0 additions & 3 deletions vllm_ascend/worker/model_runner_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ def __init__(self, vllm_config: VllmConfig, device: torch.device):
self.spec_token_num = 0
self.decode_token_per_req = 1
if self.speculative_config:
if envs_ascend.VLLM_ASCEND_ENABLE_DBO:
raise NotImplementedError(
"DBO and mtp can't work at the same currently")
self.use_spec_decode = True
self.spec_token_num = self.speculative_config.num_speculative_tokens
assert self.spec_token_num > 0
Expand Down
Loading