Skip to content
IFAI

Open source

Baidu drops Unlimited OCR 2 to read entire books at once

Published Reach 48

Baidu just open-sourced Unlimited OCR 2, a 3B document-parsing model that can ingest thousands of pages in a single request. By revamping attention with SR-SWA, it keeps memory and latency stable over massive documents, automatically stitching together cross-page tables and split text. It easily fits on consumer GPUs, meaning you no longer have to chop books into pieces just to digitize them.

Baidu drops Unlimited OCR 2 to read entire books at once
Image: hub.baai.ac.cn

Baidu just open-sourced Unlimited OCR 2, a 3B vision-document parsing model built specifically to swallow massive documents in a single bite. Instead of chopping a long PDF into individual pages, you can pass an entire book through a single request and get structured digital text back.

What it can do

Most OCR tools process pages in isolation. When a large table spans two pages or a sentence gets sliced in half by a page break, conventional pipelines lose the thread and output a jumbled mess.

Unlimited OCR 2 fixes this by ingesting multi-page inputs together. It delivers structured output out of the box, detecting titles, paragraphs, tables, formulas, and images alongside their bounding boxes and layout hierarchy.

More crucially, it glues split content back together. Fragmented cross-page tables are merged into a single coherent sheet, and text interrupted by page numbers is smoothly reconnected without duplicate words or lost context.

In testing, Baidu ran all seven books of the Harry Potter series—over 3,600 pages—through the model in one go. On public benchmarks, it posted 84.6 on MPDocBench and 77.1 on MarathonDocBench, beating out larger models like Qwen 3.8-Max, Gemini-3.8-Flash, GLM-5.3-Flash, and DeepSeek-4.1-Flash.

How to run it and hardware needs

The model sits at just 3B parameters and weighs around 6.9GB on disk, making it lightweight enough to fit easily on standard consumer GPUs.

Instead of crudely stretching the context window, the team introduced SR-SWA attention paired with an unlimited-horizon decoding scheme. This tames visual token computation and memory overhead over extremely long sequences.

As a result, single-token latency and VRAM usage stay relatively flat, avoiding the performance degradation where the parser crawls to a halt after a few dozen pages.

Full instructions and weights are available on the project page, with native deployment support for Transformers and SGLang.

Why it matters

If you deal with hefty prospectuses, legal archives, or research papers for local RAG pipelines, Unlimited OCR 2 is worth testing immediately. It replaces fragile multi-stage workflows—page slicing, text extraction, rule-based table stitching—with a single end-to-end call on consumer hardware.

It also highlights that a tightly focused 3B model can run rings around frontier generalist models when equipped with the right attention architecture. Still, running thousands of pages end-to-end means edge cases matter: degraded scans and bizarre document layouts will be the true test for how reliably it can reconstruct cross-page context in production.

Sources (2)

  1. [1]
  2. [2]
    youtube.com(opens in a new tab)Reportyoutube.com

Similar events

Past happenings like this one, for context.

Best of AI, daily