EVERYTHING AIAI engineering, made visual
Visual edition planned
Phase 07 · Lesson 04BuildPython45 min16 lessons in phase

Positional Encoding — Sinusoidal, RoPE, ALiBi

Attention is permutation-invariant. "The cat sat on the mat" and "mat the on sat cat the" produce the same output without positional signal. Three algorithms fix it — each with a different bet on what "position" means.

Visual edition planned

This lesson isn’t interactive yet.

It is part of the curriculum and will get the same treatment as Phase 1 — a visual cover, hands-on labs, derivations with numeric checks and a quiz. Until then, the original lesson is the best place to read it:

Part of Phase 07Transformers Deep Dive. Use the previous / next cards below to keep browsing the phase.