Jargonautica
How the Machinery Works

Transformer Block

The unit that repeats. One block is attention followed by a feed-forward network, each wrapped with normalisation and a skip connection. A model with eighty layers is this same small structure stacked eighty times. Understanding one block is most of understanding the architecture.

Technical view

In the pre-normalisation arrangement now standard, each sub-layer computes normalise, transform, then add to the residual stream. The residual stream carries information forward and each block reads from and writes to it, a framing that has proved productive for interpretability. Depth and width are traded against each other under a fixed parameter budget, with wide-and-shallow favouring inference latency and deep-and-narrow often favouring quality.


Part of AI Terminology Index, section: How the Machinery Works.

How it connects

Transformer Block links to 6 other terms. The faint lines are links between those terms. See it in the full graph.

AttentionAttentionTransformerTransformerMulti-head AttentionMulti-head AttentionFeed-forward NetworkFeed-forward NetworkResidual ConnectionResidual ConnectionLayer NormalisationLayer NormalisationTransformer Block