Stage 13AI1st EditionRead
Build a Large Language Model (From Scratch)
Demystifying modern LLMs line by line in PyTorch: BPE tokenization, causal self-attention, GPT blocks, pretraining loops, and instruction tuning.
- 113Byte-pair encoding (BPE) tokenization & embeddings
- 114Scaled dot-product & causal multi-head self-attention
- 115Transformer blocks: LayerNorm, GELU & residual streams
- 116Autoregressive pretraining, cross-entropy & weight loading
- 117Supervised fine-tuning for classification & instructions
- 118Preference alignment (DPO/RLHF) & LoRA adapters
