TL;DR
LLaVA-OneVision is a family of open large multimodal models, with 0.5, 7 and 72 billion parameters, that handle single images, sets of several images and video in one model. The model connects a vision encoder to a language model with a small projector, then trains it in stages. The main idea is that a model trained well on single images can be extended with a short stage of mixed images and video, and it then gains video understanding by transfer. The 72 billion parameter version scores above GPT-4V on many single-image benchmarks, although it stays below GPT-4o on several of them.
Builds on: Visual Instruction Tuning, Sigmoid Loss for Language Image Pre-Training · Leads to: Vision-Language Model
Why it mattered
The paper is a recipe as much as a model. Its authors show that one open model can be competitive across three settings that earlier open models usually handled one at a time: single images, multi-image inputs and video. The paper's results table compares the 0.5B, 7B and 72B models with GPT-4V and GPT-4o on single-image, multi-image and video benchmarks. The authors note that LLaVA-NeXT-Interleave was, to their knowledge, the first open attempt to report good results in all three settings, and that LLaVA-OneVision inherits its training recipe and data.
The paper also reports a concrete form of transfer. Its single-image stage contains no video, yet the final model reports strong video scores after a second stage of 1.6 million mixed image, multi-image and video samples. The authors name this task transfer and treat it as the source of the new capabilities they describe.
The problem
A vision-language model has to match two inputs: the pixels of an image, and the words of a question. Its language part is already a trained Language Model, and its vision part is already a trained image encoder. The difficult step is to connect them so that the language model can use visual detail, without losing what it already knows.
Three things make this harder than it looks. First, the amount of visual detail is set by how the image is turned into tokens, and more tokens cost more compute. Second, the training data is unevenly spread: there are many high-quality single-image instruction sets and far fewer video or multi-image sets. Third, a model that is tuned for one setting can lose ability in another. The paper's question is how to reach good performance in all three settings with a fixed compute budget.
How it works
Take one small example. Suppose a vision encoder turns each image crop into 4 tokens (a toy number; the real value is 729), and the model is asked a question about an image split into a 2 by 1 grid of crops. The paper's AnyRes scheme adds a resized copy of the whole image to the crops, so there are 3 pieces in total.
flowchart LR A["Image"] --> B["AnyRes: base image plus 2 by 1 crops"] B --> C["SigLIP vision encoder"] C --> D["2-layer MLP projector"] D --> E["Visual tokens"] F["Text question"] --> G["Qwen-2 language model"] E --> G G --> H["Answer, one token at a time"]
-
Split the image into pieces. The base image is resized to one crop. The grid is 2 by 1, which gives two more crops. In total there are 3 pieces. Check: a grid of a by b crops plus the base image gives a times b plus 1 pieces.
-
Encode each piece. The SigLIP vision encoder turns each piece into a grid of features. With the toy value, each piece gives 4 features. Check: 3 pieces with 4 features each give 12 visual features in total.
-
Project the features into the language model's word space. A 2-layer MLP maps each feature to a vector of the same size as a word embedding. These vectors are the visual tokens. There are still 12 of them. Check: the projector changes the size of each vector but not the number of tokens.
-
Put the visual tokens and the text tokens in one sequence. The question is written as text after the visual tokens, and the language model reads the whole sequence. Check: the model sees the image as ordinary input tokens, so it can attend to them like words.
-
Generate the answer. The language model predicts one answer token at a time. Each prediction depends on the visual tokens, the question and the answer so far. Check: the probability of the whole answer is the product of the probabilities of its tokens.
Real values follow the same steps. The paper uses 729 features per 384 by 384 crop, and it limits the total number of visual tokens by a budget that depends on the training stage.
Worked examples
A vision encoder gives tokens per crop. The image is a 1 by 1 grid, so and .
- Number of pieces: . There is one crop and the base image.
- Total tokens: .
- Check against a budget: if , then , so no reduction is applied.
Interpretation: a 1 by 1 grid with the base image gives twice the tokens of a single crop, because the base image is always included.
Use the paper's full-size tokens: per 384 by 384 crop. Stage 1.5 allows at most visual tokens. Stage 2 allows at most tokens.
- Take a 2 by 2 grid. Then , so .
- Compare with the stage 1.5 budget: , so the 2 by 2 grid fits without reduction.
- Take a 3 by 3 grid. Then , so .
- Compare with the stage 2 budget: , so it also fits.
- Take a 4 by 4 grid. Then , so , which is above 7290. The tokens per crop must be reduced to before the grid is used.
Interpretation: the stage budgets set how large a grid the model may use, and the largest grids are compressed rather than dropped.
In the OneVision stage, each video frame is resized to the base resolution and gives 729 tokens. The paper applies bilinear interpolation to each frame, which gives 196 tokens per frame, and samples up to 32 frames per video. Take the stage-2 budget of 7290 tokens.
- Without reduction, each frame costs 729 tokens, so frames fit.
- With the reduction, each frame costs 196 tokens. The paper's cap is 32 frames, so the video costs tokens.
- Check: , so the 32 frames fit in the budget with room to spare.
- Ratio: times as many frames can be included after the reduction.
Try it: to fit 32 frames into the same 7290 budget, how many tokens can each frame keep? Answer: tokens per frame, so the 196-token reduction fits comfortably.
Interpretation: reducing tokens per frame lets the model see more frames of a video in the same budget. The paper says that empirical evidence suggests this gives a better trade-off between performance and computational cost.
The math
The model is a language model conditioned on visual tokens. Write for the image input, for the question tokens and for the answer tokens, which has length . The probability of the answer is
where is the answer token being predicted, and and are the question and answer tokens that come before it. The visual input appears in every factor, so the visual signal is available for every answer token.
Step 1 in symbols: the token count of AnyRes
For a grid of columns and rows, the image gives crops, each with tokens, plus the base image. The total is
For the toy example, , and , so . With and a 2 by 2 grid, .
If would exceed a budget , the paper lowers the tokens per crop with bilinear interpolation:
- visual tokens with no reduction
- stage-2 budget, 10 times 729
Step 2 in symbols: the vision encoder
The encoder maps an image to features . The projector maps them to visual tokens . The projector is a 2-layer MLP. The features are the grid outputs of the encoder, taken before or after its last Transformer layer.
Step 3 in symbols: the projector
The MLP is a function that acts on each feature vector separately. It changes the vector size to match the language model's word embeddings, so each feature becomes one visual token of the same size as a word.
Step 5 in symbols: the answer probability
Each factor in the product is the probability that the language model assigns to the next answer token. The product of these probabilities is the probability of the whole answer, which the training loss uses.
Results
The paper reports 0-shot accuracy with greedy decoding, using the LMMs-Eval evaluation suite, and it takes most baseline numbers from the original papers. The main comparisons below are copied from its Table 2.
- Single-image, 72B against GPT-4V and GPT-4o. On AI2D the 72B model scores 85.6, against 78.2 for GPT-4V and 94.2 for GPT-4o. On DocVQA (test) it scores 91.3, against 88.4 and 92.8. On ChartQA it scores 83.7, against 78.5 (GPT-4V was reported with 4-shot prompts on this benchmark) and 85.7. On MathVista (testmini) it scores 67.5, against 49.9 and 63.8.
- Multi-image. On Mantis the 72B model scores 77.6, against 62.7 for GPT-4V. On MuirBench it scores 54.8, below GPT-4V at 62.3. The paper does not report a GPT-4o value on these multi-image rows.
- Video. On VideoMME the 72B model scores 66.2, against 59.9 for GPT-4V and 71.9 for GPT-4o. On MVBench it scores 59.4, against 43.5 for GPT-4V.
- Smaller models. The 7B model scores 81.4 on AI2D, 87.5 on DocVQA and 48.8 on MMMU. The 0.5B model scores 57.1 on AI2D and 44.0 on VideoMME.
The limits are stated by the authors. Benchmarks marked with a dagger in their table had training sets in the model's data mixture; these include AI2D, ChartQA, DocVQA, InfoVQA, ScienceQA and text-rich VQA, so their scores are not held-out tests. On real-world chat the numbers show a gap: on LLaVA-Wilder (small), the 72B model scores 72.0, against 81.0 for GPT-4V and 85.9 for GPT-4o. The development experiments were run within a fixed compute budget and aimed at useful insights rather than at pushing performance limits.
Reading guide
- Section 1, Introduction. Read after Visual Instruction Tuning and Visual Instruction Tuning (LLaVA). It summarises the LLaVA-NeXT blog series that this paper consolidates.
- Section 2, Related Work. Read after Vision-Language Model. It compares the model with proprietary and open multimodal systems.
- Section 3.1, Network architecture. Read after Transformer, Vision Transformer (ViT) and Sigmoid Loss for Language Image Pre-Training. The projector is a Feedforward Neural Network applied to each visual feature. The language model is a Language Model trained as an Autoregressive Model.
- Section 3.2, Visual representations. Read after Bilinear Interpolation. AnyRes and the token budget are in this section, and they match the examples above.
- Section 4, Data. Read after Instruction Tuning. The data is grouped into knowledge data, single-image data and the OneVision mixture.
- Section 5, Training strategies. Read after Curriculum Learning, Fine-Tuning and Learning Rate. The three stages and their learning rates are in Table 1.
- Section 6, Results. Read after Zero-Shot Learning for the meaning of 0-shot scores. Section 3.1 picks SigLIP on the basis of earlier empirical work, so read it with Learning Transferable Visual Models From Natural Language Supervision (CLIP) and Sigmoid Loss for Language Image Pre-Training.
- Section 7, Emerging capabilities. The task-transfer examples, such as image-trained skills applied to video, that the paper names as the source of the new capabilities described in the Why section.
Check yourself
QuestionRecall: what are the three kinds of input that the model handles, and which training stage first brings in video?Show answer
The model handles single images, multi-image sets and video. Video is first introduced in the OneVision stage, which trains on a mixture of video, multi-image and single-image data after the single-image stage.
QuestionComputation: a vision encoder gives 729 tokens per crop. The image is split into a 3 by 2 grid. How many visual tokens does AnyRes produce without reduction, and does the total fit the stage-2 budget of 7290?Show answer
The grid has crops, so the number of pieces is . The total is . Since , no reduction is needed, and the total fits the stage-2 budget.
QuestionWhy: why does the paper spend more visual tokens on single images than on video frames during training?Show answer
The paper says that there are many more high-quality single-image instruction samples than video or multi-image samples. A long token sequence for each image also makes the image look like a video to the model, which the authors say gives a smoother transfer from image to video understanding. Using many tokens per image is therefore a choice made for transfer as well as for detail.
QuestionApplied: a team wants to use the OneVision recipe on a small budget. They want the model to see many video frames, but they cannot afford 729 tokens per frame. What does the paper suggest, and what is the trade-off?Show answer
The paper suggests reducing the tokens per frame with bilinear interpolation, so that more frames fit in the same token budget. The trade-off is that each frame carries less visual detail. The paper says that empirical evidence suggests this gives a better balance of performance and cost than keeping full detail with fewer frames, but it is a trade-off, not a free gain.