Store eos_token_id in Sequence for easy access (#3166)

This commit is contained in:
Nick Hill
2024-03-05 15:35:43 -08:00
committed by GitHub
parent 05af6da8d9
commit 8999ec3c16
6 changed files with 44 additions and 49 deletions
+3 -4
View File
@@ -59,10 +59,9 @@ class SchedulerOutputs:
and not self.blocks_to_swap_out and not self.blocks_to_copy)
def _sort_by_lora_ids(self) -> bool:
self.scheduled_seq_groups = sorted(
self.scheduled_seq_groups,
key=lambda g: (g.lora_request.lora_int_id
if g.lora_request else 0, g.request_id))
self.scheduled_seq_groups = sorted(self.scheduled_seq_groups,
key=lambda g:
(g.lora_int_id, g.request_id))
@property
def lora_requests(self) -> Set[LoRARequest]: