Understanding GPT and Transformer Models