@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 944ffb5968
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 22:45 UTC

[Model Runner V2][Minor] Remove redundant `do_spec_decode` field (#35039)

Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Woosuk Kwon <woosuk@inferact.ai>

Nick Hill committed Feb 22, 2026 at 16:18 UTC 944ffb59680c0210ec54ddb43a3c7ef015e1f842
1 file changed +3 -8
vllm/v1/worker/gpu/model_runner.py
+3 -8
@@ -153,9 +153,9 @@ class GPUModelRunner(LoRAModelRunnerMixin):
153 self.cp_interleave = self.parallel_config.cp_kv_cache_interleave_size
154
155 self.speculator = None
156 + self.num_speculative_steps = 0
157 self.use_aux_hidden_state_outputs = False
158 if self.speculative_config is not None:
158 - self.do_spec_decode = True
159 self.num_speculative_steps = self.speculative_config.num_speculative_tokens
160 if self.is_last_pp_rank:
161 self.speculator = init_speculator(self.vllm_config, self.device)
@@ -165,9 +165,6 @@ class GPUModelRunner(LoRAModelRunnerMixin):
165 self.use_aux_hidden_state_outputs = True
166 if self.pp_size > 1:
167 raise ValueError("EAGLE3 with pipeline parallel is not supported.")
168 - else:
169 - self.do_spec_decode = False
170 - self.num_speculative_steps = 0
168
169 # Draft tokens propagation - for spec-dec + struct outputs.
170 self.draft_tokens_handler = DraftTokensHandler(self.device)
@@ -251,10 +248,8 @@ class GPUModelRunner(LoRAModelRunnerMixin):
248 )
249
250 prepare_communication_buffer_for_model(self.model)
254 - if self.do_spec_decode:
255 - speculator_model = getattr(self.speculator, "model", None)
256 - if speculator_model is not None:
257 - prepare_communication_buffer_for_model(speculator_model)
251 + if self.speculator is not None:
252 + prepare_communication_buffer_for_model(self.speculator)
253
254 def get_model(self) -> nn.Module:
255 return self.model