Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While running pretrained German model: AttributeError: Can't get attribute 'Trie' on <module 'transformers.tokenization_utils' #10

Open
alihashaam opened this issue Aug 30, 2022 · 2 comments

Comments

@alihashaam
Copy link

I am trying to use pretrained German model:

https://alphacephei.com/vosk/models/vosk-recasepunc-de-0.21.zip

and as mentioned in readme file, I run:

python example.py de-test.txt

but I keep getting following error:

AttributeError: Can't get attribute 'Trie' on <module 'transformers.tokenization_utils' from '/home/ali/ali_initos_work/internal/data_science/speech_to_text/vosk/vosk_env/lib/python3.7/site-packages/transformers/tokenization_utils.py'>

Any idea if the model itself is wrong?

@benob
Copy link
Owner

benob commented Aug 30, 2022

This typically happens when you have a different version of transformers installed compared to the one the model was trained with. I don't know about vosk, but the models provided on this github are trained with the version specified in requirements.txt

@szeidner
Copy link

I had to use transformers==4.22.1 to use the German model from Vosk and transformers==4.10.0 to use the French model from this github repo. Is there a list somewhere of all the trained models using the same transformers version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants