Glossary · The shape of a model
Transformer block
Also: decoder blocklayerdecoder-only transformer
Read it at the depth you need: one sentence · a paragraph · the math · in the models here
1In one sentence
The unit a language model repeats L times: an attention layer, then a feed-forward layer, each wrapped in a norm and a residual connection.
2In a paragraph
Every model on this site is a decoder-only transformer: a stack of identical blocks between an embedding table at the bottom and an output head at the top. Each token enters as a vector of d numbers (the hidden size) and keeps that width all the way up. In every block it first gathers information from earlier tokens (attention), then processes what it gathered on its own (the feed-forward network). "A 32-layer model" means 32 of these blocks.
3The math, shapes and parameters
With pre-norm (what almost every current model uses), one block computes:
h = x + Attention(Norm(x))
out = h + FFN(Norm(h))
The additions are residual connections: each sublayer adds a correction to the running vector rather than replacing it, which is what lets a hundred blocks train. Gemma 2 and 3 add a second norm after each sublayer (four per block); OLMo 2 puts its norms only after.
Nearly all of a model's parameters sit in the blocks: about 4d² (attention, with full heads) + 3d·f (a gated FFN) per block, so the total grows as L × d². The rest is the embedding and output head, V × d each, which only matter for small models.
4In the 96 models on this site
The largest model of each series: how many blocks, how wide, and the share of parameters inside the blocks.
| Model | Blocks (L) | Width (d) | Parameters | In the blocks |
|---|---|---|---|---|
| SmolLM3 3B | 36 | 2,048 | 3.08B | 91.5% |
| Llama 2 7B | 32 | 4,096 | 6.74B | 96.1% |
| Granite 3.3 8B | 40 | 4,096 | 8.17B | 97.5% |
| Falcon3 10B | 40 | 3,072 | 10.3B | 92.2% |
| Gemma 3 27B | 62 | 5,376 | 27B | 94.8% |
| Gemma 2 27B | 46 | 4,608 | 27.2B | 95.7% |
| Gemma 4 31B | 60 | 5,376 | 30.7B | 95.4% |
| OLMo 3 32B | 64 | 5,120 | 32.2B | 96.8% |
| OLMo 2 32B | 64 | 5,120 | 32.2B | 96.8% |
| Seed-OSS 36B | 64 | 5,120 | 36.2B | 95.6% |
| Phi-3.5 MoE | 32 | 4,096 | 41.9B | 99.4% |
| DeepSeek-R1-Distill-Llama-70B | 80 | 8,192 | 70.6B | 97.0% |
| Qwen2.5 72B | 80 | 8,192 | 72.7B | 96.6% |
| Qwen3-Next 80B-A3B | 48 | 2,048 | 79.7B | 99.2% |
| gpt-oss-120b | 36 | 2,880 | 117B | 99.0% |
| Mixtral 8x22B | 56 | 6,144 | 141B | 99.7% |
| MiniMax M2 | 62 | 3,072 | 229B | 99.5% |
| Qwen3 235B-A22B | 94 | 4,096 | 235B | 99.5% |
| GLM-4.5 | 92 | 5,120 | 353B | 99.6% |
| Qwen3.5 397B-A17B | 60 | 4,096 | 396B | 99.5% |
| Llama 4 Maverick (17B-128E) | 48 | 5,120 | 401B | 99.5% |
| Llama 3.1 405B | 126 | 16,384 | 406B | 99.0% |
| Nemotron 3 Ultra 550B-A55B | 108 | 8,192 | 549B | 99.6% |
| DeepSeek-V3.2 | 61 | 7,168 | 672B | 99.7% |
| GLM-5.2 | 78 | 6,144 | 743B | 99.7% |
| Inkling | 66 | 6,144 | 947B | 99.7% |
| Ling-1T | 80 | 8,192 | 1000B | 99.7% |
| Kimi K2 | 61 | 7,168 | 1.03T | 99.8% |
Introduced in Vaswani et al., “Attention Is All You Need” (2017).
Related
Self-attention · Feed-forward network (FFN) · RMSNorm · Embedding and output head · every term