Transformer block
Also written: block
The repeating unit of a transformer: attention (tokens exchange information) then an MLP (each token alone), each preceded by layer norm and added back through a residual connection. The block keeps the vector shape, so blocks stack.
Where the book teaches it
Related terms
TransformerMLP (multilayer perceptron)Residual connectionPre-norm