{"version":1,"type":"story","url":"https://digestai.news/story/guide-explains-positional-embeddings-in-modern-llms","json":"https://digestai.news/story/guide-explains-positional-embeddings-in-modern-llms.json","markdown":"https://digestai.news/story/guide-explains-positional-embeddings-in-modern-llms.md","slug":"guide-explains-positional-embeddings-in-modern-llms","headline":"Guide explains positional embeddings in modern LLMs","summary":"The article walks through how large language models add token position information, covering classic absolute embeddings, sinusoidal encodings, and the newer rotary positional encoding (RoPE). It compares GPT‑2, which adds a learned position vector to each token embedding before the first transformer block, with MiniMax‑M3, which injects RoPE inside each attention layer. Visual examples, a small PyTorch snippet, and a brief math overview illustrate each method.\n\nIt also lists the positional‑embedding choices used in open‑weight models released in 2026, noting that GPT‑2’s 1,024 learned position vectors occupy only 0.30% of total weights, but expanding to a 100k context window would raise that share to 22%. Fixed sinusoidal encodings from the 2017 \"Attention Is All You Need\" paper are explained, as are the scaling factors applied to token embeddings. The piece is technical and assumes familiarity with transformer internals, and it points readers to related tutorials on tokenizers and self‑attention.","keyPoints":["GPT‑2 adds a learned position vector to token embeddings before the first transformer block.","MiniMax‑M3 uses RoPE inside attention layers for each transformer block.","Extending GPT‑2 context from 1,024 to 100k tokens would increase positional weight share from 0.30% to 22%."],"whyItMatters":"Understanding positional embeddings helps developers and researchers choose efficient encoding methods and anticipate scaling costs for future LLM architectures.","category":{"slug":"models","name":"Generative AI & Models","url":"https://digestai.news/category/models"},"entities":{"companies":["Substack","GitHub"],"models":["GPT-2","MiniMax-M3"],"people":[]},"firstPublishedAt":"2026-11-15T12:10:37Z","updatedAt":"2026-11-15T12:10:37Z","sourceCount":1,"hasPrimarySource":false,"sources":[{"outlet":"Ahead of AI (Sebastian Raschka)","title":"Understanding Positional Embeddings in Modern LLMs","url":"https://magazine.sebastianraschka.com/p/understanding-positional-embeddings","publishedAt":"2026-11-15T12:10:37Z","type":"newsletter","primary":false,"lead":true}],"sourceNotes":null,"discussions":[{"site":"Hacker News","url":"https://news.ycombinator.com/item?id=50506376","points":227}],"thread":null,"cite":{"text":"Digest AI, \"Guide explains positional embeddings in modern LLMs\", 15 November 2026, https://digestai.news/story/guide-explains-positional-embeddings-in-modern-llms","publisher":"Digest AI","title":"Guide explains positional embeddings in modern LLMs","datePublished":"2026-11-15T12:10:37Z","url":"https://digestai.news/story/guide-explains-positional-embeddings-in-modern-llms"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}