Positional Encoding โ How Transformers Learn Word Order | Visual AI
About this lesson
See how sine and cosine waves inject order into Transformer embeddings โ so the same word in different positions becomes a different vector. ๐ฏ What you'll see: โข The problem: embeddings alone have no notion of position โข Sine and cosine waves per dimension โข PE formula: sin(pos/10000^(2i/d)) and cos(...) โข Positions as geometric rotations in high dimensions โข Hero: "apple" fruit vs "Apple" tech giant โ positional shifts let attention distinguish context Visual-first: waves, rotations, and vector shifts. ๐ More at: https://8gwifi.org/math #positionalencoding #transformers #attention #ChatGPT #AI #LLM #NLP #mathematics #education
Original Description
See how sine and cosine waves inject order into Transformer embeddings โ so the same word in different positions becomes a different vector.
๐ฏ What you'll see:
โข The problem: embeddings alone have no notion of position
โข Sine and cosine waves per dimension
โข PE formula: sin(pos/10000^(2i/d)) and cos(...)
โข Positions as geometric rotations in high dimensions
โข Hero: "apple" fruit vs "Apple" tech giant โ positional shifts let attention distinguish context
Visual-first: waves, rotations, and vector shifts.
๐ More at: https://8gwifi.org/math
#positionalencoding #transformers #attention #ChatGPT #AI #LLM #NLP #mathematics #education
Watch on YouTube โ
(saves to browser)
Sign in to unlock AI tutor explanation ยท โก30
๐
Tutor Explanation
DeepCamp AI