Back to Home
Transformer Architectures
🟡 Intermediate · 6–8 min

Decoder-only Models (GPT)

GPT is built to generate text, one token at a time. Let's watch it write.

Playground

Write it one token at a time

Pick a starting prompt, then press Next Token again and again. GPT doesn't write the whole sentence at once - it predicts the next word, adds it, and repeats.

GPT predicts one token at a time - press Next Token to watch the sentence grow.

What GPT is not designed for

Generation vs understanding

⚖️
Pick the right tool

GPT is excellent at generating text. But if you need very accurate classification or semantic matching, an encoder-only model like BERT may be a better choice.

✍️ Generate new content → GPT (decoder)
🔎 Understand & classify → BERT (encoder)
Real-world applications

Where decoder-only models shine

Tap a card to see what GPT-style models do there.

🔑
Key takeaways
  • • GPT uses only a decoder.
  • • GPT generates one token at a time.
  • • GPT is designed for text generation.
  • • GPT is widely used in chatbots and AI assistants.
  • • Decoder-only models excel at creating new content.
BERT vs GPT

Two models, two jobs

The previous lesson met BERT. Here's how the two compare at a glance.

🔎 BERT
Understands text
Encoder-only
Classification, Search
✍️ GPT
Generates text
Decoder-only
Chat, Writing, Coding
Summary

GPT focuses on generating text. Instead of only understanding a sentence, it predicts the next token again and again to create complete responses.