transformers/tests/models/whisper
Ondřej Cífka be3aa43e5f
Support mixed-language batches in `WhisperGenerationMixin` (#29688)
* Add support for mixing languages in a single batch

* Update docstring

* Enable different detected languages in batch

* Do not require input_features

* Test list of languages

* Fix comment

* Make init_tokens length-1 if possible, broadcast at the end

* Test for ValueError with language list of incorrect length

* Slow test for batched multilingual transcription

* fixup

* Apply suggestions from code review

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* Address review, refactor

* Second attempt to move this line where it was originally

* Split test, fix a bug

---------

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
2024-05-15 09:53:17 +02:00
..
__init__.py Add WhisperModel to transformers (#19166) 2022-10-05 22:28:31 +02:00
test_feature_extraction_whisper.py [Feature Extractors] Fix kwargs to pre-trained (#30260) 2024-04-19 11:16:08 +01:00
test_modeling_flax_whisper.py [`Styling`] stylify using ruff (#27144) 2023-11-16 17:43:19 +01:00
test_modeling_tf_whisper.py More TF fixes (#28081) 2023-12-18 15:26:03 +00:00
test_modeling_whisper.py Support mixed-language batches in `WhisperGenerationMixin` (#29688) 2024-05-15 09:53:17 +02:00
test_processor_whisper.py feat: Whisper prompting (#22496) 2023-05-19 09:33:11 +01:00
test_tokenization_whisper.py Adds pretrained IDs directly in the tests (#29534) 2024-03-13 14:53:27 +01:00