From 3b84d86b572543e541fc692034f7941af2de58a9 Mon Sep 17 00:00:00 2001 From: Matthijs Hollemans Date: Mon, 26 Jun 2023 11:50:10 +0200 Subject: [PATCH] add missing alignment_heads to Whisper integration test (#24487) add missing alignment heads --- tests/models/whisper/test_modeling_whisper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/models/whisper/test_modeling_whisper.py b/tests/models/whisper/test_modeling_whisper.py index 07fd5dc2ba..b16587fd66 100644 --- a/tests/models/whisper/test_modeling_whisper.py +++ b/tests/models/whisper/test_modeling_whisper.py @@ -1442,6 +1442,7 @@ class WhisperModelIntegrationTests(unittest.TestCase): processor = WhisperProcessor.from_pretrained("openai/whisper-tiny") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny") model.to(torch_device) + model.generation_config.alignment_heads = [[2, 2], [3, 0], [3, 2], [3, 3], [3, 4], [3, 5]] input_speech = self._load_datasamples(4) input_features = processor.feature_extractor(raw_speech=input_speech, return_tensors="pt").input_features.to(