Skip to content
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

Add generic KV caching support, use it with Whisper #307

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

katalinic-gc
Copy link
Collaborator

@katalinic-gc katalinic-gc commented Apr 6, 2023

What does this PR do?

Intended usage for Whisper:

pipelined_model = pipelined_model.parallelize(
    for_generation=True, use_cache=use_cache, batch_size=batch_size, max_length=448, num_beams=num_beams
)
pipelined_model.generate(input_features, use_cache=use_cache, **kwargs)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 6, 2023

The documentation is not available anymore as the PR was closed or merged.

@katalinic-gc katalinic-gc marked this pull request as ready for review April 6, 2023 12:14
@katalinic-gc katalinic-gc force-pushed the whisper_kv_cache branch 5 times, most recently from e5ec8b8 to b349221 Compare April 12, 2023 11:14
Copy link
Contributor

@jimypbr jimypbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@jimypbr jimypbr merged commit 3f92baa into huggingface:main Apr 17, 2023
@jimypbr jimypbr deleted the whisper_kv_cache branch April 17, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants