Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load openai/whisper-tiny #35995

Open
2 of 4 tasks
pprobst opened this issue Jan 31, 2025 · 0 comments
Open
2 of 4 tasks

Unable to load openai/whisper-tiny #35995

pprobst opened this issue Jan 31, 2025 · 0 comments
Labels

Comments

@pprobst
Copy link

pprobst commented Jan 31, 2025

System Info

Python 3.11.8
huggingface-hub==0.28.1
transformers==4.48.2

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Merely run:
WhisperProcessor.from_pretrained("openai/whisper-tiny")

Error is:

  File "/home/probst/Projects/whisper-iara/finetune.py", line 101, in __init__
    self.processor = WhisperProcessor.from_pretrained(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/probst/Projects/whisper-iara/.venv/lib/python3.11/site-packages/transformers/processing_utils.py", line 974, in from_pretrained
    args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/probst/Projects/whisper-iara/.venv/lib/python3.11/site-packages/transformers/processing_utils.py", line 1020, in _get_arguments_from_pretrained
    args.append(attribute_class.from_pretrained(pretrained_model_name_or_path, **kwargs))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/probst/Projects/whisper-iara/.venv/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1925, in from_pretrained
    raise ValueError(
ValueError: Calling WhisperTokenizer.from_pretrained() with the path to a single file or url is not supported for this tokenizer. Use a model identifier or the path to a directory instead.

The code above works for whisper-tiny.en, whisper-base, whisper-small and so on, but not for whisper-tiny.

The workaround for now is to manually git clone the repository and specify the local path to it.

Expected behavior

I should be able to load the model without any errors.

@pprobst pprobst added the bug label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant