T5 zero-shot classification pipeline
### Feature request

The current zero-shot classification pipeline support models like BERT and BART, but there does not seem to be any support for T5. 

I notice that the new [mT5-mnli from Alan Turing Institute](https://huggingface.co/alan-turing-institute/mt5-large-finetuned-mnli-xtreme-xnli) has code for extracting output probabilites and mapping this to the mnli entailment/contradiction, but they are not able to integrate it into the pipeline.

I am not sure what is exactly missing for this to be in place. What needs to be done in Transformers and how should the output from the model be adapted?

@patrickvonplaten 
@anton-l 

### Motivation

The medium/large T5 models has very impressive zero-shot abilities, and the combination of finetuning on NLI-tasks ([Yin et.al](https://arxiv.org/abs/1909.00161)) and the classification pipeline is a great way to use NLP for easy classification tasks. 

### Your contribution

My contribution will depend on what needs to be done. I am finetuning several models on MNLI, and can in any case contribute active in testing.
Hi @peregilk 

T5 is not supported in zero-shot classification pipeline because it does not have a sequence classification head. With T5 the seq classification problem is formulated as text-to-text generation problem which is not possible to support in this zero-shot pipeline. <|||||>@patil-suraj 
Thanks for the answer!

Just because I am trying to get a better understanding of this: Is there a fundamental difference between the output probabilities from a seq classification head and the output probabilites generated by the code at the bottom of this page: https://huggingface.co/alan-turing-institute/mt5-large-finetuned-mnli-xtreme-xnli ? Or is this simply related to the way the pipelines are made?<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.<|||||>> Hi @peregilk
> 
> T5 is not supported in zero-shot classification pipeline because it does not have a sequence classification head. With T5 the seq classification problem is formulated as text-to-text generation problem which is not possible to support in this zero-shot pipeline.

Hi, thank you for the answer. I am interested in using t5 for classification. Are there any examples on fine-tuning? How should we interpret class tokens in the decoder output? If there's documentation on token IDs for each classification task it would be very helpful.