podcasts / The attention family / episode / question
Question

How do learned absolute position embeddings work in GPT-2?

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

Sreedath Panat explains that GPT-2 keeps two lookup tables learned during training: a token table of about 50,257 rows by 768 columns and a position table of 1,024 rows by 768 columns. The position table has 1,024 rows, not 50,257, because GPT-2 processes at most 1,024 tokens at once. A token's row from the first table and its position's row from the second are added element by element. The weakness is that a model stretched to an 1,100-token window has no learned vector for slots 1,024 to 1,099.

▸In their words

“This was one of the limitations of gpt2.” Sreedath Panat · at 26:31 — 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?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?Q7What is T5's relative position bias and how is it different from a position embedding?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 →