Skip to content

Glossary: Transformers Basics

One-hot vector

Also written: one-hot, F.one_hot

A vector of zeros with a single 1 at one position. Multiplying a one-hot vector by the embedding table picks out one row, which is what an embedding lookup does.

Where the book teaches it

Related terms

Embedding