HI @sru
model = XLNetForSequenceClassification.from_pretrained(‘xlnet-base-cased’)
this line instantiates xlnet for classification task by loading the pre-trained xlnet-base-cased language model and adds a classification head (linear layer) on top of it.
Note that, it’s not trained for classification, the classification head is randomly initialised. You should fine-tune it on your dataset for classification.