[NPU] fix dsv4 mtp condition on NPU graph (#32711)

This commit is contained in:
JiaruiChang5268
2026-07-29 20:13:31 +08:00
committed by GitHub
parent d254ec9ff8
commit ca6e0ff2c8
2 changed files with 2 additions and 2 deletions
@@ -36,7 +36,7 @@ class EAGLEDraftExtendNpuGraphRunner(EAGLEDraftExtendCudaGraphRunner):
def _replay_graph(self, shape_key, forward_batch):
hf_config = self.model_runner.model_config.hf_config
if not (is_deepseek_dsa(hf_config) and is_deepseek_v4(hf_config)):
if not (is_deepseek_dsa(hf_config) or is_deepseek_v4(hf_config)):
seq_lens = forward_batch.seq_lens_cpu.tolist() + [0] * (
self.bs - self.raw_bs
)
@@ -88,7 +88,7 @@ class EAGLEDraftNpuGraphRunner(EAGLEDraftCudaGraphRunner):
def _replay_graph(self, shape_key, forward_batch):
hf_config = self.model_runner.model_config.hf_config
if not (is_deepseek_dsa(hf_config) and is_deepseek_v4(hf_config)):
if not (is_deepseek_dsa(hf_config) or is_deepseek_v4(hf_config)):
seq_lens_for_each_draft_step = []
for speculative_step_id in range(self.speculative_num_steps - 1):
seq_lens_cpu = (