Save this video free

Transformer Neural Networks, ChatGPT's foundation, Clearly Explained!!!

StatQuest with Josh Starmer · 36:15 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Josh Starmer explains how a Transformer translates the English phrase “let’s go” into Spanish “vamos,” building from learned word embeddings to positional encoding, self-attention, and encoder-decoder attention. He shows how shared weights and parallel computation support variable-length inputs, while softmax, residual connections, and a final output layer combine information to generate translated tokens.

Key takeaways

Chapters

0:00 Learned Word Embeddings Turn Tokens into Numbers
7:30 Sine and Cosine Positional Encoding Preserves Word Order
12:53 Self-Attention Uses Queries, Keys, Values, and Softmax
19:53 Multi-Head Attention and Residual Connections Build the Encoder
23:37 The Decoder Embeds Output Tokens and Applies Self-Attention
27:59 Encoder-Decoder Attention Connects Translation to Input
33:40 Transformer Recap and Scaling Details

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 [Music] translation it's done with a transform ER stat Quest hello I'm Josh starmer and welcome to statquest today we're going to talk about Transformer neural networks and they're going to be clearly explained Transformers are more fun when you build them in the cloud with lightning bam right now people are going bonkers about something called chat GPT for example our friend statsquatch might type something into chat GPT like right and awesome song in the style of statquest translation it's done with a transform ER

0:49 anyway there's a lot to be said about how chat GPT works but fundamentally it is based on something called a Transformer so in this stat Quest we're going to show you how a Transformer works one step at a time specifically we're going to focus on how a Transformer neural network can translate a simple English sentence let's go into Spanish vamos now since a Transformer is a type of neural network and neural networks usually only have numbers for input values the first thing we need to do is find a way to turn the input and output words into numbers there are a lot of ways to convert words into numbers but for neural networks one

1:38 of the most commonly used methods is called word embedding the main idea of word embedding is to use a relatively simple neural network that has one input for every word and symbol in the vocabulary that you want to use in this case we have a super simple vocabulary that allows us to input short phrases like let's go and to go and we have an input for this symbol EOS which stands for end of sentence or end of sequence because the vocabulary can be a mix of words word fragments and

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, StatQuest with Josh Starmer.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.