Baidu Open-Sources Unlimited OCR: R-SWA Keeps Memory Constant, Parses 40+ Pages in One Shot

aigclink · x · 2026-10-12

Baidu open-sourced Unlimited OCR (27k GitHub stars), a 3B MoE model (500M active params) fine-tuned from DeepSeek-OCR for end-to-end long-document parsing, deployable locally.

The core trick is R-SWA, mimicking a human scribe's working memory: every generated token always attends to all image visual tokens, but only looks back at the last 128 generated tokens, turning the KV cache into a fixed-capacity queue. Per-token attention cost no longer grows with output length — memory and compute stay constant whether outputting 10k or 100k tokens, and it's 35% faster than DeepSeek-OCR at 6k tokens.

Related event: Baidu Open-Sources Unlimited OCR for Long Document Parsing(2 posts)→

Original post →

More from Models

Models channel →