The Original Transformer Architecture
The architectural choice follows the task. Because GPT writes forward one word at a time, it keeps the half of the original design that is built for that forward direction and drops the half that GPT does not need.
Asking What GPT Kept
Imagine you are handed a diagram of the original transformer and told that GPT was built from it. The first question a careful learner asks is simple: what did the GPT designers keep, and what did they throw away? This article answers that question. Rather than memorizing a list of differences, we will follow the path a piece of text takes through each design and let the differences appear along the way.
What do you think happens?
The original transformer is built from an encoder block and a decoder block. Before reading on, which of these two halves do you think GPT keeps?
Reveal answer
Only the decoder
GPT employs only the decoder portion of the original transformer and drops the encoder. The reason the source gives is tied to the job GPT is built for: unidirectional, left-to-right processing suited to text generation.
Following a Piece of Text Through Two Designs
The original transformer is built from two kinds of blocks: an encoder block and a decoder block. In the original design, these blocks were repeated six times. Depth in this sense is simply how many times the same kind of processing stack is applied one after another to the data.
GPT keeps only the decoder half. Its stack is also much deeper. The diagram below places both designs in the same frame, so you can see which parts exist in each. Read it as a comparison: the original transformer column has both blocks, while the GPT column keeps the decoder and has no encoder.
Why the Decoder Fits the Job of Generation
The source ties the choice to keep the decoder and discard the encoder to what GPT is designed to do. GPT is designed for unidirectional, left-to-right processing. This makes it well suited to text generation and next-word prediction. Generation is a task where the model writes forward, so a stack organized around handling text in one direction fits the job naturally.
The architectural choice follows the task. Because GPT writes forward one word at a time, it keeps the half of the original design that is built for that forward direction and drops the half that GPT does not need.
Comparing Depth Across Two Designs
The source gives concrete numbers for depth. The original transformer repeated its encoder and decoder blocks six times. GPT-3, which the source uses as its main example of the GPT family, has 96 transformer layers and 175 billion parameters in total. The source makes the point that architectures like GPT-3 are significantly larger than the original transformer.
| Design | Blocks kept | Depth as given in the source | Size as given in the source |
|---|---|---|---|
| Original transformer | Encoder and decoder | Each block repeated six times | Not given in the source |
| GPT-3 | Decoder only | 96 transformer layers | 175 billion parameters |
Depth and size figures as stated in the source material
Generating Text One Word per Round
Read the GPT design as a loop, not a single pass. Text enters and is preprocessed, then the decoder processes it and the output layers produce a result. That result is not the end of the story. It is fed back in as the input for the next round, so each round depends on what the previous round produced, and the process repeats.
The loop explains how GPT produces longer text. The model does not write a whole paragraph in one step. It generates text iteratively, producing one word per round, and each new word is appended to what came before before the next round begins. This is what the source means when it says the model works one word at a time.
Tracing a Sequence Through the Loop
Suppose the current input sequence is the phrase "The cat". Trace how GPT would extend it, one word per round, using the loop from the diagram.
- 1Round 1 input
The input sequence is "The cat". It is preprocessed and passed through the decoder.
- 2Round 1 output
The output layers produce one next word, for example "sat". That word is appended, so the sequence becomes "The cat sat".
- 3Round 2 input
The growing sequence "The cat sat" is fed back in as the new input. Round 2 depends on everything produced so far.
- 4Round 2 output
The next word is produced and appended, and the sequence grows again. The cycle repeats for as many rounds as needed.
The sequence grows one word at a time, and each round's output becomes part of the next round's input.
Why the Base Design Matters for LLMs
The course establishes one fact early: Large Language Models are derived from a specific design called the transformer architecture. The direction of this relationship matters. The transformer architecture is the starting point, and LLMs are what get derived from it. The architecture is therefore the more general design, and LLMs are built on top of it. Understanding the architecture is one of the routes to understanding LLMs.
Think of the architecture as a template that several products are built from. The template is not any one product. Each product starts from the same template and then takes its own shape. The tree shows this direction: the base design sits at the top of the derivation, and the derived systems branch below it. The diagram names only the things the source establishes. It does not list internal parts of the architecture, because the available material does not describe them.
Why GPT Still Matters Today
GPT-3 was introduced in 2020. By the standards of deep learning and large language model development, that is a long time ago. Yet the source argues that understanding GPT remains as relevant as ever. More recent architectures, such as Meta's Llama models, are still based on the same underlying concepts as GPT, with only minor modifications. Studying GPT therefore helps you read newer models, because the core ideas carried forward.
Mistakes Learners Make About Base Architectures
Common mistake Assuming GPT keeps both the encoder and the decoder
What it looks likeReading the original diagram and concluding that GPT has the same two halves, just deeper.
Why it failsThe source states that GPT employs only the decoder portion and drops the encoder.
Do this insteadKeep the decoder and remember that the encoder is the part GPT removes.
Common mistake Treating the architecture as the same thing as a trained model
Why it failsThe source describes the architecture as a design, and LLMs are built on top of it. A design is not one trained model.
Do this insteadSay that LLMs are derived from the transformer architecture, not that they are the architecture itself.
Common mistake Reversing the direction of the relationship
What it looks likeSaying the transformer architecture is derived from LLMs.
Why it failsThe source says the direction runs from the base architecture to the derived LLMs.
Do this insteadThe transformer architecture is the base, and LLMs are derived from it.
Common mistake Confusing layers with parameters
What it looks likeThinking that 96 layers and 175 billion parameters measure the same quantity.
Why it failsLayers count the stages data passes through, while parameters are adjustable numbers learned in training.
Do this insteadReport depth as layers and size as parameters, keeping the two measures separate.
Common mistake Assuming every LLM is built in exactly the same way, when the source only establishes the derivation relationship
What the Source Does and Does Not Establish
A base architecture and the systems derived from it are easy to over-describe. The material supports a specific set of claims: GPT uses only the decoder, GPT-3 has 96 transformer layers and 175 billion parameters, GPT generates one word per round in a loop, and LLMs are derived from the transformer architecture. The material does not describe the internal parts of the architecture, and it does not claim that every LLM is built identically.
Trace the Relationship Yourself
Without looking back, write three sentences. First, name the half of the original transformer that GPT keeps and the half it drops. Second, state the depth of the original transformer and of GPT-3, using only the numbers given in the source. Third, explain in one sentence why the base architecture sits above the LLMs in the derivation.
Hints
- The source ties the choice of decoder to unidirectional, left-to-right processing.
- Keep layers and parameters separate: depth is counted in layers, and size is counted in parameters.
- The direction of the relationship runs from the base architecture to the derived LLMs.
Explain why GPT generates text one word at a time, and describe what happens to the output of one round before the next round begins.
Hints
- Think about the loop: the output layers produce a result that is fed back in.
- Each new word is appended to what came before.
Summary of the Architecture Relationships
- 1GPT employs only the decoder portion of the original transformer and drops the encoder, because GPT is designed for unidirectional, left-to-right text generation.
- 2The original transformer repeated its encoder and decoder blocks six times, while GPT-3 has 96 transformer layers and 175 billion parameters. Layers and parameters measure different things.
- 3GPT generates text iteratively, one word per round, with each round's output appended and fed back in as the next input.
- 4LLMs are derived from the transformer architecture, which is the base design. The architecture is a design, not a single trained model, and the source establishes only this derivation relationship.
At a glance
- GPT keeps only the decoder half of the original transformer and drops the encoder, matching its unidirectional, left-to-right design for text generation.
- The original transformer repeated its blocks six times, while GPT-3 has 96 transformer layers and 175 billion parameters.
- GPT generates text one word at a time in a loop, feeding each round's output back in as the next input.
- LLMs are derived from the transformer architecture, which is the base design; the source establishes only this derivation relationship.