A transformer language model built from scratch: attention mechanisms, model architecture, and text data handling implemented module by module.