Unlimited OCR 2 ingests 3,600-page Harry Potter in one go, cutting KV cache from 47GB to 1.77GB

xiaohu · x · 2026-10-27

Baidu's Unlimited OCR 2 introduces an Unlimited-Horizon Decoding paradigm that pushes document parsing from dozens of pages to thousands — end-to-end parsing of the 1,200+ page Three-Body trilogy or the 3,600+ page Harry Potter series in a single pass.

How it works: documents are split into page blocks sharing a boundary page; after each block, the model keeps the boundary page's visual KV plus recent text KV, reuses them for the next block, and evicts inactive page caches — so the GPU only holds the active block's cache. Peak KV memory dropped from 47GB to 1.77GB, per-chunk generation is 5.6× faster than v1 on 100-page docs, and decoding latency stays near-constant as length scales (7× vs full attention).

Results: score on a multi-page benchmark rose from 61.89 to 84.59; on 100 hard documents of 103–300 pages (MarathonDocBench) it scored 77.1, far ahead of Qwen3.8-Max (22.9), Gemini-3.1-Pro (27.0) and DeepSeek-4.1-Flash (12.3). It handles reading order, cross-page table merging, paragraph continuation, heading hierarchy and figure localization.

Related event: Baidu Open-Sources Unlimited OCR 2 for Thousand-Page Document Parsing(5 posts)→

Original post →

More from Infra

Infra channel →