What is layer normalisation?
Rescaling each token's vector to mean 0 and variance 1, followed by a learned scale and shift. It keeps values in a steady range in deep networks.
Where it is taught
The transformer block. Attention moves information between tokens. Add an MLP, two normalisations and two shortcut connections, and you have the unit that a GPT repeats again and again.
What the lesson leaves you with
- A block is attention then an MLP, each wrapped in a residual connection with layer normalisation.
- Residual connections give gradients a direct path, so very deep stacks can be trained.
- Size is set by the dimension, the number of blocks and the number of heads. The design does not change.
Questions
- What is layer normalisation?
- Rescaling each token's vector to mean 0 and variance 1, followed by a learned scale and shift. It keeps values in a steady range in deep networks.
- Where is layer normalisation used in AI?
- Attention moves information between tokens. Add an MLP, two normalisations and two shortcut connections, and you have the unit that a GPT repeats again and again.
- What is the key idea to remember about layer normalisation?
- A block is attention then an MLP, each wrapped in a residual connection with layer normalisation.
- Where can I learn layer normalisation step by step?
- In the lesson “The transformer block” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.