podcasts / The attention family / episode / question
Question

What is T5's relative position bias and how is it different from a position embedding?

Answered from Position Embeddings: Learned, Sinusoidal, Relative | The attention family series - Lecture 9 · The attention family · 2026-10-09

Sreedath Panat explains that the 2019 T5 paper, named for Text-to-Text Transfer Transformer, adds a learned scalar to the query-key dot product instead of adding a vector anywhere. Each distance maps to one of 32 buckets: distances up to 7 get their own bucket, wider ones share log-spaced buckets, and anything 91 or more away falls in the last. Each attention head learns its own 32 numbers, so 10 heads mean 320. In his example, a score of 0.9 plus a bias of -0.8 becomes 0.1.

▸In their words

“It rather introduces a bias score which is just a scalar.” Sreedath Panat · at 1:07:56 — open in the transcript →

Source: our own transcription of the episode. The full conversation is on The attention family (2026-10-09). Read the whole episode summary →

▸More from this episode

Q1Why do transformers need position embeddings, according to Vizuara?Q2Does adding a position embedding change a word's meaning in a transformer?Q3How do learned absolute position embeddings work in GPT-2?Q4How do sinusoidal position embeddings work?Q5Why does every position get a unique sinusoidal embedding if sine waves repeat?Q6How does Shaw et al.'s relative position representation work?Q8What happens to a small language model trained without position embeddings?
Transcribe your links. Paste a YouTube, Google Drive or podcast link and WhipScribe gives you the transcript. Transcribe a link →