[Spec v2] Remove allocate_lens and enable over-allocation (#13478)

This commit is contained in:
Liangsheng Yin
2025-11-22 22:49:10 +08:00
committed by GitHub
parent 5625e32cae
commit 863124684c
8 changed files with 29 additions and 49 deletions

View File

@@ -39,7 +39,6 @@ class GenerationBatchResult:
# FIXME(lsyin): maybe move to a better place?
# sync path: forward stream -> output processor
accept_lens: Optional[torch.Tensor] = None
allocate_lens: Optional[torch.Tensor] = None
# relay path: forward stream -> next step forward
next_draft_input: Optional[EagleDraftInput] = None
@@ -67,9 +66,6 @@ class GenerationBatchResult:
if self.accept_lens is not None:
self.accept_lens = self.accept_lens.to("cpu", non_blocking=True)
if self.allocate_lens is not None:
self.allocate_lens = self.allocate_lens.to("cpu", non_blocking=True)
self.copy_done.record()
@classmethod