Represents token order by learning how far apart tokens are, rather than assigning each position a unique index embedding. It complements position-agnostic self-attention by injecting order information into input embeddings. section 2.8
Relative embeddings contrast with absolute positional embeddings: the model learns relationships in terms of distance, not exact slot number. That makes them useful for varying sequence lengths and generalization beyond training lengths. section 2.8
Shape walkthrough
A batch of token IDs with shape [8, 4] is embedded to [8, 4, 256], a positional table for four positions yields [4, 256], and adding them keeps the final input embeddings at [8, 4, 256].
