It seems can't translate to Chinese

#8
by xiaozhizhang - opened

image.png

Hey!
The src_lang must to be in english, since you are trying to translate the sentence to your language.
change your tokenizer code to this one below:
---> MBart50TokenizerFast.from_pretrained("SnypzZz/Llama2-13b-Language-translate", src_lang="en_XX")
and when calling your model change to your target language, in your case, chinese. In my case, portuguese ;) :
--->(...) forced_bos_token_id=tokenizer_trans.lang_code_to_id["pt_XX"]

Hope i helped you,
Have a happy code!
Ingrid Cadu

xiaozhizhang changed discussion status to closed

Sign up or log in to comment