{
  "id": "gpt2-xl",
  "name": "GPT-2 XL (1.5B)",
  "identifiers": {
    "huggingface": [
      "openai-community/gpt2-xl",
      "gpt2-xl"
    ]
  },
  "developer": "OpenAI",
  "release_date": {
    "value": "2019-11",
    "source": "https://openai.com/index/gpt-2-1-5b-release/",
    "status": "recorded"
  },
  "weights_status": "open",
  "availability": {
    "value": "available",
    "checked": "2026-09-24",
    "source": "https://huggingface.co/openai-community/gpt2-xl"
  },
  "license": {
    "value": "Modified MIT License",
    "source": "https://github.com/openai/gpt-2/blob/master/LICENSE",
    "status": "recorded"
  },
  "architecture": {
    "family": "decoder_only",
    "n_layers": {
      "value": 48,
      "source": "https://huggingface.co/openai-community/gpt2-xl/raw/main/config.json",
      "status": "recorded"
    },
    "hidden_size": {
      "value": 1600,
      "source": "https://huggingface.co/openai-community/gpt2-xl/raw/main/config.json",
      "status": "recorded"
    },
    "n_heads": {
      "value": 25,
      "source": "https://huggingface.co/openai-community/gpt2-xl/raw/main/config.json",
      "status": "recorded"
    },
    "vocab_size": {
      "value": 50257,
      "source": "https://huggingface.co/openai-community/gpt2-xl/raw/main/config.json",
      "status": "recorded"
    },
    "positional_encoding": {
      "value": "learned_absolute",
      "source": "https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf",
      "status": "recorded",
      "note": "GPT-2 paper says the model 'largely follows the details of the OpenAI GPT model'; it is the GPT-1 paper that states 'learned position embeddings'. Code: wpe table in modeling_gpt2.py."
    },
    "context_length": {
      "value": 1024,
      "source": "https://huggingface.co/openai-community/gpt2-xl/raw/main/config.json",
      "status": "recorded"
    },
    "normalization": {
      "value": "LayerNorm, pre-norm (at the input of each sub-block) plus a final LayerNorm",
      "source": "https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf",
      "status": "recorded"
    },
    "activation": {
      "value": "GELU (tanh approximation, config 'gelu_new')",
      "source": "https://huggingface.co/openai-community/gpt2-xl/raw/15ea56dee5df4983c59b2538573817e1667135e2/config.json",
      "status": "recorded",
      "note": "GELU choice stated in the GPT-1 paper, which GPT-2 follows."
    },
    "ffn_hidden_size": {
      "value": 6400,
      "source": "https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/gpt2/modeling_gpt2.py",
      "status": "recorded",
      "note": "Config n_inner is null; code defaults to 4 x hidden size."
    }
  },
  "training_data": {
    "value": "WebText: ~8M documents scraped from outbound links on Reddit posts with karma >= 3. Not publicly released as a dataset dump.",
    "source": "https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf",
    "status": "partial"
  },
  "techniques": [
    "transformer-decoder",
    "byte-pair-encoding"
  ],
  "primary_sources": [
    "https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf",
    "https://openai.com/research/better-language-models",
    "https://github.com/openai/gpt-2",
    "https://huggingface.co/openai-community/gpt2-xl"
  ],
  "record_history": [
    {
      "date": "2026-09-24",
      "change": "created from primary sources (paper, GitHub repo, HF config.json)",
      "by": "wilson-pruitt + claude"
    },
    {
      "date": "2026-09-24",
      "change": "positional-encoding source corrected to GPT-1 paper; normalization, activation, ffn width added (narrative/exercises/01-gpt2-xl-vs-mistral-7b.md)",
      "by": "wilson-pruitt + claude"
    },
    {
      "date": "2026-09-24",
      "change": "availability checked and recorded",
      "by": "wilson-pruitt + claude"
    }
  ]
}
