[ROCm] Enable DeepSeek-V4 DSpark speculative decoding on AMD (MI350X / MI355X, gfx950) (#47419)

Signed-off-by: larryli2-amd <larryli2@amd.com>
Signed-off-by: larryli2-amd <Larry.Li@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
larryli2-amd
2026-07-10 23:22:19 +08:00
committed by GitHub
co-authored by Andreas Karatzas
parent 08dfd68610
commit c227aaa3f8
6 changed files with 586 additions and 14 deletions
+4 -4
View File
@@ -15,16 +15,16 @@ from .quant_config import DeepseekV4FP8Config
# default that mypy sees; the ROCm/XPU branches override at runtime and are
# kept type-compatible via ``# type: ignore[assignment]``.
if current_platform.is_rocm():
from .amd.dspark import ( # type: ignore[assignment]
DSparkDeepseekV4ForCausalLM,
)
from .amd.model import DeepseekV4ForCausalLM
from .amd.mtp import DeepSeekV4MTP
# DSpark is NVIDIA-only for now.
DSparkDeepseekV4ForCausalLM = None # type: ignore[assignment]
elif current_platform.is_xpu():
from .xpu.model import DeepseekV4ForCausalLM # type: ignore[assignment]
from .xpu.mtp import DeepSeekV4MTP # type: ignore[assignment]
DSparkDeepseekV4ForCausalLM = None # type: ignore[assignment]
DSparkDeepseekV4ForCausalLM = None # type: ignore[assignment, misc]
else:
from .nvidia.dspark import ( # type: ignore[assignment]
DSparkDeepseekV4ForCausalLM,