question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using pretrained models

See original GitHub issue

I downloaded the files on HuggingFace here https://huggingface.co/speechbrain/asr-wav2vec2-commonvoice-fr. However, when I try to load the model with EncoderASR.from_hparams(), I have the error

OSError: Can't load feature extractor for 'LeBenchmark/wav2vec2-FR-7K-large'. Make sure that:

- 'LeBenchmark/wav2vec2-FR-7K-large' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'LeBenchmark/wav2vec2-FR-7K-large' is the correct path to a directory containing a preprocessor_config.json file

My question is then, where can I define the path to the LeBenchmark/wav2vec2-FR-7K-large model ? I saw in the hyperparams.yaml file a reference to it, but apparently it is the URL on the HuggingFace Hub. How to make it run locally i.e. with not internet connection ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
gandrozcommented, Sep 17, 2021

It is still a bit awkward to specify the model path in the method call AND in the hyperparams.yaml file…

If I write

model_path = Path("C:/", "Users", "ang004", "src", "stt", "model", "speechbrain-asr-wav2vec2-commonvoice-fr")
asr_model = EncoderASR.from_hparams(source=model_path, savedir=model_path)

I got the error mentionned above, but if I also specify

wav2vec2_hub:  C:\Users\ang004\src\stt\model\speechbrain-asr-wav2vec2-commonvoice-fr

it works. It is really confusing to specify the model path in the from_hparams method and see the behavior changed by the yaml file.

1reaction
TParcolletcommented, Sep 17, 2021

Yep.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transfer Learning | Pretrained Models in Deep Learning
Train some layers while freeze others – Another way to use a pre-trained model is to train is partially. What we can do...
Read more >
Transfer learning from pre-trained models | by Pedro Marcelino
A pre-trained model is a model that was trained on a large benchmark dataset to solve a problem similar to the one that...
Read more >
Transfer learning and fine-tuning | TensorFlow Core
A pre-trained model is a saved network that was previously trained on a large dataset, typically on a large-scale image-classification task. You either...
Read more >
How to use a pre-trained deep learning model - Educative.io
Points to consider before moving on to the implementation · Import the required libraries · Load the model · Load the image ·...
Read more >
Using pretrained models - Hugging Face Course
When using a pretrained model, make sure to check how it was trained, on which datasets, its limits, and its biases. All of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found