⚙️ In practice
A GPT model is based on the Transformer architecture, which uses attention mechanisms to analyze relationships between all words in a sentence simultaneously, rather than reading them in order. During the pre-training phase, the model learns to guess the following word on massive volumes of text. In practice, when you use it, it generates text in a self-regressive way, that is, it reinjects each word generated in its calculation to produce the following word.