Loading model

#1
by rjflynn2 - opened

How should this model be loaded via the transformers API? loading with automodel and flax=True or using flax wav2vec2 results in a weight mismatch

End-to-End Speech Benchmark org

Hey @rjflynn2 , you should be able to do:

from transformers import AutoProcessor, AutoModelForCTC

processor = AutoProcessor.from_pretrained("esb/wav2vec2-ctc-earnings22")
model = AutoModelForCTC.from_pretrained("esb/wav2vec2-ctc-earnings22", from_flax=True)

This leads to a shape mismatch when loading the model, and the weights aren't loaded properly i.e https://colab.research.google.com/drive/1NP_yCyBrVHEOTUrujKk_rxIocSCbsbIG?usp=sharing

Sign up or log in to comment