Tokenize the text:

encoded_zh = tokenizer(chinese_text, return_tensors="pt")

M2M100 forces the target language id as the first generated token to translate to the target language. Set the forced_bos_token_id to en in the generate method to translate to English: