Skip unnecessary penalizer (#1707)

This commit is contained in:
Lianmin Zheng authored and GitHub committed 2024-10-18 17:54:03 -07:00
1 parent bc12d4033f
commit 2bcfba1b08
7 files changed
+104 -75

No files matched your search

+1 -1
View File
@@ -90,7 +90,7 @@ class BaseTokenToKVPool:
select_index = self.free_slots[:need_size]
self.free_slots = self.free_slots[need_size:]
return select_index.to(self.device)
return select_index.to(self.device, non_blocking=True)
def free(self, free_index: torch.Tensor):
if self.is_not_in_free_group: