I don’t have a complete answer for you, but don’t worry about the pipeline itself as its just a wrapper for the model. I assume this code is designed for BertModel, so the hardest thing you’ll probably need to do is adapt it for BartModel or BartForSequenceClassification.