Article
Baidu open-sources Unlimited-OCR 2: Single-step decoding for -page documents is faster by 5.6 times, without having to read the entire document at every step
Dongcha Beating AI News: Baidu has released and open-sourced Unlimited-OCR 2, with approximately 3000000000 parameters, of which only approximately 500000000 parameters are activated during inference.June The first version released by 40 could already continuously parse documents of approximately pages, but as the page count increased, generating each token still required attention to visual information from all pages, causing decoding to become increasingly slow.
The second version introduces a SR-SWA sparse attention mechanism. Rather than viewing visual information from all pages each time, the model focuses on the current page, then selects a small amount of relevant visual information and combines it with recently generated text to continue recognition. In -page tests, single-step decoding is approximately SWA times faster than the previous R-5.6 attention approach, and approximately 7 times faster than traditional full attention.
Memory savings are also significant. In -page document tests, through chunked decoding and cross-page cache reuse, peak KV cache memory for single-stream inference fell from 47GB to 1.77GB. In another 16-stream concurrency test, generation throughput increased from 360 token s per second to 1315 token s per second.
Baidu also established MarathonDocBench, containing 100 documents of 103 to 300 pages, to test models' long-document parsing capabilities. Unlimited-OCR 2 scored 77.06 points,Gemini 3.8 Flash scored 28.61 points, and Qwen3.8 Max scored 22.93 points. These results come from tests on Baidu's self-built benchmark.
When processing extremely long documents in practice, the system can also process them in windows and reuse part of the cache from the previous window to further reduce memory overhead. However, windows that are too small may affect continuity of cross-page content. The paper also acknowledges that the new mechanism cannot fully preserve the document's global information, and overall structures such as multi-level headings may still be recognized incorrectly.
Original link https://m.theblockbeats.info/flash/373909