A hands-on tutorial that builds transformers from scratch and walks through pretraining, SFT and RLHF to chat.