yizhilll / MERT

Official implementation of the paper "Acoustic Music Understanding Model with Large-Scale Self-supervised Training".
Apache License 2.0
301 stars 18 forks source link

How to convert a fairseq checkpoint to a huggingface checkpoint #14

Closed z592694590 closed 6 months ago

z592694590 commented 6 months ago

Hi, thanks for this great job. I have trained a mert model by your repo. But I can't use the fairseq checkpoint to infer. Could you provide some help?I see the demo of infer is based on huggingface. How can I convert a fairseq checkpoint to a huggingface checkpoint.

yizhilll commented 6 months ago

Hi, I've uploaded scripts for conversion. Please check with the scripts:

bash scripts/convert_HF_script.sh default mert config_mert_base [/absolute/path/to/a/fairseq/checkpoint.pt]