How language models predict text, learn from data, and run on hardware, with diagrams and references.