From 53dca74f478dc245242e735b2476b4529b0e504f Mon Sep 17 00:00:00 2001 From: chenxu214 Date: Mon, 12 Jan 2026 20:14:35 +0800 Subject: [PATCH] Bugfix: EagleDraftWorker has not attribute "eagle_use_aux_hidden_state" (#16480) --- python/sglang/srt/speculative/eagle_worker_v2.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/speculative/eagle_worker_v2.py b/python/sglang/srt/speculative/eagle_worker_v2.py index c65587ab2..d3dcc2afd 100644 --- a/python/sglang/srt/speculative/eagle_worker_v2.py +++ b/python/sglang/srt/speculative/eagle_worker_v2.py @@ -144,7 +144,14 @@ class EagleDraftWorker(BaseDraftWorker): # Alias for better readability self.draft_runner = self.draft_worker.model_runner - + self.eagle_use_aux_hidden_state = False + if self.speculative_algorithm.is_eagle3(): + eagle_config = getattr( + self.draft_runner.model_config.hf_config, "eagle_config", {} + ) + self.eagle_use_aux_hidden_state = eagle_config.get( + "use_aux_hidden_state", True + ) self.init_token_map() self.init_lm_head()