T5ForSequenceClassification adapts the original
T5 architecture for sequence classification tasks.
T5 was originally built for text-to-text tasks and excels in it.
It can handle any NLP task if it has been converted to a text-to-text format, including sequence classification task!
You can find
here how the original T5 is used for sequence classification task.
Since the
T5ForClassification class is currently not supported by the transformers library, you cannot direclty use this model on the Hub.
To use
T5ForSequenceClassification, you will have to install additional packages and model weights.
You can find instructions
here.
Models based on the
BERT architecture like
RoBERTa and
DeBERTa have shown very strong performance on sequence classification task and are still widely used today.
However, those models only scale up to ~1.5B parameters (DeBERTa xxlarge) resulting in a limited knowledge compare to bigger models.
On the other hand, models based on the T5 architecture scale up to ~11B parameters (t5-xxl) and innovations with this architecture are very recent and keeps improving (
mT5,
Flan-T5,
UL2,
Flan-UL2, and probably more...)