Engineering shelf
Build a Large Language Model (From Scratch), Sebastian Raschka. Stage 13 · LLMs from Scratch.
Engineering shelf
Stage 13 · LLMs from Scratch
Build a Large Language Model (From Scratch)
Build a GPT yourself: tokenizer, attention, training, finetuning.
- 104Tokenization & byte pair encoding
- 105Token embeddings & word positions
- 106Data sampling with a sliding window
- 107Self-attention
- 108Causal attention
- 109Multi-head attention
- 110LayerNorm, GELU & shortcut connections
- 111The transformer block
- 112Coding the GPT model
- 113Decoding: temperature & top-k
- 114Training loop: autograd & AdamW
- 115Pretraining & cross-entropy loss
- 116Loading pretrained weights
- 117Finetuning for classification
- 118Finetuning to follow instructions