How to generate text with T5Model other than T5ForConditionalGeneration?

Hello. For some reason, I can only use the class T5Model on a text generation task, so I can’t use function like model.generate(). How can I get text from model’s outputs?