Close

Shelf 13 · AI

Build a Large Language Model (From Scratch)

Sebastian Raschka

Builds a GPT-style language model in PyTorch, making each major component explicit. Follows the implementation through text preparation, attention, pretraining, and fine-tuning for classification and instruction following.

  1. 01LLM development stages
  2. 02Tokenization
  3. 03Training batches
  4. 04Token and positional embeddings
  5. 05Self-attention
  6. 06Causal and multi-head attention
  7. 07GPT architecture
  8. 08Pretraining and loss evaluation
  9. 09Text generation
  10. 10Loading pretrained weights
  11. 11Classification fine-tuning
  12. 12Instruction fine-tuning