Lesson 4: Position on a grid, a graph, or nowhere
20 min read·13 Oct 2026
Module 4 · Lesson 4 · About 45 minutes · Needs: Module 4, Lessons 1 and 2 (sinusoidal_table,rope, permutation equivariance)
The situation
Isla Duarte, the robotics engineer, has seen the position switch. Her robots read 32 by 32 camera test cards, and an arm must know where an object is before it reaches for it. "Your positions are a line," she says. "My cards are a grid. Does your lab even know the difference?"
This lesson gives tinyformer/positions.py grid positions and a test for whether a model uses them. Module 13 builds the full vision transformer; here you build only enough of one to measure position.