"vscode:/vscode.git/clone" did not exist on "e69094df64fa5cf2d51b087a92e8b282f1e1a100"
Unverified Commit 3b84d86b authored by Matthijs Hollemans's avatar Matthijs Hollemans Committed by GitHub
Browse files

add missing alignment_heads to Whisper integration test (#24487)

add missing alignment heads
parent 868363ab
...@@ -1442,6 +1442,7 @@ class WhisperModelIntegrationTests(unittest.TestCase): ...@@ -1442,6 +1442,7 @@ class WhisperModelIntegrationTests(unittest.TestCase):
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny") processor = WhisperProcessor.from_pretrained("openai/whisper-tiny")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny") model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny")
model.to(torch_device) 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_speech = self._load_datasamples(4)
input_features = processor.feature_extractor(raw_speech=input_speech, return_tensors="pt").input_features.to( input_features = processor.feature_extractor(raw_speech=input_speech, return_tensors="pt").input_features.to(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment