From 78408d2300952bc41dc0fc8b196c2b4feac5c390 Mon Sep 17 00:00:00 2001 From: Charles Chen Date: Thu, 14 May 2026 15:33:55 -0700 Subject: [PATCH] Fix frozen kv MTP crash when bonus_tokens is None (#25204) --- python/sglang/srt/speculative/frozen_kv_mtp_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/speculative/frozen_kv_mtp_utils.py b/python/sglang/srt/speculative/frozen_kv_mtp_utils.py index 71ebc4c99..043d8b63f 100644 --- a/python/sglang/srt/speculative/frozen_kv_mtp_utils.py +++ b/python/sglang/srt/speculative/frozen_kv_mtp_utils.py @@ -140,7 +140,7 @@ def select_last_verified_seed( counts = draft_input.num_accept_tokens.to(torch.long) last_indices = torch.cumsum(counts, dim=0) - 1 return ( - draft_input.bonus_tokens[last_indices], + draft_input.input_ids[last_indices], draft_input.hidden_states[last_indices], )