Positional Embedding

Positional Embeddings are vectors added to Token Embeddings to provide the model with information about the order or position of tokens in a sequence.

Necessity

Token embeddings alone capture semantic meaning (e.g., “cat” vs “dog”) but ignore position.

Types of Positional Embeddings

There are two main approaches to encoding position:

  1. Absolute Positional Embedding: Assigns a unique vector to each position (used in GPT-2, GPT-3).
  2. Relative Positional Embedding: Encodes the relative distance between tokens (useful for long sequences).

    Mike 3.0

    Send a message to start the chat!

    You can ask the bot anything about me and it will help to find the relevant information!

    Try asking: