[Whisper] Add SpecAugment (#21298)

* Return and rescale attention_mask

* Add SpecAugment to Whisper modeling

* Fix test

* Update docstring

* Add SpecAug related parameters to model config

* Add the _mask_input_features function to doc

* Fix quality

* Apply suggestions from code review

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Remove dev comments

* Add test

* Resolve conflict

* feat: mask {feature, time} prob fast tests

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

---------

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: sanchit-gandhi <sanchit@huggingface.co>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
bofeng huang
2023-02-24 11:07:52 +01:00
committed by GitHub
parent 75bd49ff88
commit c8545d2a9c
5 changed files with 293 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ The original code can be found [here](https://github.com/openai/whisper).
[[autodoc]] WhisperModel
- forward
- _mask_input_features
## WhisperForConditionalGeneration