Gradient LabSign up free

ML glossary › KEY

What is key in machine learning?

In attention, a vector saying what this token contains, to be matched against queries.

Where it shows up

Transformers and LLMs

Queries, keys and values

Each token makes three vectors: a query (red: what am I looking for?), a key (blue: what do I contain?) and a value (purple: what will I hand over?).

See key in motion. The lesson animates it step by step, free.

Open the lesson

Related terms