[EAGLE] Fix some boundary situation when retract reqs and req's max token = 1 (#2939)

Co-authored-by: josephyou <josephyou@tencent.com>
This commit is contained in:
996_icu
2025-01-21 09:46:43 +08:00
committed by GitHub
parent 60b2a44a80
commit b730aa6b9e
2 changed files with 10 additions and 0 deletions

View File

@@ -1112,6 +1112,8 @@ class ScheduleBatch:
self.has_grammar = any(req.grammar for req in self.reqs)
self.sampling_info.filter_batch(keep_indices, new_indices)
if self.spec_info:
self.spec_info.filter_batch(new_indices)
def merge_batch(self, other: "ScheduleBatch"):
# Penalizer orchestrator must be merged before Batch.reqs is merged. This is because