The model’s repeating unit: attention mixes information between tokens, an MLP transforms each token, with norms and residuals holding it together.
Introduced inJun 2017Attention Is All You Need
Nearly every modern model is a stack of identical blocks like this one. Each block first lets tokens exchange information through some variant of attention, then transforms every token independently through a (usually gated) MLP, with a normalization layer before each part and residual connections around them. Expand the block in the graph to see the exact wiring this model uses inside.
Share of new models that have included transformer blocks over time.
Open any of these on hfviewer to find this block in the interactive architecture graph.
Browse all 1641 models with this in the catalog →
hfviewer renders the full architecture of 3,500+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.
Browse all model graphs →