Downloads · 30 days
0
HfSpeechUtils/convert_wav2vec2_to_hf
convert_wav2vec2_to_hf is a machine learning model from HfSpeechUtils. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repo has two scripts that can show how to convert a fairseq checkpoint to HF Transformers.
Downloads · 30 days
0
Access
Public
Updated Dec 20, 2021
Repo size
—
Likes
7
Public
Click a slice to open those files.
.py5.7 KB · 67%
From the Hugging Face model README
This repo has two scripts that can show how to convert a fairseq checkpoint to HF Transformers.
It's important to always check in a forward pass that the two checkpoints are the same. The procedure should be as follows:
huggingface-cli repo create <name_of_model> --organization <org_of_model>
git clone https://huggingface.co/<org_of_model>/<name_of_model>
./run_convert.sh <name_of_model> <path/to/orig/checkpoint/> 0
The "0" means that checkpoint is not a fine-tuned one. 4. Verify that models are equal:
./run_forward.py <name_of_model> <path/to/orig/checkpoint/> 0
Check the scripts to better understand how they work or contact https://huggingface.co/patrickvonplaten