FlexAttention for Efficient High-Resolution Vision-Language Models

Junyan Li, Delin Chen, Tianle Cai, Peihao Chen, Yining Hong +3 more
2/14/2026

No official code found. Best implementation: UMass-Embodied-AGI/FlexAttention (50 stars, Apache-2.0, last commit 2025-01-08).

Abstract

Current high-resolution vision-language models encode images as high-resolution image tokens and exhaustively take all these tokens to compute attention, which significantly increases the computational cost. To address this problem, we propose FlexAttention, a flexible attention mechanism for efficient high-resolution vision-language models. Specifically, a high-resolution image is encoded both as high-resolution tokens and low-resolution tokens, where only the low-resolution tokens and a few selected high-resolution tokens are utilized to calculate the attention map, which greatly shrinks the computational cost. The high-resolution tokens are selected via a high-resolution selection module which could retrieve tokens of relevant regions based on an input attention map. The selected high-resolution tokens are then concatenated to the low-resolution tokens and text tokens, and input to a hierarchical self-attention layer which produces an attention map that could be used for the next-step high-resolution token selection. The hierarchical self-attention process and high-resolution token selection process are performed iteratively for each attention layer. Experiments on multimodal benchmarks prove that our FlexAttention outperforms existing high-resolution VLMs (e.g., relatively ~9% in V* Bench, ~7% in TextVQA), while also significantly reducing the computational cost by nearly 40%.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[ECCV 2024] FlexAttention for Efficient High-Resolution Vision-Language Models

506C, C++Jul 15, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{li2026flexattention,
  title  = {FlexAttention for Efficient High-Resolution Vision-Language Models},
  author = {Junyan Li and Delin Chen and Tianle Cai and Peihao Chen and Yining Hong and Zhenfang Chen and Yikang Shen and Chuang Gan},
  year   = {2026},
  eprint = {2407.20228},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2407.20228},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.20228.svg)](https://codeofpaper.com/paper/2407.20228)

Discussion