Lesson 7 of 97 min

Position

Attention on its own can't see the order of the words, so each query and key is turned by an angle that grows with its place, and a score then depends only on how far apart two tokens are.

After this lesson you can explain how a transformer knows the order of words.

Loading the video…

Refreshers

An idea from an earlier lesson shows up here when the video leans on it.

You use this lesson in Lab 3: Open up a real transformer, after Encoders and decoders.

Facts last checked on .