Glossary

Transformer

A neural-network architecture that uses attention and other components to build representations of relationships within an input.


“The observer followed the cloud.” “The cloud followed the observer.” Same words, rather different afternoon. Counting the words gives the two sentences exactly the same description.

Transformers combine attention with components such as feed-forward layers, residual connections and position information. Attention patterns and masks govern how information can move between positions. Different Transformer architectures use those components for tasks ranging from encoding sequences to generating them.

Compare two sentences with the same words

Use sentence pairs like these to test whether an application tracks who did what to whom. Then read the model description for which positions can attend to one another. An encoder given the whole sentence and a model predicting the next token have different information at hand.

A correct answer to the first sentence alone is easy to overread. Getting both readings right is a much more informative little test of word order. Original Transformer architecture