Open Source
Open Source

Unlimited OCR 2 Open-Sourced by Baidu: 3600 Pages in One Go

Baidu released and open-sourced Unlimited OCR 2 on October 27 (repo github.com/baidu/Unlimited-OCR, MIT license, weights also on Hugging Face and ModelScope): it targets any-page-count document parsing, officially demoed ingesting all seven Harry Potter books — 3,600-plus pages — in one pass, scoring 84.6 on MPDocBench and 77.1 on the 100-page-class MarathonDocBench for end-to-end SOTA on both (technical report exact values 84.59/77.06; runner-up Kimi-K3 at just 33.74). SR-SWA (Sparse Reference Sliding Window Attention) mimics how humans copy books — looking back only when needed — with single-step decoding at 7x Full Attention and 5.6x the previous R-SWA; per the technical report, peak KV cache on 100-page tests drops from 47GB to 1.77GB (minus 96.2 percent) and 16-way concurrent throughput rises 3.65x, all self-reported pending reproduction. Three product capabilities: native layout-element segmentation, cross-page table merging, and seamless cross-page paragraph continuation. Generation one once topped four boards in a day, passed 10 million cumulative HF downloads, and earned a LeCun repost; generation two climbed to 29,757 stars in three days (measured Oct 30; official announcement said 28,500). Honesty corner: HeadingTEDS is only 48.20, so beware if you depend on heading trees; the 3B/500M-active parameter count is a third-party report the vendor has not confirmed; deployment of gen two recommends SGLang (vLLM support belongs to gen one). Division of labor with the site's six-way OCR review and GLM-OCR/DeepSeek-OCR pieces: those cover single pages to dozens; this one covers any page count.

Published October 30, 202610 min read
<!-- unlimited-ocr-2-opensource-resource | open-source | Unlimited OCR 2 Open-Sourced by Baidu: 3600 Pages in One Go -->

Feed all seven Harry Potter books to a single open-source model: more than 3,600 pages in total, cross-page tables that never break, paragraphs that continue seamlessly across page turns, finished in roughly an hour and a half. That is the official demo behind Unlimited OCR 2, released and open-sourced by Baidu on October 27, 2026. Code and weights are both public: the repository lives at github.com/baidu/Unlimited-OCR, with weights mirrored on Hugging Face as baidu/Unlimited-OCR-2 and on ModelScope as PaddlePaddle/Unlimited-OCR-2. Repo address: github.com/baidu/Unlimited-OCR.

A quick note on scope: we have already covered a six-model open-source OCR comparison (/en/posts/opensource-ocr-models-comparison-review), a deep dive into the 0.9B GLM-OCR (/en/posts/glm-ocr-opensource-resource), and a deployment guide for DeepSeek-OCR's compression route (/en/posts/deepseek-ocr-local-deploy-sop). Those pieces deal with single pages and a few dozen pages. This article covers a different dimension entirely: ultra-long documents, any page count, a whole book in one shot.

Repo and License: MIT, No Strings Attached

The most practical question first. The LICENSE file, checked verbatim, is a standard MIT License with the copyright line "Copyright (c) 2026 Baidu" and no additional commercial restrictions. In plain terms: you can use it commercially, modify it, redistribute it, and deploy it offline on your own hardware; the only obligation is keeping the copyright and license notice. Among open-weight models that ship with "research only" strings attached, this is about as clean as it gets, though MIT's built-in disclaimer still applies, so do not oversell it as "no restrictions at all."

The timeline is worth a glance too. The repository was created on June 18, 2026; the first generation launched on June 22; the second generation arrived in the same repository on October 27, landing simultaneously on ModelScope and Baidu AI Cloud. As for heat, the official announcement cited 28,500 GitHub stars (Oct 27), and a direct check on Oct 30 counted 29,757 — three days of organic growth, still climbing. Baidu has also scheduled a deeper showcase at Baidu World 2026 on November 12.

Benchmarks: Two First Places and One Glaring Gap

According to the official announcement, Unlimited OCR 2 scored 84.6 on MPDocBench and 77.1 on MarathonDocBench, a hundred-page-class benchmark, both end-to-end best in class and clearly ahead of Qwen 3.8-Max, Gemini-3.8-Flash, GLM-5.3-Flash, and DeepSeek-4.1-Flash among the listed entrants. The technical report's precise values are 84.59 and 77.06; the announcement simply rounds them, so the two figures share one source and do not conflict.

The gap to second place is striking. Among the models listed in the report, the runner-up on MarathonDocBench, Kimi-K3, scored just 33.74 — more than forty points behind. On long-document parsing, the distance between a purpose-built architecture and the general-purpose giants is less a gap than a cliff.

But that score needs a qualifier attached: MarathonDocBench is a benchmark Baidu built itself — 100 documents, each 103 to 300 pages, 205,000 annotated elements, annotated with an in-house pipeline, with the benchmark not publicly downloadable at release. The report includes no "split the document and stitch the results" baseline, and as of writing every score is self-reported with no independent third-party reproduction. "First on both boards" is true on Baidu's own turf; independent verification remains pending.

The demo numbers can sit alongside: the official demo parsed all seven Harry Potter books, 3,600+ pages in total; third-party accounts give the precise figure of 3,623 pages, about 1 hour 30 minutes, roughly 1.5 seconds per page. Baidu also demonstrated a combined Four Great Classical Novels volume at 5,026 pages and The Three-Body Problem at 1,200-plus pages.

SR-SWA: Attention That Copies Notes Like a Human

Why is long-document parsing hard? Attention. Full Attention re-reads every visual token in front of it at every decoding step, so the cost grows with the document. Humans do not read that way — someone copying a book keeps their eyes on the current page and flips back only to verify a detail or chase a cross-page reference.

SR-SWA (Sparse Reference Sliding Window Attention) borrows exactly that habit: it compresses text-vision attention interaction into a fixed-size working reference set of about 512 tokens, so single-step decoding latency and VRAM usage barely change with document length. It works in two stages. A Page Gate first narrows each query's visual reference scope from the whole document down to the relevant pages, modeling cross-page positional relations; then Token Buckets pick the highest-scoring buckets of visual tokens to capture long-range dependencies. Third-party technical breakdowns add detail: within candidate pages, every 32 tokens are compressed into a summary key to compute relevance, top-k blocks enter the reference set, and the routing scores participate directly in end-to-end training — no separately distilled router needed.

Decoding pairs this with Unlimited-Horizon Decoding: the document advances in page windows, adjacent windows keep one boundary page whose KV cache is reused to stitch cross-page paragraphs and continued tables, and past windows release their cache from VRAM. At any instant, VRAM holds exactly one window — that is the foundation of the "any page count" claim.

The line separating this from the first generation's R-SWA: R-SWA compressed only the text history into a sliding window and left visual tokens growing with page count, capping input at roughly 40 pages. Generation 2 also bounds how many visual tokens each step sees, which is what licenses the word "unlimited." One more boundary note for context: DeepSeek-OCR, covered previously on this site, lowers token counts through visual compression; SR-SWA controls the attention scope through sparse references. Two different routes toward a similar goal.

Three Product Capabilities: Layout, Cross-Page Tables, Cross-Page Paragraphs

First, native layout parsing. Titles, paragraphs, tables, formulas, and images are segmented automatically, delivered with bounding boxes, block types, and structural hierarchy, with output order matching reading order — downstream RAG or structured ingestion does not need to reassemble the page.

Second, cross-page table merging. Financial reports routinely run consolidated tables across page breaks; the model recognizes the continuation and merges them into one complete table. On the report's T-Table sub-score it reaches 71.11 while no general-purpose model listed exceeds 27 — the lead here is wider than the headline total.

Third, cross-page paragraph continuation. The unbounded-horizon decoding paradigm reconnects paragraphs severed by page breaks at the semantic level, with the official claim of no dropped characters, no scrambled order, no duplication. At book scale, this matters more than single-page accuracy.

Efficiency: The VRAM and Speed Ledger

By official figures, in the hundred-page scenario SR-SWA's single-step decoding runs 7 times faster than Full Attention and 5.6 times faster than the first generation's R-SWA. According to the technical report, peak KV cache in a hundred-page single-sequence test fell from 47GB to 1.77GB, a reduction of about 96.2%, and end-to-end throughput at 16-way concurrency rose from 360 TPS to 1315 TPS, roughly 3.65 times. Two caveats: the 1.77GB covers only the KV cache, not the model weights, so do not convert it into "runs in 4GB of VRAM"; and all of these efficiency numbers are self-reported, with no third-party reproduction yet.

"Unlimited" deserves its quotation marks. Baidu itself acknowledges that image encoding and total runtime still grow with page count — what stays constant is the per-step cost, not the total time. One and a half hours for 3,600 pages is that boundary in plain numbers.

Community Traction: The Inheritance from Generation One

This family is not a newcomer. Generation one launched on June 22, 2026, and the next day topped four boards at once: GitHub Daily Trending overall and Python, plus Hugging Face's global model trending and multimodal trending charts. It crossed 10,000 GitHub stars within five days of open-sourcing. Per China Science Daily, the first generation has surpassed 10 million cumulative Hugging Face downloads, and it received a repost recommendation from Turing Award winner Yann LeCun. Generation two entered with that head start and added nearly 3,000 stars in three days.

Deployment: Two Routes and a Few Potholes

Two inference routes. Route one is native Transformers for quick tests: Python 3.10, torch 2.13.0, transformers 4.52.1; loading the model requires trust_remote_code=True because the custom modeling code lives in the repository, and that code should be audited before production use. Multi-page input goes through infer_multi, which takes the whole document in one request; single-page input defaults to the dynamic slicing "gundam" mode.

Route two is serving, where the official recommendation is a customized SGLang build with an OpenAI-compatible API and page-window scheduling of 10 pages per block, adjacent blocks sharing boundary-page KV. Do not confuse this with generation one: vLLM support is a June 28 record belonging to the first generation, and the generation-two README lists only Transformers and SGLang. Deployment requires installing the repository's custom SGLang wheel; use the latest version stated in the README and build a dedicated environment to avoid conflicts.

Several VRAM-related potholes come straight from the README notes: mem-fraction-static is recommended at 0.7 (0.75 leaves too little headroom above 32-way concurrency); the SAM attention bias defaults to 512-token chunks that permit a single allocation of roughly 462MiB and can OOM — setting SGLANG_OPT_UOCR_SAM_REL_POS_BIAS_MB=64 is equivalent with a lower peak; smaller page windows save VRAM but degrade cross-page merging quality, so block size is a knob to tune per document. One more curiosity: the page-window scheduling variable SGLANG_UOCR_EANABLE_DOC_LIMIT contains "EANABLE" exactly as written in the README — not a typo to fix.

On resource floors: the parameter count exists only as third-party reporting — roughly 3B total with about 500M activated per inference, officially unpublished and commonly read as a MoE structure. Quote it with that qualifier or not at all. The officially disclosed test environment is an NVIDIA A800-80GB; minimum VRAM requirements are unpublished, and a third-party estimate that a 12GB consumer card can run it (the 1.77GB KV cache plus roughly 3B of weights) remains unconfirmed. No official AWQ/GPTQ/int4 quantized releases exist as of writing.

Shortcomings and Boundaries: What the Authors Themselves Admit

Start with a point for honesty: the technical report concedes that MarathonDocBench's HeadingTEDS score for heading hierarchy is just 48.20, the lowest of all its metrics — sparse attention does not preserve global information, so document-level structural understanding is limited, and the stated next step is adding linear attention. If your pipeline depends heavily on heading trees, treat this version with care.

Single-page accuracy is not the selling point either: on OmniDocBench v1.6 it scores 94.02, only 0.1 above generation one, while specialized 0.8B to 4B OCR models score higher on the same board (TeleOCR 96.91, OvisOCR2 96.47). The value is length, not single-page precision — for that, see our six-model comparison.

Stack on the earlier caveats — a self-built benchmark with no independent reproduction, self-reported efficiency numbers — and the selection verdict writes itself: if you hold whole books, full financial report volumes, or entire ledgers that must be structured in one pass, and you can start from A800-class hardware or pressure-test VRAM yourself, Unlimited OCR 2 currently has almost no open-source rival. If your work is single-page tickets and a few-page contracts, it is a sledgehammer cracking nuts.

FAQ

Q1: Where can I download Unlimited OCR 2? What are the GitHub and Hugging Face links? Code and weights live in the GitHub repository github.com/baidu/Unlimited-OCR; weights are mirrored on Hugging Face as baidu/Unlimited-OCR-2 and on ModelScope as PaddlePaddle/Unlimited-OCR-2, with managed access on Baidu AI Cloud and the Baidu AI open platform.

Q2: Is Unlimited OCR 2 free for commercial use? What license does it use? The repository ships a standard MIT License (Copyright (c) 2026 Baidu): commercial use, modification, and redistribution are all allowed, with the sole obligation of keeping the copyright and license notice. MIT's disclaimer still applies.

Q3: How much VRAM do I need to run Unlimited OCR 2? The official test environment is an NVIDIA A800-80GB and the minimum VRAM requirement is unpublished. A third-party estimate suggests a 12GB consumer card may work, but it is unconfirmed. Note that the 1.77GB KV cache figure excludes model weights.

Q4: How is Unlimited OCR 2 different from traditional OCR pipelines like PaddleOCR? Traditional pipelines process page by page; Unlimited OCR 2 uses SR-SWA sparse attention to push the limit to any page count, with cross-page table merging and paragraph continuation as headline features. On single-page accuracy (OmniDocBench v1.6: 94.02) specialized small models still score higher — choose by your document length.

Q5: How many pages can Unlimited OCR 2 parse in one go? It is officially positioned for any page count, demonstrated on 3,600+ Harry Potter pages and a 5,026-page classics compilation. Total runtime still grows with page count — about 1.5 hours for 3,600 pages — so it is not infinitely fast.

Related reading

This article is AI-assisted and human-edited. Last updated: 2026-10-30

FAQ

Where can I download Unlimited OCR 2? What are the GitHub and Hugging Face links?
Code and weights live in the GitHub repository github.com/baidu/Unlimited-OCR; weights are mirrored on Hugging Face as baidu/Unlimited-OCR-2 and on ModelScope as PaddlePaddle/Unlimited-OCR-2, with managed access on Baidu AI Cloud and the Baidu AI open platform.
Is Unlimited OCR 2 free for commercial use? What license does it use?
The repository ships a standard MIT License (Copyright (c) 2026 Baidu): commercial use, modification, and redistribution are all allowed, with the sole obligation of keeping the copyright and license notice. MIT's disclaimer still applies.
How much VRAM do I need to run Unlimited OCR 2?
The official test environment is an NVIDIA A800-80GB and the minimum VRAM requirement is unpublished. A third-party estimate suggests a 12GB consumer card may work, but it is unconfirmed. Note that the 1.77GB KV cache figure excludes model weights.
How is Unlimited OCR 2 different from traditional OCR pipelines like PaddleOCR?
Traditional pipelines process page by page; Unlimited OCR 2 uses SR-SWA sparse attention to push the limit to any page count, with cross-page table merging and paragraph continuation as headline features. On single-page accuracy (OmniDocBench v1.6: 94.02) specialized small models still score higher — choose by your document length.
How many pages can Unlimited OCR 2 parse in one go?
It is officially positioned for any page count, demonstrated on 3,600+ Harry Potter pages and a 5,026-page classics compilation. Total runtime still grows with page count — about 1.5 hours for 3,600 pages — so it is not infinitely fast.

Related

Open Source

A 0.9B Model Just Topped the OCR Leaderboard: How Real Is It?

GLM-OCR, open-sourced by Zhipu on February 3, 2026, has only 0.9B parameters (a 0.4B CogViT encoder plus a 0.5B GLM decoder) yet scored 94.62 on the vendor-reported OmniDocBench v1.5 board, above Gemini-3 Pro's 90.33 and GPT-4o's 75.02, with official cost at roughly one-tenth of traditional pipelines. This deep dive covers the three-way license split (weights MIT, code and PP-DocLayoutV3 Apache-2.0), the MTP design worth about 50 percent throughput, three verdicts on how real the top score is (PaddleOCR-VL-1.6 has since passed it, cross-board numbers are not comparable, and the official tagline contradicts its own table), the 37.6 percent weakness on aged scans, and four ways to run it: SDK, vLLM, SGLang, and Ollama.

Oct 25, 202611 min read
Open Source

Whisper's rival is here: NVIDIA tops the open ASR board

NVIDIA open-weighted Nemotron 3.5 Transcribe on October 28 (repo name 30B-A4B; per the model card 34B total parameters including the audio encoder with only about 4.3B active per step, on a Lightning 30B-A3B language backbone): transcription in 40 languages, translation across 31, speaker attribution in 13, one-hour audio with up to 8 speakers, and a batch-only offline design with no streaming (a separate 0.6B sibling handles streaming). Two official accuracy figures coexist: 4.71 percent mean English WER on the model card's nine public sets (versus Qwen3-ASR-1.7B at 4.94) and 5.33 on the leaderboard site (private held-out sets added since October 9); Artificial Analysis independently measured 2.81 percent, close to Voxtral Small's 2.77 despite activating roughly a sixth of the parameters. The OpenMDW-1.1 license (a Linux Foundation permissive license) allows free commercial use, redistribution and fine-tuning; weights ship in BF16/FP8/NVFP4/GGUF, with GGUF targeting NeMo-Speech.cpp though the launch blog still called quantized versions coming soon — weights posted does not mean local tooling ready. Training data Granary v2 lists 463,062 public-manifest hours across 48 languages (about 840k fully processed is a separate figure). Division of labor with the site's Hy-SimulMT interpretation piece: transcription is dictation, not real-time translation.

Oct 29, 202611 min read
Open Source

Tencent Open-Sourced Simultaneous Interpretation: 3s Lag

Tencent Hunyuan open-sourced the simultaneous interpretation model Hy-SimulMT on October 26 (30B-A3B, about 30.39B parameters per the HF weights with 128 experts and 8 activated per token): real-time Chinese-English speech translation with StreamLAAL of about 3 seconds on the RealSI long-form benchmark (the project notes this is not the wait before the first translated word), a GEMBA of roughly 85-86 per the official comparison chart (scored by GPT6.1-Sol) beating the compared open models and 4 of 5 commercial APIs, and lower latency than six CATTI-certified interpreters (4.5/4.7 seconds) across an 18-recording small-scale test. Key correction: the base checkpoint outputs translated text only — speech output and voice cloning need a separate TTS service (the official recipe uses Qwen3-TTS), and the 3-second figure excludes synthesis. License in one line: Apache-2.0 per the LICENSE file with third-party exceptions (only Qwen3-ASR-0.6B) and no extra restrictions, while GitHub shows NOASSERTION due to the custom license filename. Six builds (BF16/FP8/GGUF/Interleave), an official anchor of about 57 GiB on a single H200 for BF16, GGUF minimums unpublished; tooling includes SimulInfer/SimulTrain, llama.cpp support is PR #31198 (unmerged), and single files cap at 30 seconds.

Oct 28, 202612 min read