[spec v2] Fix output repetition by speculative sampling error (#12561)

This commit is contained in:
Liangsheng Yin
2025-11-03 23:00:17 +08:00
committed by GitHub
parent ffb32a8548
commit 3529c061bb

View File

@@ -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)