Skip to main content

41. Embeddings

Token IDs are converted into vectors.

An embedding matrix can be represented as:

E∈RV×dE\in\mathbb{R}^{V\times d}

where:

  • VV = vocabulary size
  • dd = embedding dimension

A token ID selects one row from the embedding matrix.

Token ID
↓
Embedding table
↓
Vector