“sentiment-analysis” is the task specifying what you want a large language model to perform on the text. Sentiment analysis practically changes the model’s head to a classifier, which you can see here:
This pipeline is pre-configured, the settings can be found below in the same file defined here: