Run portion of model during inference

I am running inference on Distilbert finetuned on SST-2. I would like to run my input only on the last few classification layers of the model, replacing the output from the transformer. Is it possible to do this using the model from AutoModelForSequenceClassification.from_pretrained()?

Is it possible to use model.pre_classifier, model.classifier, model.dropout directly to run my input? Do these include both the layers and activations?

Any advice is appreciated!