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 12, 22:15 UTC
[V0 Deprecation] Remove `num_lookahead_slots` (#29000)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: Michael Goin <mgoin64@gmail.com>
Cyrus Leung committed
Nov 20, 2025 at 14:39 UTC
20e4497be23f8e74882bfb0bd0db3d30dd821afc
3 files changed
-30
vllm/config/scheduler.py
-9
@@ -62,15 +62,6 @@ class SchedulerConfig:
62
"""For chunked prefill, a request is considered long if the prompt is
63
longer than this number of tokens."""
64
65
- num_lookahead_slots: int = Field(default=0, ge=0)
66
- """The number of slots to allocate per sequence per
67
- step, beyond the known token ids. This is used in speculative
68
- decoding to store KV activations of tokens which may or may not be
69
- accepted.
70
-
71
- NOTE: This will be replaced by speculative config in the future; it is
72
- present to enable correctness tests until then."""
73
-
65
enable_chunked_prefill: bool = True
66
"""If True, prefill requests can be chunked based
67
on the remaining `max_num_batched_tokens`.
vllm/config/speculative.py
-10
@@ -634,16 +634,6 @@ class SpeculativeConfig:
634
635
return self
636
637
- @property
638
- def num_lookahead_slots(self) -> int:
639
- """The number of additional slots the scheduler should allocate per
640
- step, in addition to the slots allocated for each known token.
641
-
642
- This is equal to the number of speculative tokens, as each speculative
643
- token must be scored.
644
- """
645
- return self.num_speculative_tokens
646
-
637
def use_eagle(self) -> bool:
638
return self.method in ("eagle", "eagle3", "mtp")
639
vllm/engine/arg_utils.py
-11
@@ -488,7 +488,6 @@ class EngineArgs:
488
489
ray_workers_use_nsight: bool = ParallelConfig.ray_workers_use_nsight
490
num_gpu_blocks_override: int | None = CacheConfig.num_gpu_blocks_override
491
- num_lookahead_slots: int = SchedulerConfig.num_lookahead_slots
491
model_loader_extra_config: dict = get_field(LoadConfig, "model_loader_extra_config")
492
ignore_patterns: str | list[str] = get_field(LoadConfig, "ignore_patterns")
493
@@ -1081,9 +1080,6 @@ class EngineArgs:
1080
"--long-prefill-token-threshold",
1081
**scheduler_kwargs["long_prefill_token_threshold"],
1082
)
1084
- scheduler_group.add_argument(
1085
- "--num-lookahead-slots", **scheduler_kwargs["num_lookahead_slots"]
1086
- )
1083
# multi-step scheduling has been removed; corresponding arguments
1084
# are no longer supported.
1085
scheduler_group.add_argument(
@@ -1653,18 +1649,11 @@ class EngineArgs:
1649
target_parallel_config=parallel_config,
1650
)
1651
1656
- # make sure num_lookahead_slots is set appropriately depending on
1657
- # whether speculative decoding is enabled
1658
- num_lookahead_slots = self.num_lookahead_slots
1659
- if speculative_config is not None:
1660
- num_lookahead_slots = speculative_config.num_lookahead_slots
1661
-
1652
scheduler_config = SchedulerConfig(
1653
runner_type=model_config.runner_type,
1654
max_num_batched_tokens=self.max_num_batched_tokens,
1655
max_num_seqs=self.max_num_seqs,
1656
max_model_len=model_config.max_model_len,
1667
- num_lookahead_slots=num_lookahead_slots,
1657
enable_chunked_prefill=self.enable_chunked_prefill,
1658
disable_chunked_mm_input=self.disable_chunked_mm_input,
1659
is_multimodal_model=model_config.is_multimodal_model,