[Spec] Move forward timeout before verify to fix Eagle v1 filter mismatch (#18760)
This commit is contained in:
@@ -638,21 +638,6 @@ class MultiLayerEagleWorker(TpModelWorker):
|
||||
assert forward_batch.spec_info is batch.spec_info
|
||||
forward_batch.spec_info.topk_p = torch.cat(topk_p_list, dim=1)
|
||||
forward_batch.spec_info.topk_index = torch.cat(topk_index_list, dim=1)
|
||||
has_finished, unfinished_req_index = False, []
|
||||
for i, req in enumerate(batch.reqs):
|
||||
if req.finished():
|
||||
has_finished = True
|
||||
else:
|
||||
unfinished_req_index.append(i)
|
||||
if has_finished:
|
||||
unfinished_index_device = torch.tensor(
|
||||
unfinished_req_index,
|
||||
dtype=torch.int64,
|
||||
device=batch.spec_info.topk_p.device,
|
||||
)
|
||||
batch.spec_info.filter_batch(
|
||||
unfinished_index_device, has_been_filtered=False
|
||||
)
|
||||
|
||||
def forward_draft_extend_after_decode(self, batch: ScheduleBatch):
|
||||
assert isinstance(batch.spec_info, EagleDraftInput)
|
||||
|
||||
Reference in New Issue
Block a user