flâneur

You could have designed state of the art positional encoding

huggingface.co · 3,029 words · saved by 1 readers

We’re on a journey to advance and democratize artificial intelligence through open source and open science.

Gall's Law A complex system that works is invariably found to have evolved from a simple system that worked John Gall This post walks you through the step-by-step discovery of state-of-the-art positional encoding in transformer models. We will achieve this by iteratively improving our approach to encoding position, arriving at Rotary Postional Encoding (RoPE) used in the latest LLama 3.2 release and most modern transformers. This post intends to limit the mathematical knowledge required to follow along, but some basic linear algebra, trigonometry and understanding of self attention is…

related reading