Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Glossary › Embedding

What is embedding?

A learned vector that stands for a token. Tokens used in similar ways end up with nearby vectors.

Where it is taught

Embeddings. Give every word a vector, place similar words close together, and directions in that space start to carry meaning.

What the lesson leaves you with

  • An embedding swaps a token id for a learned vector.
  • Similar meanings end up close together, and consistent directions encode relationships.
  • The embedding table has one row per token and is learned during training.
Open the lesson

Questions

What is embedding?
A learned vector that stands for a token. Tokens used in similar ways end up with nearby vectors.
Where is embedding used in AI?
Give every word a vector, place similar words close together, and directions in that space start to carry meaning.
What is the key idea to remember about embedding?
An embedding swaps a token id for a learned vector.
Where can I learn embedding step by step?
In the lesson “Embeddings” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.

See it in 3D on the blog

  • What are word embeddings? Words as points4 min

Related terms

  • Cosine similarity
  • Dot product
  • Nearest neighbours
  • Parameter
  • Vector