GPT and Transformer Basics
- 34Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What does the acronym GPT stand for?
Generative Pretrained Transformer
Or swipe the card
34 cards
What does the acronym GPT stand for?
Generative Pretrained Transformer
What does 'Generative' refer to in GPT?
The model generates new text.
What does 'Pretrained' mean in GPT?
The model learned from a massive amount of data and can be fine-tuned on specific tasks.
What is a transformer in the context of AI?
A specific kind of neural network architecture that is the core invention behind modern AI advances.
What was the original use case of the transformer introduced by Google in 2017?
Translating text from one language into another.
Name three types of models built using transformers.
Text-to-speech (audio generation), image generation (DALL-E, Midjourney), and text prediction (ChatGPT).
How does a transformer model like ChatGPT generate text?
It predicts the next token given a context, repeatedly sampling from the probability distribution and appending the sampled token.
What is a token in a transformer model?
A token is a piece of text, such as a word, subword, or punctuation character, that the model processes.
What does the embedding matrix do?
It maps each token to a vector (list of numbers) that encodes its meaning.
What is the embedding dimension in GPT-3?
12,288 dimensions.
How are word vectors related in terms of meaning?
Words with similar meanings have vectors that are close to each other in the high-dimensional space.
Give an example of a semantic direction in word embeddings.
The difference between 'woman' and 'man' encodes a gender direction, which when added to 'king' gives a vector close to 'queen'.
What does the dot product of two vectors measure geometrically?
How well they align: positive if pointing in similar directions, zero if perpendicular, negative if opposite.
What is the vocabulary size of GPT-3?
50,257 tokens.
What is the context size of GPT-3?
2048 tokens.
What is the role of the attention block in a transformer?
It allows vectors to communicate with each other, updating their values based on context.
What is the role of the multi-layer perceptron (MLP) block in a transformer?
It processes each vector independently through the same operation in parallel.
How are attention and MLP blocks arranged in a transformer?
They alternate: attention block followed by MLP block, repeated many times.
What is the final step in a transformer for next-token prediction?
The last vector (corresponding to the last token) is multiplied by the unembedding matrix to produce logits, then softmax gives a probability distribution over the vocabulary.
What is the unembedding matrix?
A weight matrix that maps the final embedding vector to logits for each token in the vocabulary.
How are logits converted into a probability distribution?
Using the softmax function: exponentiate each logit, then divide by the sum of all exponentiated logits.
What is temperature in the context of softmax?
A constant T in the exponent that controls randomness: higher T makes the distribution more uniform, lower T makes it more peaked.
What are logits?
The raw, unnormalized output values before applying softmax.
How does GPT-3 generate a story from a seed text?
It repeatedly predicts the next token, samples from the distribution, appends the token, and repeats.
Why does a larger model like GPT-3 produce more coherent text than GPT-2?
GPT-3 has many more parameters (175B vs. 1.5B), enabling it to learn more complex patterns and context.
What is the approximate total number of parameters in GPT-3?
175 billion.
How many parameters does the embedding matrix of GPT-3 have?
617 million (approximately).
How many parameters does the unembedding matrix of GPT-3 have?
617 million (approximately).
What is the training algorithm used for deep learning models like transformers?
Backpropagation.
What is the basic premise of deep learning?
A flexible model with tunable parameters (weights) learns from data to perform tasks without explicit programming.
Why must inputs to a deep learning model be formatted as arrays of real numbers?
The model performs weighted sums and matrix multiplications, which operate on numerical data.
What is a tensor?
A multi-dimensional array of real numbers, used to represent data and layers in deep learning.
How are model parameters typically referred to in deep learning?
Weights.
What is the context size limitation in transformers?
The network can only process a fixed number of tokens at a time (e.g., 2048 for GPT-3), limiting its memory of earlier parts of the input.

Ask anything
We've read this whole study set, so questions about it get the best answers.