Uploaded October 2026 | Updated December 2026, 3 hours ago
How Does a Transformer Work? Explained Simply — AI for Beginners, Lesson 24.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
Many chatbots are built on transformers — the T in GPT. But what actually happens inside one when it reads a sentence?
In this lesson, we trace one sentence, "Riya hit the ball with her bat.", through a transformer, step by step. No equations: just a clear picture of the parts and why each one is there.
In this lesson:
- Why each word's list of numbers also needs its position.
- A block: attention, where words share information, then a feedforward network that works on each word alone.
- Many blocks stacked in layers, each with its own learned weights.
- Where learning happens, and why attention shares are worked out fresh for every sentence.
- Why a model that writes text must not peek at later words.
Try both quiz questions before the answers appear: which words can "ball" look at, and what does the feedforward part do?
Chapter 7, session 2 / Lesson 24. No coding required. Lessons 19, 20, 22 and 23 give useful background.
The diagrams are simplified for teaching. The classroom clip is AI-generated for illustration.
▶ Previous: How ChatGPT Pays Attention: Attention Explained Simply youtu.be/akkGZbCK9kY
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: How Does ChatGPT Write an Answer? One Word at a Time youtu.be/U5R6_5ER7n0
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #Transformers #ThePracticalSchool
How Does a Transformer Work? Explained Simply — AI for Beginners, Lesson 24.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
Many chatbots are built on transformers — the T in GPT. But what actually happens inside one when it reads a sentence?
In this lesson, we trace one sentence, "Riya hit the ball with her bat.", through a transformer, step by step. No equations: just a clear picture of the parts and why each one is there.
In this lesson:
- Why each word's list of numbers also needs its position.
- A block: attention, where words share information, then a feedforward network that works on each word alone.
- Many blocks stacked in layers, each with its own learned weights.
- Where learning happens, and why attention shares are worked out fresh for every sentence.
- Why a model that writes text must not peek at later words.
Try both quiz questions before the answers appear: which words can "ball" look at, and what does the feedforward part do?
Chapter 7, session 2 / Lesson 24. No coding required. Lessons 19, 20, 22 and 23 give useful background.
The diagrams are simplified for teaching. The classroom clip is AI-generated for illustration.
▶ Previous: How ChatGPT Pays Attention: Attention Explained Simply youtu.be/akkGZbCK9kY
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: How Does ChatGPT Write an Answer? One Word at a Time youtu.be/U5R6_5ER7n0
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #Transformers #ThePracticalSchool










