Unify spec v2's naming manner. (#15990)

This commit is contained in:
Liangsheng Yin
2025-12-28 14:14:52 +08:00
committed by GitHub
parent 26c5091217
commit bf90ea9c5b
8 changed files with 31 additions and 35 deletions

View File

@@ -1854,16 +1854,16 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
)
@property
def is_eagle_v2(self):
# FIXME: finally deprecate is_eagle_v2
def is_spec_v2(self):
# FIXME: finally deprecate is_spec_v2
return self.enable_overlap and self.spec_algorithm.is_eagle()
def prepare_for_decode(self):
self.forward_mode = ForwardMode.DECODE
bs = len(self.reqs)
if self.is_eagle_v2:
# TODO(spec-v2): all v2 spec should go through this path
if self.is_spec_v2:
# TODO(spec-v2): all spec v2 should go through this path
draft_input: EagleDraftInput = self.spec_info
draft_input.prepare_for_decode(self)
@@ -1942,7 +1942,7 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
)
def maybe_wait_verify_done(self):
if self.is_eagle_v2:
if self.is_spec_v2:
draft_input: EagleDraftInput = self.spec_info
if draft_input.verify_done is not None:
draft_input.verify_done.synchronize()
@@ -2018,7 +2018,7 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
# NOTE: spec_info filtered before batch filtering only happens in:
# - Spec v1's verify phase
# - Only for decode batch (running_batch)
has_been_filtered = v1_spec_info_filtered and not self.is_eagle_v2
has_been_filtered = v1_spec_info_filtered and not self.is_spec_v2
if self.spec_info:
self.spec_info.filter_batch(
@@ -2027,7 +2027,7 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
)
def merge_batch(self, other: "ScheduleBatch"):
# NOTE: in v2 eagle mode, we do not need wait verify here because
# NOTE: in spec v2 mode, we do not need wait verify here because
# 1) current batch is always prefill, whose seq_lens is not a future
# 2) other batch is always decode, which is finished in previous step