from transformers import T5ForConditionalGeneration model = T5ForConditionalGeneration.from_pretrained('.', from_flax=True) model.save_pretrained('pytorch_model')