Learned Dynamic Prefill Chunk Fetching for Unbounded Multi-Page Document Parsing
Replace static full-document visual prefill caching with learned chunked KV retrieval so document parsers handle arbitrarily long books under fixed memory.
Source paper
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
Generated by AI. The paper’s authors did not write these.
Replace static full-document visual prefill caching with learned chunked KV retrieval so document parsers handle arbitrarily long books under fixed memory.
A method that dynamically allocates high-resolution visual tokens only to dense document regions during multi-page parsing to eliminate small-text repetition errors.
Build a real multi-page document benchmark and training corpus with cross-page tables and split paragraphs to test whether narrow sliding output windows preserve global document structure.
Test reference-anchored sliding window attention on long-form translation and speech recognition, adding sparse entity memory where local output windows lose global consistency.
Unlimited OCR addresses the memory and latency bottlenecks of long-horizon end-to-end document parsing, where standard LLM decoders accumulate linearly growing KV caches across dozens of pages. The authors introduce Reference Sliding Window Attention (R-SWA), enabling one-shot multi-page transcription with constant decode-side KV cache memory and generation speed while achieving state-of-the-art accuracy on OmniDocBench.
Building on DeepSeek OCR, which pairs a frozen 16x-compression DeepEncoder with a 3B-total and 0.5B-active MoE decoder, Unlimited OCR replaces all decoder multi-head attention layers with R-SWA. Each generated token attends to all static reference tokens (visual tokens and prompt) plus a causal sliding window of the most recent 128 decoded tokens, and the decoder is continue-trained for 4,000 steps on 2M single- and synthetic multi-page samples at 32K context length.