arXiv:2610.39308cs.CLOct 2026

Manuscript Offprint

arXiv:2610.39308

Unlimited OCR Works 2

Shu Wei, Jingjing Wu, Qunyi Xie, Lingshu Zhang, Xiangcheng Du, Yannian Fu, Mengjie Wang, Zuyi Wang, Zhichao Liu, Yangliu Xu, YY, Yi Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Unlimited OCR ushers the era of long-horizon parsing, substantially mitigating the growth of working memory as document lengthens. However, as document length scales to hundreds of pages, the visual context grows substantially, sharply increasing the computational cost of each decoding step and limiting the scalability of ultra-long document parsing. Inspired by human book transcription via localized focus without re-scanning preceding pages, we introduce Unlimited OCR 2, a document parsing model that looks only at what it transcribes. Building on Unlimited OCR, we upgrade all the decoder attention modules to Sparse Reference Sliding Window Attention (SR-SWA), bounding active reference tokens to a fixed capacity and thus sustaining constant computational costs across arbitrarily long documents. By combining SR-SWA with Unlimited-Horizon Decoding Paradigm, Unlimited OCR 2 enables document parsing over virtually unlimited lengths without prohibitive memory overhead. At the hundred-page scale, Unlimited OCR 2 achieves 7.0× and 5.6× per-step speedups over Full Attention and R-SWA, respectively. Furthermore, it delivers state-of-the-art end-to-end performance on both MPDocBench and MarathonDocBench, our newly proposed benchmark targeting hundred-page document parsing. Ultimately, the capacity for uninterrupted, one-shot document parsing signifies a fundamental paradigm shift into the OCR 3.0 era.

Figure

Figure 1 | R-SWA vs SR-SWA. R-SWA computes attention over all visual tokens across pages, inducing extreme visual redundancy; SR-SWA sparsely attends to relevant visual regions, aligning machine decoding with human reading intuition.

Contents

1 Introduction 3
2 Related Works 4
2.1 VLM-based Document Parsing ..... 4
2.2 Efficient Long-Context Modeling ..... 4
3 Methodology 4
3.1 Problem Setup ..... 4
3.1.1 Unlimited-horizon Parsing ..... 4
3.1.2 MarathonDocBench ..... 5
3.2 Architecture ..... 5
3.3 Sparse Reference Sliding Window Attention ..... 6
3.3.1 Page Gate ..... 6
3.3.2 Token Sieve ..... 6
3.4 Unlimited-Horizon Decoding Paradigm ..... 7
4 Experimental Settings 8
4.1 Data Engine ..... 8
4.2 Implementation Details ..... 8
5 Evaluation 9
5.1 Benchmarks and Metrics ..... 9
5.2 Main Results ..... 10
5.3 Scaling with Document Length ..... 11
5.3.1 Feasibility of Unlimited-horizon Parsing ..... 11
5.3.2 Length-Invariant Accuracy ..... 11
5.3.3 Constant Per-Step Decoding Latency ..... 12
6 Limitation and Future Work 12
7 Conclusion 12
8 Author List 13

References (36)