Hello
You need to set from_pt = True when loading.
from transformers import TFAutoModelForSeq2SeqLM
model_checkpoint = "Helsinki-NLP/opus-mt-en-fr"
model = TFAutoModelForSeq2SeqLM.from_pretrained(model_checkpoint, from_pt = True)
Downloading: 100%
1.26k/1.26k [00:00<00:00, 34.4kB/s]
Downloading: 100%
287M/287M [00:07<00:00, 37.4MB/s]
All PyTorch model weights were used when initializing TFMarianMTModel. All the weights of TFMarianMTModel were initialized from the PyTorch model. If your task is similar to the task the model of the checkpoint was trained on, you can already use TFMarianMTModel for predictions without further training.