NEO: one transformer reads pixels and words
NEO drops the vision encoder. Image patches enter the same layers as text, and new row and column RoPE channels give the image a 2D layout without touching the LLM.
Two machines, or one
Most vision–language models are modular: a vision encoder (a ViT such as CLIP, SigLIP or InternViT) reads the image, an MLP projector converts its output, and a pretrained LLM reads the result next to the text. LLaVA, InternVL3 and Qwen2.5-VL follow this pattern. The two halves are different machines:
| Property | Vision encoder (ViT) | LLM |
|---|---|---|
| Attention | bidirectional | causal |
| Position code | absolute or 2D-RoPE | 1D-RoPE |
| RoPE base | 10 000 | 1 000 000 |
| Training | contrastive / masked / distillation | next-token prediction |
The paper lists three costs of this split. The encoder brings biases from its own pre-training (fixed resolution, CLIP-style semantics, lost fine detail). Aligning the two halves needs many training stages. And capacity trade-offs and deployment get more complex.
A native VLM removes the encoder. Pixels go through a very small embedding layer and then into the same transformer as the words (early fusion). Fuyu, EVE, SOLO, Mono-InternVL, HoVLE and SAIL went this way. They hit known problems: vision learned inside a pretrained LLM is slow and unstable, and it can damage the language knowledge of the LLM.
NEO’s answer is one layer type, the native VLM primitive, used for every layer. It keeps the Qwen3 block:
RMSNorm and the SwiGLU FFN are identical to Qwen3. All the new parts sit inside MHNA (multi-head native attention): extra query/key channels for height and width, Native-RoPE, and a mixed attention mask.
From pixels to one sequence
The patch embedding layer is two convolutions:
First the image is resized so that both sides are multiples of 32, with the aspect ratio kept (native resolution, as in NaViT). Training uses images from to pixels. Conv1 has kernel = stride = 16, so each 16 × 16 patch becomes one vector. A 2D position code PE is added after the GELU. Conv2 has kernel = stride = 2 and folds each 2 × 2 group of patches into one token of the LLM width. Net effect: one visual token per 32 × 32 pixels. Special tokens <img> and </img> mark the image boundaries.
Each token then gets three indices :
- A text token gets the running position as , and .
- All tokens of one image share one . Their is their row and column, from for every image.
- After the image, continues from the previous maximum + 1. In video, goes up by one for each frame.
animation
An image becomes 192 tokens in the text sequence
Press Play, or use Step. Change the image size, then hover the strip to read the (t, h, w) of any token.
Why an image needs two more coordinates
RoPE encodes the position of a token by rotating pairs of query and key channels. A -dim vector has pairs, and pair turns by the angle with . Here is the base. After the rotation, the score between positions and depends only on . Fast pairs (small ) encode local order. Slow pairs encode long-range order.
Qwen3 uses . This pushes most pairs to low frequency. That is good for 32k-token text but bad for small spatial distances, because an image is only tens of patches wide.
The simplest way to use RoPE on an image is to flatten it row by row and use 1D positions, as InternVL does. Then the row structure is lost. The token below you is a full row away in flat order, and the last token of the row above can be your direct neighbour.
NEO needs a 2D position more than most models. All tokens of one image share one , so the channels see no difference between them. Without and channels, attention sees the image as an unordered bag of patches.
playground
Flat positions break the image layout
Click any patch to make it the query Q. Switch between flat 1D positions and separate h, w channels, and between the two bases.
Add channels, do not borrow them
One RoPE pair turns by one position number, so it can hold , or , or , but never two at once. A token with three coordinates needs three groups of pairs. The question is where the and groups come from.
M-RoPE (Qwen2-VL) splits the LLM’s own 128 channels. With mrope_section = [16, 24, 24], pairs 0–15 carry , pairs 16–39 carry and pairs 40–63 carry , all on one base- ladder.
NEO keeps all 128 channels for and adds 128 new ones per head. Two new linear layers, q_proj_hw and k_proj_hw, produce them. Their output is cut in half: 64 channels (32 pairs) for and 64 for , each half with its own QK-RMSNorm and base , the usual ViT base. The values and the output projection do not change, so the layer output has the same shape. The score of one head is a sum of three parts:
where the tilde means “after QK-norm and RoPE”. The scale stays , the scale of the pretrained LLM, not . The frequency sets are for 64 pairs and for 32 pairs, with and .
The source names three problems of the shared layout:
- Text loses channels. If text gets , the 48 and pairs of M-RoPE never rotate for text. That is 75% of the head. The pretrained attention patterns break. Qwen2-VL avoids this by setting for text, and that choice has a cost (next section). In NEO the new channels hold and , so the 128 channels behave exactly as before for text.
- Columns get the slowest frequencies. The fastest pair of M-RoPE turns only rad per column. Across a 32-column image that is 0.0055 rad, or 0.3°. In NEO the fastest pair turns 1 rad per column.
- Rows and columns differ. In M-RoPE the section is about 180× faster than the section. In NEO the two sets of 32 frequencies are identical.
playground
Every RoPE pair of one head, as a dial
Each dial is one channel pair; its hand turns by Δ · θ. Move Δh and Δw, then switch the layout. Set Δh = Δw = 0 and move Δt to compare two text tokens.
The extra channels cost parameters. One Qwen3-1.7B block has 50.3M weights. The new q_proj_hw (4.19M) and k_proj_hw (2.10M) add 6.29M, which is 12.5% per block. For Qwen3-8B the same count gives 10.9%.
Rows and columns restart at zero
Problem 1 forces M-RoPE to give text . Then the image must sit at the right place on that diagonal, so its rows and columns are shifted by the position where the image starts: an image token gets . NEO has separate channels that text never needed, so it can put all text at and let every image use its plain rows and columns
This changes what a question sees. Take the query “left” and an image token in column . Let be the distance from the image to the question. RoPE sees the key index minus the query index:
In M-RoPE the useful signal is mixed with , and changes from one example to the next: a short or long system prompt, a multi-turn chat, an image at the start or at the end.
playground
Move the question away from the image
Drag the distance D. Switch to one pair (θ = 0.1) to reproduce the source's worked example.
The source gives three reasons why this helps long contexts:
- The spatial signal does not depend on distance. “Left” or “top row” mean the same thing 5 or 50 000 tokens away. The distance is still known, but only through the channels, which were built for long distances.
- stay in the training range. The largest training image is pixels, or 64 × 64 tokens, so always. In M-RoPE a 100k-token context gives values near 100 000.
- An image costs one step. One image uses 4096 positions with 1D-RoPE, 64 with M-RoPE and 1 with NEO.
There is also a bonus. Because every image restarts at , the same place in two images gets the same . That helps the model compare images.
One mask, two habits
A ViT lets every patch see every patch. An LLM must be causal for next-token prediction. NEO uses both: text tokens are causal, and the tokens of one image attend to each other in both directions while they still see earlier context causally. The released code builds this mask from the indices alone:
mask = (idx_j == idx_i) | (arange_j <= arange_i) # same t index OR past token
All tokens of one image share one , so “same ” means “same image”. Text tokens have unique values and get a plain causal mask. The paper runs this with FlexAttention.
playground
The mixed mask on the paper's toy sequence
Click a row label or a cell to pick a query. Toggle Causal and Mixed. Change the image size.
The two parts work together. In the ablations, the mixed mask adds only 0.7 points with 1D-RoPE but 3.7 points with Native-RoPE. Bidirectional attention inside an image helps much more when the model also has real 2D positions.
Start as the LLM, then grow vision
During pre-training the backbone has two parts:
- pre-Buffer: native primitives with random initialisation. They pre-align pixels and words, like an encoder.
- post-LLM: native primitives initialised from Qwen3. They do full alignment and reasoning.
NEO-2.2B uses and (Qwen3-1.7B), so 40 layers. NEO-9B uses and (Qwen3-8B), so 42 layers. After pre-training the split goes away and all layers train together as one backbone.
The new channels of the post-LLM start in a special way: is a copy of , and is zero.
animation
Why copy Q and zero K
Pick a start, then press Train or +10 steps. Reset to watch from step 0.
Training has three stages. The loss in all of them is next-token cross-entropy on text; image tokens are inputs only. All stages use AdamW, bf16 and 16 nodes × 8 GPUs.
| Stage | Data | Trained | Steps · batch · lr |
|---|---|---|---|
| 1. Pre-training | 345M caption pairs; 30% of the mix is text-only | patch embedding, pre-Buffer, new h/w q/k and norms. LLM frozen | 190k · 2560 · 8e-4 |
| 2. Mid-training | 40M: caption 66%, conversation 11%, detection 8%, OCR 15% | everything | 50k · 1200 · 4e-5 |
| 3. SFT | about 4M instructions | everything | 6k · 650 · 5e-5 |
The LLM is frozen in Stage 1 because the data are noisy web captions, and moving LLM weights on them would damage the language knowledge. That is a known failure of EVE- and SOLO-type models. The random pre-Buffer turns pixels into tokens that the LLM can read, and the new channels let the frozen layers look at space without changes to their old weights. Text passes through the pre-Buffer too, so the 30% text-only data keep that path good.
What the numbers say
The fairest comparison in the paper is Encoder-Based: the authors’ own modular baseline, Qwen3 + InternViT-300M, with the same mid-training and SFT data as NEO. Its vision encoder was pre-trained on more than 6B samples. NEO’s whole pre-training used 345M.
playground
Benchmarks and ablations
Switch between the 2B and 8B tables and the ablation table. Hover a bar for its value.
How to read it:
- Against earlier native VLMs, NEO is best on most general benchmarks, with less data than SAIL (512M) or Mono-InternVL-1.5 (400M + 150M).
- Against Encoder-Based, NEO is on par or better on MMMU, MMB (2B), SEED, POPE, AI2D and ChartQA.
- OCR and knowledge-heavy tasks lag: InfoVQA is 14 points below Encoder-Based at 8B. NEO-9B is even below NEO-2.2B on DocVQA and InfoVQA. The authors blame the data, not the architecture.
- Architecture, not data: EVEv1, EVEv1.5 and EVEv2 re-implemented on the same Qwen3-1.7B and data score 33.4, 40.2 and 41.5, against 44.0 for NEO.
- pre-Buffer depth: 0 layers give 32.0, 4 layers 44.0, 12 layers 48.8. The gain saturates after about 8.
- pre-Buffer as an encoder: the trained pre-Buffer, put into a fresh Qwen3-1.7B and retrained on 22M samples, is only 1.7 to 3.7 points behind CLIP, InternViT and SigLIP, which saw billions of samples.