# Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution

Qwen2-VL processes images at any resolution, with token counts following image size

Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai and 13 more · arXiv · 2024-9-18

- **Problem** Most vision-language models resize every image to one fixed resolution, which discards detail in high-resolution images.
- **Method** Qwen2-VL lets each image keep its own shape, so its token count follows the image instead of a preset size. It swaps the ViT's absolute position embeddings for 2D-RoPE.
- **Results** Qwen2-VL-72B achieves results comparable to GPT-4o and Claude3.5-Sonnet across various multimodal benchmarks, outperforming other generalist models.

## Why fixed-size inputs hold vision models back

Most LVLMs at the time pushed every image into one fixed resolution, such as 224×224. They downsample or upsample the picture, or scale it and then pad it, so the model sees a uniform grid whatever the original shape. That uniform treatment throws away detail in high-resolution images, so the model falls short of human sensitivity to scale and detail.

A second weak point sits in the vision encoder, which most LVLMs keep static and frozen. The encoder is usually a CLIP-style model, so its features may not be adequate for complex reasoning or fine details. Some recent work fine-tunes the vision transformer during LVLM training and reports better results, which is the route the authors take.

Video adds a third problem, since one-dimensional position encodings struggle with a world that has three spatial dimensions and time. So the authors build M-RoPE, which gives temporal and spatial information separate components.

## From any image size to a token sequence

The key idea is to let each image keep its own shape, so the number of visual tokens follows the image rather than a preset size. To do that, the authors remove the absolute position embeddings from the ViT and add 2D-RoPE, which encodes the two-dimensional position of each patch. Images of different sizes are packed into one sequence at inference, and the packed length is capped to limit GPU memory use.

An MLP after the ViT merges each adjacent 2 × 2 group of tokens into one token, which shortens the sequence the LLM must read. Vision start and end tokens bracket the compressed span, so the LLM knows where the image sits. For a 224 × 224 image with patch size 14, this arithmetic leaves 66 tokens entering the LLM.

The ViT stays at about 675 million parameters whichever LLM it feeds, so its compute doesn't grow with the language model. The language side uses the Qwen2 series of models.

## M-RoPE: positions as time, height and width

M-RoPE keeps the rotary idea but splits each embedding into temporal, height and width parts, rather than one 1D position. Text is the easy case: all three parts get the same ID, which makes M-RoPE behave like ordinary 1D-RoPE. An image keeps one temporal ID across its tokens, and each token's height and width IDs follow its place in the picture.

For video, the temporal ID rises by one per frame while height and width follow the image rule. When text, image and video share a sequence, each new modality starts from the largest previous position ID plus one. The authors argue this lowers the position IDs for images and videos, which lets the model extrapolate to longer sequences.

Video is sampled at two frames per second, and 3D convolutions with depth two turn frame pairs into tubes rather than 2D patches. Images are duplicated into two identical frames, so both media go through one path. Video tokens are capped at 16384 per video, which trades off long-video comprehension against training cost.

## Three training stages and their data

Training follows the Qwen-VL recipe in three stages, and each stage decides which parts receive updates. Stage one trains only the ViT on a large set of image-text pairs, while the rest of the model stays fixed. Stage two unfreezes all parameters and trains on a wider data mix, and stage three locks the ViT and tunes the LLM on instruction data.

The LLM starts from the Qwen2 weights, while the vision encoder starts from a DFN ViT with its fixed position embedding swapped for RoPE-2D. The first pre-training phase uses about 600 billion tokens, mostly for image-text relations, OCR and image classification. The second phase adds 800 billion image-related tokens, with more mixed image-text data and visual question answering.

Across all pre-training the total reaches 1.4 trillion tokens, counting image tokens too, but supervision covers only text tokens.

Instruction data uses the ChatML format, with special tokens that mark each turn and the supervised parts. The mix covers text dialogue along with image question answering, document parsing, multi-image comparison, video and agent interactions. Bounding boxes are normalized to a 0 to 1000 range, so grounding outputs share one coordinate format.

## Does dynamic resolution beat fixed token counts?

The authors test Qwen2-VL-7B under fixed token counts and under dynamic resolution, with min\_pixels set to 100×28×28 and max\_pixels to 16384×28×28. The fixed settings use 64, 576, 1600 and 3136 average image tokens, while the dynamic setting averages 1924. On InfoVQA the dynamic setting scored 75.89, compared to 74.99 at 1600 fixed tokens and 77.27 at 3136 fixed tokens.

So dynamic resolution beats the 1600-token setting on a similar budget, but the larger 3136-token setting still scores higher.

No single fixed count was best on every benchmark, which the authors use to argue for choosing resolution per image. Bigger images don't always help, although upscaling small images improved perceptual tasks such as InfoVQA, HallusionBench and OCRBench. OCRBench, however, dropped sharply when min\_pixels was set too high. The authors think this is because OCRBench holds many tiny images, which enlargement pushes out of the training distribution.

MMMU barely changed with min\_pixels, so the authors read its limit as reasoning rather than resolution.

## Does M-RoPE beat 1D-RoPE on longer inputs?

The M-RoPE ablation uses a Qwen2-1.5B backbone with ViT-L and compares pre-trained models under M-RoPE and 1D-RoPE. On MathVista, M-RoPE scored 43.4, compared to 39.2 for 1D-RoPE. The video gains are larger, with NextQA rising from 43.9 to 46.0 and STAR from 55.5 to 57.9.

Training capped each video at 16K tokens, but the authors test longer inference inputs on Video-MME medium videos. Qwen2-VL-72B keeps robust results up to an inference length of 80K tokens. The authors link this robustness to M-RoPE.

## Where the 72B model leads and trails on general benchmarks

The authors report an advantage in document understanding tasks.

On MathVision it scored 25.9, which the authors present as the best open-source result, but the table lists a previous SoTA of 30.3.

RealWorldQA rose to 77.8, compared to 72.2 for the previous best and 75.4 for GPT-4o. So the model isn't uniformly ahead, and the authors say there is room for improvement on this harder problem set.

## Video and visual-agent results

It also leads PerceptionTest and EgoSchema, but on Video-MME Gemini 1.5-Pro scored higher, 75.0 without subtitles against 71.2.

Function calling is scored by Type Match, the share of calls that invoke the correct function, and Exact Match, the share whose arguments match the recorded content. Because this set is built in-house, these numbers aren't a public benchmark result. The authors attribute GPT-4o's lower score partly to avoiding external tools when unsure, and partly to weaker Chinese OCR.

Multi-step agent tasks keep the history of observation and action within a 32K context, and each new screenshot is appended after every action. On ALFRED's valid-unseen split the model slightly beats ThinkBot, while on R2R it lands near GPT-4o but well behind specialized navigation models.

## Limitations

Video-MME runs capped each video at 768 frames, which the authors say may affect performance on longer videos. Length tests cover medium Video-MME videos, and the authors leave support for longer sequences to future work.

The VLN gap to specialized models is attributed to incomplete and unstructured maps the model builds from several images. OCRBench results depend on min\_pixels, since too-high upscaling causes a severe drop.

## Paper info

- **Authors**: Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, Junyang Lin
- **Venue**: arXiv · Preprint
- **First published**: 2024-9-18
- **Added**: 2026-11-11
- **Updated**: 2024-10-3
- **Version**: v2
- **arXiv**: 2409.12191
- **Category**: cs.CV · cs.AI · cs.CL
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2409.12191v2) · [PDF ↗](https://arxiv.org/pdf/2409.12191v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, Junyang Lin (2024). Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution. arXiv:2409.12191v2. https://arxiv.org/abs/2409.12191v2

**BibTeX**

```
@misc{wang2024qwen2,
  title = {{Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution}},
  author = {Peng Wang and Shuai Bai and Sinan Tan and Shijie Wang and Zhihao Fan and Jinze Bai and Keqin Chen and Xuejing Liu and Jialin Wang and Wenbin Ge and Yang Fan and Kai Dang and Mengfei Du and Xuancheng Ren and Rui Men and Dayiheng Liu and Chang Zhou and Jingren Zhou and Junyang Lin},
  year = {2024},
  eprint = {2409.12191},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.12191v2}
}
```

## Other paper commentary

- [Multimodal Machine Learning: A Survey and Taxonomy](https://refivu.com/en/papers/2148fea3-852f-4876-ab29-675f2c95c8d9-multimodal-machine-learning-a-survey-and-taxonomy.md)
- [Gemini: A Family of Highly Capable Multimodal Models](https://refivu.com/en/papers/210f7673-6e80-4763-9ef2-d58f1a878648-gemini-a-family-of-highly-capable-multimodal-models.md)
- [Multimodal Machine Learning-based Knee Osteoarthritis Progression Prediction from Plain Radiographs and Clinical Data](https://refivu.com/en/papers/2b4e96e0-64f3-4752-8b7e-3e4c0c68dc86-multimodal-machine-learning-based-knee-osteoarthritis.md)
- [Collaborative Federated Learning For Healthcare: Multi-Modal COVID-19 Diagnosis at the Edge](https://refivu.com/en/papers/716b1271-0a25-4e75-a046-8918241dcd06-collaborative-federated-learning-for-healthcare-multi-modal.md)
- [SmolVLA: A Vision-Language-Action Model for Affordable and Efficient Robotics](https://refivu.com/en/papers/39053767-ba8f-472c-b05c-af9ccbcac6d4-smolvla-a-vision-language-action-model-for-affordable.md)
- [HexaShell: A Thin Harness for Exploring the Limits of VLM Agents as Robot Coding Agents](https://refivu.com/en/papers/987b0722-81e4-41f3-8104-a1d8a65def66-hexashell-a-thin-harness-for-exploring-the-limits.md)
- [Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena](https://refivu.com/en/papers/beb0d651-5eaa-425c-8bf2-ee14db24b3b0-judging-llm-as-a-judge-with-mt-bench.md)
- [Long-term Recurrent Convolutional Networks for Visual Recognition and Description](https://refivu.com/en/papers/746c9a37-e85c-4acd-aec2-5cfa2639a609-long-term-recurrent-convolutional-networks-for-visual.md)
- [ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks](https://refivu.com/en/papers/ebad818e-19ed-4df9-8fcf-6d62836fa124-esrgan-enhanced-super-resolution-generative-adversarial.md)
- [R-FCN: Object Detection via Region-based Fully Convolutional Networks](https://refivu.com/en/papers/bb79aec7-981d-49d9-925a-5b0783987a46-r-fcn-object-detection-via-region-based-fully.md)
- [Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge](https://refivu.com/en/papers/fc6d55cd-53fa-41b7-a998-11a56cc77804-think-you-have-solved-question-answering-try-arc.md)
- [LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation](https://refivu.com/en/papers/ce104c95-75b4-4033-900a-57eef9818488-lightgcn-simplifying-and-powering-graph-convolution-network.md)

## Terms in this paper

- [exact match](https://refivu.com/en/terms/f6e0295e5c92-exact-match)
- [Vision Transformer (ViT)](https://refivu.com/en/terms/5676f2cc1c70-vision-transformer-vit)
- [MMBench](https://refivu.com/en/terms/1688e568c3b8-mmbench)
- [Qwen-VL](https://refivu.com/en/terms/fd7b8b14cea3-qwen-vl)
- [general visual question answering](https://refivu.com/en/terms/ea17002e2ab6-general-visual-question-answering)
- [Video Understanding](https://refivu.com/en/terms/ee9fa6ac782d-video-understanding)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/6c3c16f7-9275-4dac-84c5-17175ff5b338-qwen2-vl-enhancing-vision-language-model-s-perception)
