Get logits with generation method

I want to stack additional layers to pretrained T5 model, so they could use T5 output logits. But as I see bound method GeerationMixin? which provade method generate, returns only predicted tokens.
Can I somehow get logits using generation method? Maybe there are more convinients method to stack layers? Or maybe I can somehow change generation method? so i can return logits?

Now the constructed model with forward method looks like this: