AI & ML
Transformers
Part of Deep Learning, level 4. About 13 hours of study across the topics below.
1Representations
- Token RepresentationWhat a token vector carries into the stack: identity, and everything added later. 1–2 h
- Position InformationOrder without recurrence: how position encodings tell the stack where tokens sit. 1–2 h
- Positional Encoding Schemes and RoPEAbsolute, learned, relative, and rotary encodings: how position enters attention scores. 1–2 h
2Blocks
- The Attention BlockAttention plus the plumbing around it: residual stream, norms, and sublayer order. 1–2 h
- The Feed-Forward BlockA per-position MLP inside every block: capacity and memory roles. 1–2 h
- Residual Pathways and NormalizationGradient highways through deep stacks: skips and norms as stability engineering. 1–2 h
- Modern Transformer Block DesignThe design choices that became standard: pre-norm, RMSNorm, gated feed-forward units, and grouped-query attention. 1–2 h
- Mixture-of-Experts LayersRouting each token to a few expert feed-forward networks: more parameters without more compute per token. 1–2 h
3Architectures
- Encoder and Decoder ConceptsBidirectional readers vs causal writers: the two stack roles and their masks. 1–2 h
- The Causal TransformerThe full autoregressive stack: blocks, masks, and information flow end to end. 1–2 h
- Reading a TransformerOne token's journey, end to end: the synthesis walk through the whole stack. 1–2 h
- Encoder-Decoder TransformersThe original transformer layout: an encoder stack read by a decoder through cross-attention, as in T5. 1–2 h
- Encoder-Only Models and Masked Language ModelingBERT-style bidirectional pretraining: predict masked tokens, then reuse the representations. 1–2 h
