GPT-3 175B
OpenAI · GPT-3 · closed weights
- MHA
- Learned absolute
- Pre-norm
Facts and where they come from
| Released | 2020-05 | paperpaperarXiv v1, May 2020 |
|---|---|---|
| Licence | proprietary | labpaperweights not published |
| Total parameters | 175B | paperpaperTable 2.1: GPT-3 175B, 175.0B parameters |
| Active parameters | not disclosed | not disclosed |
| Context length | 2K tokens | paperpaper§2.1: context window n_ctx = 2048 |
| Norm placement | pre | codemodelling codetransformers 5.18.0 gpt2: ln_1 before attention, ln_2 before the MLP |
| Norm type | LayerNorm | codemodelling codetransformers 5.18.0 gpt2: ln_1 before attention, ln_2 before the MLP |
| QK-norm | no | codemodelling codeno q/k normalisation in the attention block |
| Positional encoding | learned absolute | paperpaper§2.1: same architecture as GPT-2 (learned positions) |
| Parallel attention and MLP | no | codemodelling codetransformers 5.18.0 gpt2: ln_1 before attention, ln_2 before the MLP |
Architecture, drawn from the data
MHA 96q/96kv. Each column is one layer: its token mixer above, its feed-forward block below. Paler columns reuse another layer’s keys and values.
Modelled costs
From the cost model, batch size 1. Totals the lab states are in the table above; differences come from rounding, from what a lab counts, or from parts the model does not describe (listed on the about page).
| Parameters (modelled) | 175B |
|---|---|
| Active per token (modelled) | 175B |
| Without embeddings and output head | 174B total, 174B active |
| KV cache per token, BF16 (layers that grow with context) | 4.5 MiB |
| KV cache + state at 2K tokens, BF16 | 9 GiB |
| Decode FLOPs per token at 4K context | 368 GFLOP |
| Prefill FLOPs for a 4K prompt | 1.46 PFLOP |
KV cache against context
Every architecture field
| Field | Value | Source |
|---|---|---|
| d_model | 12,288 | paperpaperTable 2.1: d_model 12288 |
| vocab | 50,257 | paperpaper§2.1: same model and architecture as GPT-2; GPT-2 BPE vocabulary of 50,257 (openai-community/gpt2-xl config) |
| tied_embeddings | true | codemodelling codetransformers 5.18.0 gpt2: lm_head tied to wte |
| mixers.full.type | attn | codemodelling codeattention block |
| mixers.full.heads | 96 | paperpaperTable 2.1: n_heads 96 (d_head 128) |
| mixers.full.kv_heads | 96 | paperpaperTable 2.1: n_heads 96 (d_head 128) |
| mixers.full.head_dim | 128 | codemodelling codetransformers 5.18.0: head_dim = hidden_size / n_head |
| mixers.full.bias | true | codemodelling codec_attn/c_proj have biases |
| ffns.dense.type | dense | codemodelling codeMLP |
| ffns.dense.d_ff | 49,152 | codemodelling codetransformers 5.18.0 gpt2: n_inner defaults to 4 * n_embd |
| ffns.dense.gated | false | codemodelling codeGELU MLP, two matrices |
| ffns.dense.bias | true | codemodelling codeMLP biases |
| layout | 96× full/dense | paperpaperTable 2.1: n_layers 96 |
| extra_embedding_params | 25,165,824 | codemodelling codelearned position embeddings: n_positions x n_embd |
Sources
- paper · Language Models are Few-Shot Learners
- modelling code · transformers 5.18.0 modelling code, or the model repository's own modelling file at the pinned revision