How GPT models work
During training, the model is exposed to a lot of text, and acquires the ability to predict good probability distributions, given a sequence of input tokens. That’s because the model doesn’t actually produce a single predicted token; instead it returns a probability distribution over all the possible tokens.