[V0 Deprecation] Remove multi-step scheduling (#22138)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Woosuk Kwon <woosuk@thinkingmachines.ai>
This commit is contained in:
@@ -794,35 +794,6 @@ class SequenceGroup:
|
||||
def lora_int_id(self) -> int:
|
||||
return self.lora_request.lora_int_id if self.lora_request else 0
|
||||
|
||||
def init_multi_step(self, num_steps: int) -> None:
|
||||
self.state.num_steps = num_steps
|
||||
self.state.current_step = 0
|
||||
|
||||
def init_multi_step_from_lookahead_slots(self, num_lookahead_slots: int,
|
||||
num_scheduler_steps: int,
|
||||
is_multi_step: bool,
|
||||
enable_chunking: bool) -> None:
|
||||
|
||||
if not is_multi_step:
|
||||
self.init_multi_step(num_steps=num_scheduler_steps)
|
||||
return
|
||||
|
||||
# Multi-Step case
|
||||
is_prefill = self.is_prefill()
|
||||
|
||||
# The asserts below reflect the expectations of the current system.
|
||||
if is_prefill and enable_chunking:
|
||||
assert num_lookahead_slots == num_scheduler_steps
|
||||
self.init_multi_step(num_steps=num_lookahead_slots)
|
||||
else:
|
||||
is_decode: bool = not is_prefill
|
||||
# If it is a prefill, num_lookahead_slots must be 0
|
||||
assert num_lookahead_slots == 0 or is_decode
|
||||
# If it is a decode, num_lookahead_slots + 1 must match
|
||||
# the scheduler steps.
|
||||
assert num_lookahead_slots + 1 == num_scheduler_steps or is_prefill
|
||||
self.init_multi_step(num_steps=num_lookahead_slots + 1)
|
||||
|
||||
def set_last_token_time(self, now: float) -> None:
|
||||
"""Sets the last token time for Request level timings."""
|
||||
# If still in prefill phase, assertion fails.
|
||||
@@ -1367,15 +1338,6 @@ class ExecuteModelRequest(
|
||||
# Async callback
|
||||
async_callback: Optional[Callable] = None
|
||||
|
||||
@property
|
||||
def is_first_multi_step(self) -> bool:
|
||||
# TODO(will) make this be able to handle batches with variable number of
|
||||
# steps
|
||||
assert len(self.seq_group_metadata_list) > 0
|
||||
first_seq_group = self.seq_group_metadata_list[0]
|
||||
assert first_seq_group.state is not None
|
||||
return first_seq_group.state.current_step == 0
|
||||
|
||||
@property
|
||||
def is_last_step(self) -> bool:
|
||||
# TODO(will) make this be able to handle batches with variable number of
|
||||
|
||||
Reference in New Issue
Block a user