In the Transformer architecture, what mechanism is used to provide the model with information about the order of symbols in a sequence?
Show answer
Positional encoding
Since Transformers use self-attention rather than recurrence or convolution, they have no inherent sense of the relative or absolute position of tokens. Positional encodings are added to the input embeddings to inject this spatial information.
Also asked as:
- What technique is used in Transformers to inject information about the relative or absolute position of tokens into the input embeddings?