add missing alignment_heads to Whisper integration test (#24487)

add missing alignment heads
This commit is contained in:
Matthijs Hollemans 2023-06-26 11:50:10 +02:00 committed by GitHub
parent 868363abb9
commit 3b84d86b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(