-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bug] HybridCache not subscriptable (#1047)
Use transformers `Cache` interface rather than legacy tuples (still included for backwards compatibility). - When we overflow the size of StaticCache, HybridCache, reallocate a cache with double the size - Other fixed-size caches will just raise a warning and delete the cache until we adapt doubling logic to those cache types - Use `Cache.crop` when available for backtracking the cache - When `Cache.crop` is unavailable, try `Cache.reset` to avoid reallocation, finally falling back on deleting the cache
- Loading branch information
Showing
1 changed file
with
60 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters