Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi committed Jul 2, 2024
1 parent d8e8d64 commit e25c8e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/cache_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,7 @@ def batch_select_indices(self, indices: torch.Tensor):
self.self_attention_cache.batch_select_indices(indices)
self.cross_attention_cache.batch_select_indices(indices)


class HybridCache(Cache):
def __init__(self, config: PretrainedConfig, max_batch_size, max_cache_len, device="cpu", dtype=None) -> None:
if not hasattr(config, "sliding_window") or config.sliding_window is None:
Expand Down

0 comments on commit e25c8e1

Please sign in to comment.