I’m trying to load the pretrained NLLB-200 model but i keep getting an error. My version of transformers is 4.18.0
. Im using the code below
from transformers import NllbTokenizerFast
model_checkpoint = "facebook/nllb-200-distilled-600M"
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint, use_auth_token=True)
tokenizer = NllbTokenizerFast.from_pretrained(model_checkpoint, use_auth_token=True, src_lang="bam_Latn", tgt_lang="fra_Latn")
I dont know why its doing but i’m getting an import error, btw i am running on aws cluster
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-f1170a89efa6> in <module>
----> 1 from transformers import NllbTokenizerFast
2 model_checkpoint = "facebook/nllb-200-distilled-600M"
3 model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
4 tokenizer = NllbTokenizerFast.from_pretrained(model_checkpoint, use_auth_token=True, src_lang="bam_Latn", tgt_lang="fra_Latn")
5 # tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, use_auth_token=True, src_lang="bam_Latn")
ImportError: cannot import name 'NllbTokenizerFast'