Gradient LabSign up free

ML glossary › Query

What is query in machine learning?

In attention, a vector saying what this token is looking for.

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 query in motion. The lesson animates it step by step, free.

Open the lesson

Related terms