# Baidu releases Unlimited-OCR-2 with unlimited-horizon parsing via SR-SWA

Digest AI · Generative AI & Models · published 2026-10-27T08:54:41Z

Canonical: https://digestai.news/story/baidu-releases-unlimited-ocr-2-with-unlimited-horizon-parsing-via-sr-s

## Summary

Baidu released Unlimited-OCR-2 on October 27, 2026, introducing Sparse Reference Sliding Window Attention (SR-SWA) that compresses text-visual attention interactions to a fixed-size set of working references such as 512 tokens. This bounds computational complexity and keeps per-step decoding latency and memory footprint nearly constant regardless of document length. The model achieves state-of-the-art performance on both dozens-of-pages benchmarks like MPDocBench and extreme hundred-page benchmarks like MarathonDocBench. Unlimited-OCR-2 supports Transformers for quick tests and SGLang for serving, with tested dependencies including Python 3.10, torch 2.13.0, and transformers 4.52.1 on an NVIDIA A800-80GB. The release includes multi-page inference that parses all pages in one request using cross-page context, and single-page inference with dynamic tiling. Detailed SGLang server configuration instructions are provided with environment variables for memory optimization. The model is available on Hugging Face, ModelScope, and Baidu Cloud, with a demo on Hugging Face Spaces. The accompanying arXiv paper (2606.23050) lists authors including Youyang Yin, Huanhuan Liu, and others from Baidu.

## Key points

- Baidu releases Unlimited-OCR-2 with SR-SWA for unlimited-horizon parsing
- Achieves SOTA on MPDocBench and MarathonDocBench benchmarks
- Available on Hugging Face, ModelScope, Baidu Cloud with SGLang serving support

## Why it matters

Unlimited-OCR-2 eliminates quadratic attention scaling, enabling parsing of entire books in a single request without memory bottlenecks, advancing document AI for enterprise and research.

## Sources

1. [baidu/Unlimited-OCR-2 · Hugging Face](https://huggingface.co/baidu/Unlimited-OCR-2) (huggingface.co, 2026-10-27, primary source)

## Cite

Digest AI, "Baidu releases Unlimited-OCR-2 with unlimited-horizon parsing via SR-SWA", 27 October 2026, https://digestai.news/story/baidu-releases-unlimited-ocr-2-with-unlimited-horizon-parsing-via-sr-s

---

Written by Digest AI's editorial model from the linked sources; the sources are the record. Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse
JSON: https://digestai.news/story/baidu-releases-unlimited-ocr-2-with-unlimited-horizon-parsing-via-sr-s.json
