Can I use "AutoModel For Sequence Classification" class for generative models?

I want to use AutoModelForSequenceClassification with a llama 7b model
How will the input flow in the model if I load the model with this class ?

Yes it works, I used a GPT2-XL to do NLU tasks.
But it also depends on the weights you use whether it has a class called transformers.XXXForSequenceClassification, where XXX is the model class/ name.
Such as here: