from transformers import T5ForConditionalGeneration model = T5ForConditionalGeneration.from_pretrained('t5-small') # or the relevant model model.save_pretrained('./t5_urdu_translation')