NoPE: attention with no position information at all
No positional embeddings (NoPE) removes explicit position information. Can attention still keep track of the order of the text?
Partial RoPE left some coordinates without position. What if a whole layer had none?
Without positions, “the bat chased the moth” and “the moth chased the bat” contain the same tokens. Would the layer even know which came first?
The mask already counts
In a language model, each column may only read itself and the columns before it. So the first column reads one token, and the fifth reads five.
That difference is enough. Spread attention evenly, and the share a column gives the first token tells it how far along it is.
Order shows too. “bat” in “the bat chased” reads different words from “moth” in “the moth chased”, so the columns come out different, and later layers can tell the sentences apart.
A layer with no position encoding is called NoPE.
Why leave position out?
RoPE’s angles go wrong past the training length, and distance weakens even perfect matches. A NoPE layer has neither problem: it can read the whole text with nothing to stretch.
Nearby order still matters, so most models mix the two.
Llama 4 and Command A read nearby text with RoPE in three of every four layers, then read everything without positions in the fourth. Jamba leaves positions out entirely: its attention layers rely on Mamba layers that already read the text in order.
What are those layers that read in order? Next, state-space models.
Sources and assumptions
- Transformer Language Models without Positional Encodings Still Learn Positional Information, Haviv and colleagues, 2022: causal language models without position encoding perform competitively, and infer position from the causal mask, which lets each token sense how many earlier tokens it can read.
- The Impact of Positional Encoding on Length Generalization in Transformers, Kazemnejad and colleagues, 2023: NoPE can represent absolute and relative positions, and generalised to longer inputs better than explicit schemes on their tasks.
- Layer patterns for Llama 4, Command A, SmolLM3 and Jamba come from their
config.jsonfiles and reports, listed on each model’s architecture page. Llama 4’s local layers attend within 8,192-token chunks; Command A’s use a sliding window.
The mask figure assumes attention spread evenly over the visible tokens, the simplest pattern that shows the count. Real layers learn other patterns, and how they recover position is studied in the papers above. The layer figure shows the first eight layers of each model.