Skip to content

Glossary: Transformers Basics

Position embedding

Also written: positional encoding, learned positions, position embeddings

A vector added to each token's vector to say where it is, because attention alone can't see word order. It can be learned (GPT-2) or fixed from sine and cosine waves.

Where the book teaches it

Related terms

Sinusoidal positionsRoPE (rotary position embedding)Embedding