General · LESSON 22 OF 33 · 1 min
The encoder: how it reads a sentence.
About this lesson
The encoder: how it reads a sentence. — a video lesson in attention is all you need. Learn attention is all you need through short video lessons.
Continue in the reels feed ↓Video transcript
So the encoder reads a sentence like the river bank. What does it actually do with the words?
It is built from one repeated block. Inside, attention lets words gather from each other, then feed-forward processes each word.
The encoder stacks six of these identical blocks. The output of one becomes the input of the next.
Hmm. If every block is the same, does the sentence get read again and again, the same way each time?
The design is the same, but the inputs change. Each block starts from the richer words the last one made, so understanding builds up.
After six blocks, every word is a rich vector that knows its context. Bank now means riverbank. That output is what the decoder will use.