From ecc0f0dec2171b7cf9693b362f83b1b2b177cb0c Mon Sep 17 00:00:00 2001 From: Cheng Wan <54331508+ch-wan@users.noreply.github.com> Date: Wed, 30 Sep 2026 13:25:54 -0700 Subject: [PATCH] [Fix] Pass the draft's attention ownership to DFLASH's eager LiLiCorr scope (#41808) --- python/sglang/srt/speculative/dflash_worker_v2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/speculative/dflash_worker_v2.py b/python/sglang/srt/speculative/dflash_worker_v2.py index 75e698ee80..f6d34c02bb 100644 --- a/python/sglang/srt/speculative/dflash_worker_v2.py +++ b/python/sglang/srt/speculative/dflash_worker_v2.py @@ -2667,7 +2667,10 @@ class DFlashWorkerV2(BaseSpecWorker): draft_hidden = draft_logits_output.hidden_states if draft_hidden is None: raise RuntimeError("DFLASH draft model returned no hidden states.") - with self.draft_tp_context(self.draft_model_runner.tp_group): + with self.draft_tp_context( + self.draft_model_runner.tp_group, + owns_attention=self.draft_owns_attention, + ): draft_next, lilicorr_candidate_ids, lilicorr_q_rows = ( propose_lilicorr_block( head=self.lilicorr,