Build a Large Language Model (From Scratch) · Chapter 2 · Video 5 of 14 · 7:48
How does the model know "dog bites man" from "man bites dog"?
Feed "dog bites man" and "man bites dog" to GPT-2 and you get the same three token IDs in a different order, so the same three embedding rows. Attention, which reads them next, has no sense of order by itself. What tells the model who bit whom, and what exactly is it trained on?
Based on Build a Large Language Model (From Scratch) by Sebastian Raschka.