Load a speechbrain-fine-tuned huggingface model checkpoint with the huggingface interface #2375
Replies: 1 comment
-
This can be used as a discussion. I thought a bit more about this issue. I am not sure that this feature is 100% aligned with SpeechBrain methodology as the Pretrainer is what SpeechBrain expects to be used to load a pre-trained model. The HuggingFace interface is an outlier just because they provide their own loading mechanism AND they are being massively used. Bypassing the PreTrainer for a ckpt originating from a 100% speechbrain fine-tuning goer against the logic of using the pretrainer to load a model. But it's also counter-intuitive to not simply give the path of the new fine-tuned model to the HuggingFace interface.... @mravanelli @Adel-Moumen @Gastron what do you think? |
Beta Was this translation helpful? Give feedback.
-
🚀 The feature
Currently, to achieve point (2), a
Pretrainer
object is necessary.HuggingFaceWav2Vec2
object.It would be nice if the
HuggingFaceWav2Vec2
object could be used to load the fine-tuned model as well.Solution outline
To achieve this, a Pretrainer object is necessary (example below using a wav2vec2 model):
Along with it usage in the python recipe file once the brain (
asr_brain
here) has been instanciated.Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions