How is the score of a Bert model calculated?

Hi,

I’m using the text classification pipeline with a pre-trained Bert model. I noticed that aside from a binary prediction, the model also outputs a probability score between 0-1. I’m wondering: how is this score calculated?

Thank you in advance!