From 1dacedd2dbada7942b5a7348ea78679f69b5f10e Mon Sep 17 00:00:00 2001 From: Marin <3746994+petricevich@users.noreply.github.com> Date: Sun, 19 Oct 2025 04:53:33 +0200 Subject: [PATCH] make sure logit bias is applied during eagle spec decoding verification (#11555) --- python/sglang/srt/speculative/eagle_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/speculative/eagle_info.py b/python/sglang/srt/speculative/eagle_info.py index 083814c91..2eebdb679 100644 --- a/python/sglang/srt/speculative/eagle_info.py +++ b/python/sglang/srt/speculative/eagle_info.py @@ -246,7 +246,10 @@ class EagleVerifyInput(SpecInput, EagleVerifyInputV2Mixin): ) # Apply penalty - if sampling_info.penalizer_orchestrator.is_required: + if ( + sampling_info.penalizer_orchestrator.is_required + or sampling_info.logit_bias is not None + ): # This is a relaxed version of penalties for speculative decoding. linear_penalty = torch.zeros( (bs, logits_output.next_token_logits.shape[1]),