Add gradient checkpointing to Whisper Flax - #22954
Merged
sgugger merged 2 commits intoApr 26, 2023
Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
5 tasks
versae
marked this pull request as ready for review
April 24, 2023 10:59
sanchit-gandhi
approved these changes
Apr 25, 2023
sanchit-gandhi
left a comment
Contributor
There was a problem hiding this comment.
Very nice @versae! Just a few minor nits, but otherwise this PR is looking good!
| init_cache=init_cache, | ||
| output_attentions=output_attentions, | ||
| deterministic=deterministic, | ||
| attention_mask, |
Contributor
There was a problem hiding this comment.
Note to reviewer: remat does not support key-word arguments, hence the need to change to pure arguments
Contributor
Author
|
Thanks for the review, @sanchit-gandhi! Should be all good now 😃. |
Contributor
|
Amazing @versae! Requesting final review before we can get this merged 🤗 |
sgugger
approved these changes
Apr 26, 2023
sgugger
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for your contribution!
Contributor
Author
|
Thank you! I learnt a lot 🤓 |
gojiteji
pushed a commit
to gojiteji/transformers
that referenced
this pull request
Jun 5, 2023
* Add gradient checkpointing to Whisper Flax * self.gradient_checkpointing only needed in nn.Module, removing unnecessary comments
novice03
pushed a commit
to novice03/transformers
that referenced
this pull request
Jun 23, 2023
* Add gradient checkpointing to Whisper Flax * self.gradient_checkpointing only needed in nn.Module, removing unnecessary comments
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It uses
flax.linen.rematand follows on PRs #13657 and #17994.What does this PR do?
Adds gradient_checkpointing to Flax Whisper models.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@sanchit-gandhi @peregilk