I followed Sanchit Gandhi’s tutorial (Fine-Tune Whisper For Multilingual ASR with 🤗 Transformers) and trained my own model and pushed to the HF hub (happy dance). But I am having trouble loading it from the hub:
huggingface_hub.login(token=token)
MODEL="Pardner/whisper-small-fa"
processor = WhisperProcessor.from_pretrained(MODEL)
and I get the following error
processor = WhisperProcessor.from_pretrained(MODEL)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/whisper/.venv/lib/python3.11/site-packages/transformers/processing_utils.py", line 465, in from_pretrained
args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/whisper/.venv/lib/python3.11/site-packages/transformers/processing_utils.py", line 511, in _get_arguments_from_pretrained
args.append(attribute_class.from_pretrained(pretrained_model_name_or_path, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/whisper/.venv/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 2032, in from_pretrained
raise EnvironmentError(
OSError: Can't load tokenizer for 'Pardner/whisper-small-fa'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'Pardner/whisper-small-fa' is the correct path to a directory containing all relevant files for a WhisperTokenizer tokenizer.
I get identical errors when I try to load the processor & model with “processor = AutoProcessor.from_pretrained()”.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/whisper/.venv/lib/python3.11/site-packages/transformers/models/auto/processing_auto.py", line 312, in from_pretrained return processor_class.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/whisper/.venv/lib/python3.11/site-packages/transformers/processing_utils.py", line 465, in from_pretrained
args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/whisper/.venv/lib/python3.11/site-packages/transformers/processing_utils.py", line 511, in _get_arguments_from_pretrained
args.append(attribute_class.from_pretrained(pretrained_model_name_or_path, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/whisper/.venv/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 2032, in from_pretrained
raise EnvironmentError(
OSError: Can't load tokenizer for 'steja/whisper-large-persian'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'steja/whisper-large-persian' is the correct path to a directory containing all relevant files for a WhisperTokenizer tokenizer.
I tried moving my trained model into my local ~/.cache/huggingface/hub directory and got the same error.
I have tried one other community model (steja/whisper-small-persian) and I get the same results.
Any help would be great.
~Pardner