Skip to main content
Ctrl+Enter to process
4

Positional Encoding

The model processes all tokens at once rather than reading left-to-right like you do. That means it needs an extra signal to know where each word sits in the sentence — otherwise "dog bites man" and "man bites dog" would look identical. Positional encoding adds a unique pattern to each position, like numbering the seats in a theater so every token knows its place.

Common misconception: The model does not inherently understand order. Without positional information, a transformer treats a sentence as an unordered bag of tokens. The positional encoding is what gives it a sense of sequence.

Enter a query above to begin.