Generative Pre-Trained Transformer (GPT)

Generative Pre-Trained Transformer (GPT)#

OpenAI’s GPT-series are Large Language Models

Let’s break down these terms in reverse order:

  • Language Models

  • Large

  • Transformer

  • Pre-Trained

  • Generative

Language Model

A Language Model (LM) is a model that assigns probabilities to sequences of words. Probabilities are estimated (the models are trained) using collections of naturally ocurring text, called a corpus. You can use a LM to select the most probable next word given a context of a preceding series of words.

_images/lm-hist.png

Fig. 1 Evolution of language models over time#

Large

We call a language model large when:

  • The model has billions of parameters (approaching a trillion in frontier models)

  • The model has been trained on billions or trillions of words/tokens

Why the focus on large language models (LLMs)? Because as scale increases new emergent capabilities have appeared, such as complex reasoning. Smaller language models gave no indication that this would happen.

_images/wikipedia-list.png

Fig. 2 LLM List#

Transformer

Transformers were the key innovation that allowed language models to get large. They are a deep learning architecture that allow massive parallelization of training and inference on GPUs

_images/The-Transformer-model-architecture.png
_images/attention-is-all-you-need.png

Fig. 3 Attention Paper Annotated Version#

Pre-trained

Pre-trained language models have been trained via self-supervision on vast quantities of text. In our current context of LLMs, these are also sometimes called foundation models. Pre-trained models can be used as is, or trained further, for exmaple with “fine-tuning” in order to improve performance on specific target domains.

Generative

Generative models are models that create content as output, in this case linguistic content. Vanilla pre-trained generative models do simple next word prediction (OpenAI calls these “GPT base”). They predict the most likely next word in a sequence. These can be useful for some tasks, such as speech recognition and predictive text completion. The assistant-style models we are more accustomed to using are models that have been further trained via supervised fine-tuning and reinforcement learning from human feedback (RLHF) to behave in a useful and safe manner, for example by responding to questions with answers like an assistant.