from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("google/umt5-small")
tokenizer = AutoTokenizer.from_pretrained("google/umt5-small")
inputs = tokenizer(
     "A  walks into a bar and orders a  with  pinch of .",
     return_tensors="pt",
 )
outputs = model.generate(**inputs)
print(tokenizer.batch_decode(outputs))
['nyone who drink a alcohol A A. This I']

 
Refer to T5's documentation page for more tips, code examples and notebooks.