From 3529c061bbb796ef9d97baac3c8fe0d053390b9a Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Mon, 3 Nov 2025 23:00:17 +0800 Subject: [PATCH] [spec v2] Fix output repetition by speculative sampling error (#12561) --- python/sglang/srt/speculative/eagle_info_v2.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/sglang/srt/speculative/eagle_info_v2.py b/python/sglang/srt/speculative/eagle_info_v2.py index ce93d9aad..9d15f6297 100644 --- a/python/sglang/srt/speculative/eagle_info_v2.py +++ b/python/sglang/srt/speculative/eagle_info_v2.py @@ -290,9 +290,7 @@ class EagleVerifyInputV2Mixin: ), ) target_probs = target_probs.reshape(bs, self.draft_token_num, -1) - - # This is currently not used - draft_probs = torch.empty_like(target_probs) + draft_probs = torch.zeros_like(target_probs) # coins for rejection sampling coins = torch.rand_like(candidates, dtype=torch.float32, device=device)