TextMonkey: An OCR-Free Large Multimodal Model for Understanding Document

Yuliang Liu, Biao Yang, Qiang Liu, Zhang Li, Zhiyin Ma, Shuo Zhang, Xiang Bai · DOI

Abstract

TextMonkey is a novel OCR-free Large Multimodal Model (LMM) tailored for high-resolution document and scene-text understanding. It addresses the limitations of existing LMMs—specifically the loss of semantic context in "tiny text" and the computational inefficiency of high-resolution inputs. By integrating Shifted Window Attention (SWA) and a Similarity-based Token Resampler, TextMonkey achieves state-of-the-art results on OCRBench and other benchmarks while maintaining manageable token counts and preserving global context.

Introduction

Large Multimodal Models (LMMs) have shown remarkable capabilities, yet they often falter when faced with dense documents or complex scene text. The primary bottleneck is resolution: standard vision encoders like CLIP typically operate at 224px or 336px, causing small text to become illegible. Previous attempts to mitigate this, such as image cropping, often inadvertently sever semantic links by splitting words across patches. TextMonkey proposes a unified architecture that scales resolution while preserving context and efficiency.

Comparison of different image processing strategies for LMMs. TextMonkey (d) maintains semantic integrity and supports grounding compared to resize, crop, or frequency-based methods.

Methodology

TextMonkey introduces three core architectural innovations to bridge the gap between high-resolution perception and efficient language modeling:

1. Shifted Window Attention (SWA)

To handle resolutions up to 1344px, the model employs window-based attention. Unlike independent window processing, SWA allows information to flow across window boundaries, preserving global context. To ensure stability during fine-tuning, these components are zero-initialized, ensuring the model behaves like the original pretrained CLIP at the start of training and preventing catastrophic forgetting.

2. Similarity-Based Token Resampler

High-resolution document images are inherently redundant, often containing vast areas of white space. TextMonkey utilizes a resampler that identifies unique, "significant" tokens to act as queries in a cross-attention mechanism. This effectively compresses the visual representation, reducing token counts by up to 60% without sacrificing critical information.

3. Position-Aware Multi-Task Learning

The model is trained to output normalized coordinates (0-1000) for text grounding. Interestingly, the authors found that using center points for grounding is more effective for LMMs than complex polygons. This spatial awareness allows the model to "point" to the evidence for its answers, enhancing interpretability and performance in text spotting tasks.

The TextMonkey architecture, highlighting the integration of Shifted Attention Layers within the ViT encoder and the Token Resampler module.

Key Results

TextMonkey demonstrates superior performance across 12 benchmarks. On OCRBench, it achieved a score of 561, outperforming previous state-of-the-art models like Monkey (514) and InternVL (517). It showed significant accuracy improvements in both scene text (+5.2%) and document-oriented tasks (+6.9%). Furthermore, the model's ability to function as an "App Agent" for smartphone GUI navigation—predicting click locations from natural language commands—highlights its versatility beyond static documents.

Discussion and Limitations

Despite these gains, a trade-off exists between reasoning and grounding. In logic-heavy tasks like ChartQA, requiring the model to provide spatial coordinates slightly hindered performance, suggesting that the dual task of calculation and localization can be cognitively demanding. Future iterations may explore Chain-of-Thought (CoT) prompting to better structure these complex multi-step reasoning processes.

Conclusion

TextMonkey represents a significant step forward in OCR-free document understanding. By balancing high-resolution perception with efficient token management and spatial grounding, it provides a robust framework for interpreting complex visual-textual data without the need for external OCR engines.

Summary updated

BibTeX
@article{liu2026textmonkey,
  author = {Yuliang Liu and Biao Yang and Qiang Liu and Zhang Li and Zhiyin Ma and Shuo Zhang and Xiang Bai},
  title = {{TextMonkey: An OCR-Free Large Multimodal Model for Understanding Document}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2026},
  doi = {10.1109/tpami.2026.3653415},
}
Figure