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

Error when loading tokenizer after fine-tuning #17

Open
jvel07 opened this issue Sep 16, 2022 · 5 comments
Open

Error when loading tokenizer after fine-tuning #17

jvel07 opened this issue Sep 16, 2022 · 5 comments

Comments

@jvel07
Copy link

jvel07 commented Sep 16, 2022

Hi, first of all, congrats on the repo, it;s really useful!
I followed the Emotion recognition in Greek speech using Wav2Vec2.ipynb notebook.
After finishing the training on my own data, I am getting the following error when trying to load the processor with

processor = Wav2Vec2Processor.from_pretrained(model_name_or_path)

The error:

OSError: Can't load tokenizer for '[/path/to/model/]checkpoint-860/'. If you were trying to load it from 'https://huggingface.co/models',
Otherwise, make sure '[/path/to/model/]checkpoint-860/' is the correct path to a directory containing all relevant files for a Wav2Vec2CTCTokenizer tokenizer.

Checking the checkpoint folder, there is no tokenizer file in there, am I missing something? This is the content of the mentioned folder:
image

PD: the model loads correctly with model = Wav2Vec2ForSpeechClassification.from_pretrained(model_name)

@jvel07 jvel07 changed the title Error when loading tokenizer after training is finished Error when loading tokenizer after fine-tuning is finished Sep 21, 2022
@jvel07 jvel07 changed the title Error when loading tokenizer after fine-tuning is finished Error when loading tokenizer after fine-tuning Sep 21, 2022
@Sneha335
Copy link

did you fix it. please share the fix. i am having the same issue

@jvel07
Copy link
Author

jvel07 commented Mar 23, 2023

Try with

feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(model_name)

@Sneha335
Copy link

It worked. thank you so much
the accuracy is very poor but the code works fine now.

@Sneha335
Copy link

is there any way to get the tokenizer_config.json file?

@Sneha335
Copy link

The accuracy is really good now by the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants