From 32cf573380be433f1930d4119997a4f6a20bdad1 Mon Sep 17 00:00:00 2001 From: Joshua Lochner Date: Fri, 8 Sep 2023 23:14:51 +0200 Subject: [PATCH] Re-enable other whisper tests --- scripts/supported_models.py | 13 +++++-------- tests/generate_tests.py | 6 ++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/supported_models.py b/scripts/supported_models.py index 21ef5349a..b24637e31 100644 --- a/scripts/supported_models.py +++ b/scripts/supported_models.py @@ -439,14 +439,11 @@ 'openai/whisper-medium.en', 'openai/whisper-large', 'openai/whisper-large-v2', - - # TODO: add these models - # https://github.com/huggingface/transformers/issues/26043 - # 'NbAiLab/nb-whisper-tiny-beta', - # 'NbAiLab/nb-whisper-base-beta', - # 'NbAiLab/nb-whisper-small-beta', - # 'NbAiLab/nb-whisper-medium-beta', - # 'NbAiLab/nb-whisper-large-beta', + 'NbAiLab/nb-whisper-tiny-beta', + 'NbAiLab/nb-whisper-base-beta', + 'NbAiLab/nb-whisper-small-beta', + 'NbAiLab/nb-whisper-medium-beta', + 'NbAiLab/nb-whisper-large-beta', ], 'xlm': [ 'xlm-clm-ende-1024', diff --git a/tests/generate_tests.py b/tests/generate_tests.py index 54fc743ef..37fd5e43b 100644 --- a/tests/generate_tests.py +++ b/tests/generate_tests.py @@ -128,6 +128,12 @@ def generate_tokenizer_tests(): # means the model does not use a tokenizer (e.g., vision models) continue + try: + # Disable dropout, if the model allows it + tokenizer.backend_tokenizer.model.dropout = 0 + except AttributeError: + pass + tokenizer_results = [] shared_texts = TOKENIZER_TEST_DATA["shared"]