ImportError: cannot import name 'SeamlessM4TModel' from 'transformers'

#13
by Neman - opened

What version of transformers have support for SeamlessM4TModel?
I have latest dev version: 4.35.0.dev0
and get import error on 'from transformers import AutoProcessor, SeamlessM4TModel':
ImportError: cannot import name 'SeamlessM4TModel' from 'transformers'

You can install from main here:
pip install --quiet git+https://github.com/huggingface/transformers sentencepiece

Let me know if you still face the same issue!

Thank you. It was my mistake. I did install the correct transformers versions yesterday, but have not restarted VSCode until now. Today it just worked and I realized why :)

I have other thing to report. In Model card example, the output string is taken only from first token (translated_text_from_text = processor.decode(output_tokens[0].tolist()[0], skip_special_tokens=True)), not the whole list. Maybe change it into: translated_text_from_text = processor.decode(output_tokens[0].tolist(), skip_special_tokens=True)

Oh many thanks for the model card correction, I'll make a quick correction ! ;)

ylacombe changed discussion status to closed

Sign up or log in to comment