Reproduce “DeepSeek-OCR: Contexts Optical Compression” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Haoran Wei, Yaofeng Sun, Yukun Li

DeepSeek-OCR tests whether document text can be represented as an image using fewer vision tokens, then recovered by an OCR decoder. Its encoder compresses image tokens before decoding, and experiments measure OCR quality across token budgets. On Fox, one 100-token setting reached 96.8% precision at 9.7× compression; the tests do not establish that dialogue histories remain useful to an LLM.

Key insights

  • The visual modality can serve as an effective and quantifiable compression layer for textual information, allowing an image to represent rich text with substantially fewer tokens than its digital counterpart, thereby mitigating LLM long-context issues.
  • Balancing local visual detail perception (SAM) with global contextual understanding (CLIP) while drastically reducing token count via an intermediate compressor enables high-resolution input processing with minimal vision token overhead.
  • The concept of progressively downsizing rendered images to simulate 'optical forgetting' suggests a biologically inspired mechanism for creating theoretically unlimited context architectures in LLMs.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.