-
Notifications
You must be signed in to change notification settings - Fork 31.2k
[whisper] static kv cache #31166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sanchit-gandhi
merged 76 commits into
huggingface:main
from
sanchit-gandhi:whisper-static-kv
Jul 2, 2024
Merged
[whisper] static kv cache #31166
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
738ed90
make work with cache abstraction
624fa74
correct for static cache
f2124f8
hacks for compile
9f02f7d
make fast
2d7102e
fix
cd9ce9b
fix pos ids
abad0b9
generate
248be4d
fix sdpa
9ba0da9
fix sdpa cache pos
4ea437a
fix fa2
92f94f8
clean fa2
7ea0d16
integrate cache into generate
b4478c1
make style
b6cb739
copies
57a219b
more copies
2d91708
update eager
11e79a9
update sdpa
27d520b
update fa2
f72224d
simplify
fcf024a
use cache pos
3f48947
always compute cross-cache for debug
7a5a5eb
avoid recompiles
2eba447
fix fix
0bb8cb6
fix fix fix
bfac769
more fix
93c97c1
try encoder-decoder cache (too messy)
05f12a3
revert encoder-decoder cache
c1060df
check cross-attn cache
6ee17cc
use enc-dec dataclass
606417b
use richer enc-dec dataclass
e13b38e
clean-up
5a54a01
revert static cache changes
3daa6ad
small fixes
c244bcb
revert to cpu flag
e0588df
fix copies
5813aa3
Merge branch 'main' into whisper-static-kv
sanchit-gandhi b879c57
add static slow test
86a46ed
past k/v docstring
d209421
more docstrings
0cba828
cache_position docstrings
05e95dc
add to docs
e5c8393
add enc-dec cache to docs
959bae3
make style
832e0b9
fix after rebase
34d7873
fix beam
a321cd6
style
f825daf
fix generation strategies
e5c33dc
fix most decoder-only tests
216665a
style
11a2791
skip test
004e94d
more clean up
23b7c22
small docstrings
1a87b2b
Apply suggestions from code review
sanchit-gandhi d629233
add todo
8c0ce1a
only crop self-attn
0f8b34f
check cache in mixin
2d09a41
Merge remote-tracking branch 'origin/whisper-static-kv' into whisper-…
dba80a0
style
df31a15
fix re-compile after rebase
cadd3db
move `is_updated` logic to enc-dec wrapper
7842215
revert back
5fcfdea
Merge remote-tracking branch 'origin/whisper-static-kv' into whisper-…
79db195
revert cache back
6d3997f
finalise design
6a377d1
fix
0093919
fix fix
ff57b4c
style
2d4a2a8
Update src/transformers/cache_utils.py
sanchit-gandhi 1860c31
deprecate
d8e738f
Merge remote-tracking branch 'origin/whisper-static-kv' into whisper-…
24183cb
updates
2bad47c
final updates
89823f3
Merge branch 'main' into whisper-static-kv
sanchit-gandhi f0f8130
style
d8e8d64
Merge branch 'main' into whisper-static-kv
sanchit-gandhi e25c8e1
style
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.