Baidu releases Unlimited-OCR-2, using SR-SWA to parse documents of unbounded length in a finite context window
Baidu released Unlimited-OCR-2 on 2026-10-27. It introduces Sparse Reference Sliding Window Attention (SR-SWA), which Baidu says keeps per-step decoding latency and memory nearly constant regardless of document length. Baidu claims state-of-the-art results on MPDocBench and MarathonDocBench.
Baidu released Unlimited-OCR-2 on October 27, 2026, an OCR model built around Sparse Reference Sliding Window Attention (SR-SWA), which Baidu says allows unbounded document parsing within a finite context window. The weights are published at baidu/Unlimited-OCR-2 on Hugging Face.
What SR-SWA does
According to Baidu, SR-SWA compresses text-visual attention interactions from ultra-long sequences down to a fixed-size set of working references (for example, 512 tokens). Baidu says this bounds computational complexity and keeps per-step decoding latency and memory footprint nearly constant regardless of document length. Baidu describes the result as eliminating quadratic attention scaling and memory bottlenecks as documents grow.
Baidu frames the release as the move "from long- to unlimited-horizon parsing" and as pioneering an "OCR-3.0 era."
Benchmarks
Baidu claims state-of-the-art performance on both dozens-of-pages benchmarks (such as MPDocBench) and hundred-page benchmarks (such as MarathonDocBench). Numeric scores are not yet published. These results are Baidu's own claims.
Lineage
The original Unlimited-OCR was presented on June 22, 2026, with the stated aim of pushing Deepseek-OCR one step further. Since then it has gained:
- an arXiv paper (June 23)
- availability on ModelScope (June 23) and a Hugging Face Spaces demo (June 24)
- vLLM inference support (June 28)
- availability on Baidu Cloud (July 3)
- training support in ms-swift (July 21)
Inference
Unlimited-OCR-2 supports Transformers (native, for quick tests) and SGLang (recommended for serving). The Transformers path was tested on an NVIDIA A800-80GB with Python 3.10, torch 2.13.0 and transformers 4.52.1, and loads in bfloat16 with trust_remote_code=True.
Two modes are available:
- Multi-page (
infer_multi): all pages are parsed in one request so the model can use cross-page context. Each page is encoded as one global view (base mode), and the output contains one<PAGE>per input page. - Single-page (
infer): a page is encoded with dynamic tiling (gundam mode) by default.
For serving, Baidu provides a customized SGLang wheel (sglang-0.5.20.dev10+g8d62f5fb9c). Its example configuration uses page-window scheduling for very long documents, reusing the KV tail of the previous window, with 10 pages per window in both gundam and base modes. The per-page output cap is set to 20000 tokens. The example server runs with --mem-fraction-static 0.7 and --max-running-requests 64. Baidu notes that 0.75 leaves too little headroom at 32+ concurrent requests.
Baidu also notes a tradeoff: a smaller page window lowers peak memory but hurts cross-page merging, because blocks that continue across a window boundary lose their context. Setting SGLANG_UOCR_EANABLE_DOC_LIMIT=0 parses a whole document in one window.
The server exposes an OpenAI-compatible API. Requests use the prompt "<PAGE><image>" * num_pages + "Multi page parsing.", with max_tokens as the global output budget for the whole document.
Pricing not yet disclosed. Parameter count and context window size are not yet published.
What this means
Long-document OCR typically runs into attention cost and memory growth as page counts rise. Baidu's approach is to fix the working reference set, so per-step cost does not scale with document length. If the claimed MarathonDocBench results hold up under independent testing, this would matter for pipelines that parse hundred-page files in one pass.
The tradeoff is visible in the serving setup: page-window scheduling can cost cross-page merging when blocks span window boundaries. Teams parsing long documents should test window size against their own layouts. Without published scores, the SOTA claims cannot yet be checked.
Related Articles
Bria releases Fibo 2.0 Dev, an 8B open-weights model that unifies image editing and generation
Bria AI has released Fibo 2.0 Dev, an 8B-parameter model that handles both image editing and text-to-image in one set of weights. Bria says it ranks #1 in image editing and #2 in text-to-image among open-weights models on Artificial Analysis as of October 20, 2026. Weights are available for non-commercial use under CC BY-NC 4.0.
Kimi K3.1 Pro scores 55 on Artificial Analysis Index, fourth place behind Claude Opus 5.5, with API prices cut by a thir
Moonshot AI has released Kimi K3.1 Pro, which scores 55 on the Artificial Analysis Intelligence Index, an 11-point gain over Kimi K3 and fourth place overall. Parameter count is unchanged at 2.8 trillion, while API prices fall by 33 percent. Moonshot plans to release the weights by November 4, 2026.
Shanghai AI Lab releases Atria Dawn, a 512K-context agentic model built on 744B-parameter GLM-5.2
Shanghai Artificial Intelligence Laboratory has released Atria Dawn, a text-only agentic model with a 512K context window, built on the 744B-parameter MoE GLM-5.2 foundation model. The lab reports results on 25 benchmarks covering search, coding, tool use, productivity and security. Pricing is not yet disclosed.
MiniMax releases M3.1-Flash: 428B-parameter multimodal MoE with 1M-token context and weights on Hugging Face
MiniMax has published MiniMax-M3.1-Flash on Hugging Face: a native multimodal mixture-of-experts model with about 428B total parameters, 23B activated per token, and a context window of up to 1M tokens. It builds on MiniMax-M3 with sparse attention, quantization-aware training and DSpark speculative decoding.
Comments
Loading...