AI engineering glossary · NLP embeddings

What is matryoshka representation learning?

Matryoshka representation learning (also called Matryoshka embeddings): A training method that makes the first k dimensions of an embedding useful on their own, for several values of k. Vectors can then be cut to a shorter length to save storage and speed search, with only a modest loss in quality.

Level: advancedTopic: NLP embeddings

Matryoshka representation learning: an example

A 1024-number embedding can be cut to its first 256 numbers for a cheaper index.

Related terms

More NLP embeddings terms

Where you learn it

Matryoshka representation learning is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.