Dive into Deep Learning · §11
Transformers: From One Block to Frontier Architectures
residual stream · pre-norm & SwiGLU · GPT · KV cache & roofline · encoders & ViT · scaling laws · Mixture of Experts
Motivation
Architectural Roadmap
RMSNorm, QK-Norm, 1/\sqrt{2L} scaling, SwiGLU, and decoder-only GPT pretraining.Running Examples
The Modern Recipe
RMSNorm, RoPE, SwiGLU, GQA/MLA, MoE).RMSNorm, QK-Norm, and SwiGLU prevent token collapse and keep gradients well-behaved across depth.