[Fix] Speculative decoding crashes with DP-Attention (#33892)

This commit is contained in:
Eric Zhang
2026-08-10 00:56:36 +08:00
committed by GitHub
parent 2ab96d0fe0
commit 168eba3257
@@ -852,9 +852,12 @@ class MultiLayerEagleDraftWorker(EagleDraftWorkerBase):
forward_batch.token_to_kv_pool = self.draft_runner_list[ forward_batch.token_to_kv_pool = self.draft_runner_list[
step step
].token_to_kv_pool ].token_to_kv_pool
self.draft_runner_list[step].attn_backend.init_forward_metadata( if not forward_batch.forward_mode.is_idle():
forward_batch # An idle round (DP attention: this rank has no requests) has nothing
) # to plan pre-pad. Avoid raising when seq_lens is empty here.
self.draft_runner_list[step].attn_backend.init_forward_metadata(
forward_batch
)
draft_logits_output = self.draft_runner_list[step].forward( draft_logits_output = self.draft_runner_list[step].forward(
forward_batch forward_batch
) )