AIToday
Large Language ModelsAhead of AI (Sebastian Raschka)Published: Nov 15, 2026, 22:01 JST

Raschka explains RoPE and positional embeddings in GPT-2 to MiniMax-M3

Send on LINE
Raschka explains RoPE and positional embeddings in GPT-2 to MiniMax-M3

3 Key Points

  1. What happened

    Sebastian Raschka published a technical walkthrough of positional embeddings in LLMs, covering learned absolute vectors in GPT-2, fixed sine-cosine encodings in the original transformer, and RoPE, which rotates query and key vectors inside attention in models such as MiniMax-M3.

  2. Why it matters

    The guide lays out why explicit position signals are needed even with causal masks, letting readers trace how recent open-weight models differ in where and how they inject that information.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

Raschka notes that after years of reader requests for a tutorial on relative positional embeddings, he revisited an old draft to produce this walkthrough, which also serves as a foundation for future articles.

The lineage runs from GPT-2's learned absolute position table, which is capped at 1,024 positions and becomes uneconomical to extend to a 100k context, to the fixed sine-cosine encodings of the original 2017 transformer, and then to RoPE from the 2021 RoFormer paper. Raschka highlights that the original transformer's sinusoidal design was motivated by a property where a fixed offset corresponds to a linear rotation, which he suggests may make it easier for attention to learn relative relationships.

MiniMax-M3 applies RoPE inside attention with no separate position vector added to the token embedding, and a partial RoPE variant is to be covered later. The reference to a gallery of 2026 open-weight architectures, grouped by positional encoding, indicates the piece is intended as a map of current practice as well as a tutorial.

FAQ
What is RoPE and how does it differ from GPT-2's method?
RoPE, or Rotary Position Embedding, rotates a token's query and key vectors based on its position before their dot product. GPT-2 instead adds a learned position vector to the token embedding before the first transformer block.
Why do LLMs need explicit positional information if they already have a causal mask?
The causal mask gives some implicit order information, but it does not distinguish a separation of one position from a separation of ten, for example. Explicit methods supply that direct signal to attention.
Ahead of AI (Sebastian Raschka)Read Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleDP World becomes first strategic partner of SHIFFT