AI Weekly Malaysia

Back to items Summaries

Understanding Positional Embeddings in Modern LLMs

ID
46908
Status
summarized
Published
15 Nov 2026, 8:14 PM
Fetched
16 Nov 2026, 2:09 PM
Provider
Hacker News
Category
dev-community
Original URL
https://magazine.sebastianraschka.com/p/understanding-positional-embeddings
Source URL
https://hnrss.org/best

Summary

Score
7.0
Created
16 Nov 2026, 2:09 PM
Tags
Audience
developersai_ml_learners

What happened

Sebastian Raschka published a long technical walkthrough of how LLMs encode token positions, covering classic learned absolute embeddings, relative methods, and a line-by-line explanation of how RoPE works, with visual examples, a little math, and a small PyTorch implementation. It closes with Section 6, a gallery of which positional-encoding choices 2026 open-weight architectures actually use, grouped by method. The post drew 224 points and 27 comments on Hacker News.

Why it matters

If you pick an open-weight base model or try to stretch its context window, the positional-encoding scheme in that model is the constraint — RoPE-scaling and context-extension tricks only apply to models that use RoPE, so check Section 6 of this gallery before assuming a recipe transfers. The PyTorch implementation also gives you something runnable to verify your mental model instead of taking the formula on faith.

Discussion angle

Given that 2026 open-weight models don't converge on one positional scheme, how do you actually evaluate a new base model's long-context claims — benchmark it yourself, or trust the model card?

Top