liveBook · Manning

GPT-2

As explained in Causal AI

GPT-2 is an autoregressive transformer language model developed by OpenAI for generating and completing text.

GPT-2 is used as an autoregressive Transformer language model: it generates text sequentially from a prompt, or from an empty input when modeling a marginal distribution. section 13.3.2

A causal modeling workflow uses GPT-2 to:

  • Fine-tune pretrained language knowledge toward the distribution of a King’s action vignette. section 13.3.2

King’s action model

An empty input can produce a King’s action vignette such as a declaration of war; the generated sequence receives a model log probability before feeding downstream causal models.

How Causal AI covers it

How deep it goes
Descends from pretrained-model loading through tokenization, fine-tuning, generation, log probabilities, and Pyro integration.
Examples
Generates King’s action vignettes and supplies them to downstream Prince and Kingdom sequence-to-sequence models.
What you can do after
Build and sample a fine-tuned GPT-2 model with Hugging Face Transformers, then expose it as a Pyro distribution.
How it connects
Links GPT-2 with Transformer models, causal Markov kernels, BART, PyTorch, tokenization, log probabilities, and Pyro.

Also explained in

Compare how 6 books explain GPT-2 →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.