[XPU]feat: add DeepSeek-V4 XPU attention decode path (#42953)
Signed-off-by: Ma Jian <jian1.ma@intel.com>
This commit is contained in:
@@ -7,21 +7,22 @@ picks the right one for the current platform and re-exports the public
|
||||
classes used by the model registry and quantization config lookup.
|
||||
"""
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from vllm.platforms import current_platform
|
||||
|
||||
from .quant_config import DeepseekV4FP8Config
|
||||
|
||||
# Pick the per-platform implementation. The NVIDIA branch is the static
|
||||
# default that mypy sees; the ROCm branch overrides it at runtime and is
|
||||
# default that mypy sees; the ROCm/XPU branches override at runtime and are
|
||||
# kept type-compatible via ``# type: ignore[assignment]``.
|
||||
if TYPE_CHECKING or not current_platform.is_rocm():
|
||||
from .nvidia.model import DeepseekV4ForCausalLM
|
||||
from .nvidia.mtp import DeepSeekV4MTP
|
||||
if current_platform.is_rocm():
|
||||
from .amd.model import DeepseekV4ForCausalLM
|
||||
from .amd.mtp import DeepSeekV4MTP
|
||||
elif current_platform.is_xpu():
|
||||
from .xpu.model import DeepseekV4ForCausalLM # type: ignore[assignment]
|
||||
from .xpu.mtp import DeepSeekV4MTP # type: ignore[assignment]
|
||||
else:
|
||||
from .amd.model import DeepseekV4ForCausalLM # type: ignore[assignment]
|
||||
from .amd.mtp import DeepSeekV4MTP # type: ignore[assignment]
|
||||
from .nvidia.model import DeepseekV4ForCausalLM # type: ignore[assignment]
|
||||
from .nvidia.mtp import DeepSeekV4MTP # type: ignore[assignment]
|
||||
|
||||
__all__ = [
|
||||
"DeepSeekV4MTP",
|
||||
|
||||
Reference in New Issue
Block a user