← Back to articles

Newsopen-sourceOCRBaidu

Baidu open-sources a model that reads PDFs hundreds of pages long

Unlimited-OCR 2 extracts text, tables and formulas from long documents in a single request. The weights are free under the MIT license.

Baidu open-sources a model that reads PDFs hundreds of pages long
Photo: Telegram channel @xor_journal
Media: Telegram channel @xor_journal

Baidu has open-sourced Unlimited-OCR 2, a model built to read very long documents. It takes PDF or scanned pages in order and returns structured text: headings, tables, formulas, figure captions and the correct reading order. A book, a filing or a stack of contracts hundreds of pages long can go in as a single request instead of being chopped into pieces.

Length is exactly where these models usually break: the more pages, the more expensive it gets to keep attending to everything already read, and memory runs out. Baidu took a different route. The model keeps a fixed set of reference fragments, about 512 tokens, and only looks at those on each step. Memory and latency stay almost flat no matter how many pages there are, and a table that starts on one page and continues on the next stays in one piece.

On Baidu's own tests with documents hundreds of pages long, the model scored 77.1, while the closest rival, Kimi-K3, got 33.7. On documents of a few dozen pages the gap is smaller: 84.6 against 78.3 for Qwen3.8-Max. The weak spot is visible too, heading hierarchy on long files is its lowest score. All numbers so far come from Baidu itself.

It has 3.3 billion parameters, the weights are about 6.7 GB, and the MIT license allows commercial use. Code is on GitHub, weights are on Hugging Face, and it runs through Transformers or SGLang on a single GPU.

If you still pick apart long PDFs by hand or pay for cloud OCR, this is worth a try.

Source: Telegram channel @xor_journal

Original source: Baidu, Unlimited-OCR 2 model card on Hugging Face