Categories: AI/ML Research

Rotary Position Embeddings for Long Context Length

This article is divided into two parts; they are: • Simple RoPE • RoPE for Long Context Length Compared to the sinusoidal position embeddings in the original Transformer paper, RoPE mutates the input tensor using a rotation matrix: $$ begin{aligned} X_{n,i} &= X_{n,i} cos(ntheta_i) – X_{n,frac{d}{2}+i} sin(ntheta_i) \ X_{n,frac{d}{2}+i} &= X_{n,i} sin(ntheta_i) + X_{n,frac{d}{2}+i} cos(ntheta_i) end{aligned} $$ where $X_{n,i}$ is the $i$-th element of the vector at the $n$-th position of the sequence of tensor $X$.
AI Generated Robotic Content

Recent Posts

Apple Cyber Monday Deals (2026): AirPods, iPads, MacBooks, and More

Save on AirPods, iPads, MacBooks, and tons of accessories for Cyber Monday.

18 hours ago

AI helps a robot dog go on a solo hike in the Swiss Alps

A four-legged robot dog called ANYmal D has completed a 6.3-mile (10.1-kilometer) hike through the…

18 hours ago

Long-Context Inference

Overview This post is divided into four parts; they are: • The Cost of a…

2 days ago

2026’s Best Black Friday Deals: We’ve Been Tracking Since 4 AM

It’s time to shop the very best Black Friday deals on the very best tech…

2 days ago

AI teaches a 5-metric-ton construction loader to perform acrobatics

The machines used at construction sites to lift heavy loads and move materials are typically…

2 days ago

Building a Multi-Agent Verification Loop in Python with Small Open Models

In this article, you will learn how to build a Proposer-Critic-Judge verification loop in Python…

3 days ago