文心 Unlimited OCR 2 processes 3,623-page Harry Potter in 90 minutes
The key detail is architectural: by capping what each step references, the model removes the quadratic memory blow-up that plagues whole-document OCR, dropping peak VRAM from 47 GB to 1.77 GB. Practitioners processing long PDFs, scanned books or archives should compare its 77.06 benchmark score against their current pipeline. It is open-source, so teams can test it against alternatives like general multimodal models before committing to a page-splitting workflow.
文心 Unlimited OCR 2, an open-source OCR project by Baidu's 文心 (ERNIE) team, processes entire long documents without splitting or stitching. The author ingested all seven Harry Potter books (3,623 pages) in 1 hour 30 minutes, and a 1,600-page copy of 《平凡的世界》 in 40 minutes. Its SR-SWA mechanism (Sparse Reference Sliding Window Attention) uses Page Gate to select relevant pages and Token Sieve to pick top-k chunks, keeping reference content fixed regardless of document length. On 100-300 page evaluations it scored 77.06, versus a top general-purpose model score of 33.74, with single-step decoding 7.0x faster than full attention and peak memory cut from 47 GB to 1.77 GB.
兄弟们,做过三次 OCR 横评的我说句实话。(看视频)
文心 Unlimited OCR 2,可能是今年最被低估的OCR类的开源项目。
3623 页的《哈利·波特》七部曲,整本丢进去,不切分、不拼接,1 小时 30 分读到最后一页。
1222 页的《三体》,50 分钟,我实测了《平凡的世界》1600页,40分钟完成可下载的txt。
以前的 OCR 卡在哪? 每写一个字,都要回头把前面所有页面再看一遍。 页数翻倍,要看的东西也翻倍。
它换了个思路,像人抄书一样:
→ Page Gate 先圈出相关的页 → Token Sieve 再挑出最相关的 top-k 块 → 每一步要参考的内容固定,文档再长也不变 这套机制叫 SR-SWA,稀疏参考滑动窗口注意力。
结果:
→ 百页文档单步解码,比全注意力快 7.0 倍 → 峰值显存从 47 GB 降到 1.77 GB → 100 到 300 页的评测拿到 77.06 分,通用大模型最高 33.74
开源地址评论区👇🏻