We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35cd0c1 commit 6a26fc6Copy full SHA for 6a26fc6
optimum/exporters/ipex/cache_utils.py
@@ -212,6 +212,8 @@ def get_max_length(self) -> Optional[int]:
212
def reset(self):
213
"""Resets the cache values while preserving the objects"""
214
self._seen_tokens = self.max_batch_size * [0]
215
+ self.block_tables.fill_(-1)
216
+ self.free_blocks = list(range(0, self.num_blocks))
217
218
def reorder_cache(self, beam_idx: torch.LongTensor):
219
"""Reorders the cache for beam search, given the selected beam indices."""
0 commit comments