---
title: "Unlimited OCR Works"
canonical_url: "https://www.modelscope.cn/papers/299580"
md_url: "https://www.modelscope.cn/papers/299580.md"
arxiv_id: 2606.23050
published: 2026-06-22
last_updated: 2026-06-22
authors:
  - "Youyang Yin"
  - "Huanhuan Liu"
  - YY
  - "Qunyi Xie"
  - "Chaorun Liu"
  - "Shiqi Yang"
  - "Shaohua Wang"
  - "Zhanlong Liu"
  - "Hao Zou"
  - "Jinyue Chen"
  - "Shu Wei"
  - "Jingjing Wu"
  - "Mingxin Huang"
  - "Zhen Wu"
  - "Guibin Wang"
  - "Tengyu Du"
  - "Lei Jia"
model_name: "Unlimited OCR"
model_developer: "Baidu Inc."
domain:
  - "计算机视觉"
  - "自然语言处理"
  - "光学字符识别"
  - "文档解析"
  - "长序列建模"
type:
  - "计算机视觉"
  - "自然语言处理"
  - "光学字符识别"
  - "文档解析"
  - "长序列建模"
  - "Computer Vision and Pattern Recognition (cs.CV)"
  - "Computation and Language (cs.CL)"
arxiv_url: "https://arxiv.org/abs/2606.23050"
pdf_url: "https://arxiv.org/pdf/2606.23050"
code_link: "https://github.com/baidu/Unlimited-OCR"
---

# Unlimited OCR Works

> Recently, end-to-end OCR models, exemplified by DeepSeek OCR, have once again thrust OCR into the spotlight. A widely held view is that employing a large language model (LLM) as the decoder allows the model to leverage the prior distribution of language,…

「Unlimited OCR Works」是 ModelScope 魔搭社区收录的论文，arXiv 2606.23050，作者为 Youyang Yin, Huanhuan Liu, YY et al.，发表于 2026-06-22，属于 计算机视觉、自然语言处理、光学字符识别 领域。

- **ArXiv**: 2606.23050
- **Published**: 2026-06-22
- **Authors**: Youyang Yin, Huanhuan Liu, YY, Qunyi Xie, Chaorun Liu, Shiqi Yang, Shaohua Wang, Zhanlong Liu, Hao Zou, Jinyue Chen, Shu Wei, Jingjing Wu, Mingxin Huang, Zhen Wu, Guibin Wang, Tengyu Du, Lei Jia
- **Model**: Unlimited OCR
- **Developer**: Baidu Inc.
- **Domain**: 计算机视觉, 自然语言处理, 光学字符识别, 文档解析, 长序列建模
- **ArXiv URL**: https://arxiv.org/abs/2606.23050
- **PDF**: https://arxiv.org/pdf/2606.23050
- **Code**: https://github.com/baidu/Unlimited-OCR

Source: https://www.modelscope.cn/papers/299580

---

> Unlimited OCR Works Welcome the Era of One-shot Long-horizon Parsing

## 摘要

Unlimited OCR 是一种端到端的长文本OCR解析模型，旨在实现单次前向传播下数十页文档的解析。该模型基于 DeepSeek OCR 构建，引入了参考滑动窗口注意力机制（R-SWA），将解码器中的标准注意力层替换为R-SWA，从而在整个解码过程中保持恒定的KV缓存，显著降低了内存压力和计算成本。结合高压缩率的DeepEncoder，Unlimited OCR 能够在32K的标准最大长度下，实现整本书籍的连续解析，并在OmniDocBench等基准测试中取得了SOTA性能。

## Abstract

Recently, end-to-end OCR models, exemplified by DeepSeek OCR, have once again thrust OCR into the spotlight. A widely held view is that employing a large language model (LLM) as the decoder allows the model to leverage the prior distribution of language, leading to improved OCR performance. However, the downside is equally evident: as the output sequence lengthens, the accumulated KV cache drives up memory consumption and progressively slows down generation. This stands in stark contrast to humans, who exhibit no such decline in efficiency during long-horizon copying tasks. In this technical report, we propose Unlimited OCR, a model designed to emulate human parsing working memory. Taking DeepSeek OCR as the baseline, we replace all attention layers in the decoder with our proposed Reference Sliding Window Attention (R-SWA), which reduces attention computation costs while maintaining a constant KV cache throughout the entire decoding process. By combining the high compression rate of DeepSeek OCR's encoder with our constant KV cache design, Unlimited OCR can transcribe dozens of pages of documents in a single forward pass under a standard maximum length of 32K. More importantly, R-SWA is a general-purpose parsing attention mechanism - beyond OCR, it is equally applicable to tasks such as ASR, translation, etc. Codes and model weights are publicly available at http://github.com/baidu/Unlimited-OCR.
