Transformer Series #3: Positional Encoding - How Transformers Understand "Time" Without a Clock ⏳
dev.to·8h·
Discuss: DEV
🤖Transformers
Preview
Report Post

Welcome back to the Transformer Series! 👋

In Blog #2, we turned words into numbers (Embeddings). We took the word "King" and turned it into a vector of numbers that captures its meaning.

But we have a massive problem.

Transformers are designed to be fast. Unlike their predecessors (RNNs), which read a sentence one word at a time (left-to-right), Transformers gulp down the entire sentence in one go.

This Parallel Processing is great for speed, but terrible for context.

If you feed the sentence "The dog bit the man" into a Transformer without help, it sees the exact same input as "The man bit the dog." It’s just a bag of words floating in space. It knows who is involved, but it has no idea who did what because it has lost the concept of Order.

Today, …

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help