Baidu opens OCR 2 for long PDFs and cross-page tables
3-line summary
- The release handles tables and paragraphs spanning page breaks.
- A downloadable model and hosted beta are available.
- The hosted API accepts PDFs of up to 500 pages.
Baidu released Unlimited OCR 2 on October 27, opening a document-reading model intended to preserve tables and paragraphs across long PDFs. The launch provides both downloadable model access and a hosted public beta through Baidu’s cloud service.
The accompanying conversion documentation explains how the output becomes usable. The model emits a string of layout blocks; a separate post-processing tool turns that into Markdown. It merges table fragments across pages and removes repeated header rows. Blank pages remain in place to preserve page numbering, while figures become references containing their page number and coordinates. This produces a structured document for subsequent search or review. Headings are converted according to their marked hierarchy level. Tables retain HTML structure, and columns on the same page are grouped in reading order.
The checkpoint has about three billion parameters. Its model card provides a way to submit an ordered set of page images in one request, allowing cross-page context to inform the output and saving the results as files.
The technical report describes processing overlapping groups of pages sequentially. Computation records for boundary pages carry into the next group to preserve continuity; inactive records are released. The model also selects relevant visual information from distant pages.
For single-document inference, the authors report reducing peak KV-cache memory from 47.00 GB to 1.77 GB. This measures temporary computation records, rather than the complete memory needed to load and run the model.
Baidu also released MarathonDocBench: 100 documents of roughly 100–300 pages, containing about 18,000 pages of mixed Chinese and English material. Annotations cover heading structure, reading order and cross-page continuations. Its published overall score of 77.06 averages eight metrics.
The comparison sends whole documents to competing services. Inputs that fail because of size or response limits remain empty predictions in the 100-document denominator, so scores reflect service limits as well as recognition quality. Annotations and tooling references use Apache 2.0; source page images are supplied for academic and research use.
The checkpoint’s model card lists MIT licensing. The repository’s permission notice allows using, copying, modifying, redistributing and selling the software. Copies or substantial portions must retain the copyright and permission notices. The software comes without warranties, including warranties of merchantability or fitness for a particular purpose.
The documented local test used an NVIDIA A800 with 80 GB of memory. Baidu distinguishes quick tests from a serving-oriented implementation. Its serving guidance notes a trade-off: smaller page groups lower memory use but can hurt cross-page merging. That tested configuration establishes an example environment; deployment minimums remain unspecified.
The hosted API returns JSON or Markdown. It accepts PDFs of up to 500 pages, with a 100 MB limit when a file is supplied by URL. Processing is asynchronous: submission returns a task identifier, and a separate query checks for completed results.
Baidu describes the interface as temporarily free, with test allowances of 200 pages for verified individual accounts and 1,000 for verified businesses. Result download links remain valid for 30 days. The document gives no end date or subsequent price. These hosted-service conditions apply separately from running the released model locally.
The report identifies heading hierarchy as an outstanding limitation: selective attention can lose global document information. Increasing the diversity of training documents is another area the authors identify for further work.
Sources
- Unlimited OCR 2 — open-source release and public beta — Baidu AI
- Unlimited-OCR-2 model card — Baidu / Hugging Face
- Unlimited OCR Works 2 — technical report — Baidu ERNIE Team
- MarathonDocBench — dataset, evaluation and license — Baidu / Hugging Face
- Unlimited-OCR — MIT License — Baidu
- Document parsing (Unlimited-OCR) — API documentation — Baidu AI Cloud
- Unlimited OCR 2 — post-processing and benchmark reproduction — Baidu