Get the Probability of a Sequence

Hi,

I wish to encode text to get an overall probability for the sequence as a single value. I suppose I would use a causal model, like GPT2? How would I obtain the probability?

Thanks