Vigyata.AI
Is this your channel?

L-5 | Positional Encoding in Transformers | Attention Is All You Need

1.6K views· 130 likes· 33:29· Dec 19, 2025

In this lecture, we deeply understand Positional Encoding in Transformers, one of the most important concepts introduced in the paper “Attention Is All You Need.” In the previous lecture, we learned: How text is tokenized How tokens are converted into token IDs How embeddings are created before feeding data into a Transformer ⚠️ Important: If you haven’t watched the previous lecture on Tokenizer and Embeddings, please watch that first. This video is a continuation. 🔍 What you will learn in this video: Why Transformers need positional encoding Why word order matters in NLP Why Transformers cannot understand sequence order on their own Difference between embeddings and positional encodings How positional encoding is added to embeddings Why positional encodings are fixed (not learned) Sinusoidal positional encoding formula (sin & cos) Even vs odd dimensions (sine vs cosine) Step-by-step numerical example Intuition behind waves, frequencies, slow and fast signals 📸 Follow me on Instagram: @codewithaarohihindi 🔗 https://instagram.com/codewithaarohihindi 📧 You can also reach me at: aarohisingla1987@gmail.com

🎬 More from Code With Aarohi Hindi