DeepSeek-OCR: Contexts Optical Compression

Haoran Wei, Yaofeng Sun, Yukun Li
10/21/2025
cs.CV

No official code found. Best implementation: deepseek-ai/DeepSeek-OCR (24,013 stars, MIT, last commit 2026-01-27). 2 more below.

Abstract

We present DeepSeek-OCR as an initial investigation into the feasibility of compressing long contexts via optical 2D mapping. DeepSeek-OCR consists of two components: DeepEncoder and DeepSeek3B-MoE-A570M as the decoder. Specifically, DeepEncoder serves as the core engine, designed to maintain low activations under high-resolution input while achieving high compression ratios to ensure an optimal and manageable number of vision tokens. Experiments show that when the number of text tokens is within 10 times that of vision tokens (i.e., a compression ratio < 10x), the model can achieve decoding (OCR) precision of 97%. Even at a compression ratio of 20x, the OCR accuracy still remains at about 60%. This shows considerable promise for research areas such as historical long-context compression and memory forgetting mechanisms in LLMs. Beyond this, DeepSeek-OCR also demonstrates high practical value. On OmniDocBench, it surpasses GOT-OCR2.0 (256 tokens/page) using only 100 vision tokens, and outperforms MinerU2.0 (6000+ tokens per page on average) while utilizing fewer than 800 vision tokens. In production, DeepSeek-OCR can generate training data for LLMs/VLMs at a scale of 200k+ pages per day (a single A100-40G). Codes and model weights are publicly accessible at http://github.com/deepseek-ai/DeepSeek-OCR.

View on arXivView PDF

Code Implementations(3)

MIT

Contexts Optical Compression

24,0132,204PythonOct 17, 20258 months agoMIT
MIT
00Oct 26, 202511 months agoMIT

deepseek-ocr contexts optical compression implementation

00PythonDec 4, 202510 months ago

Similar Papers

Cite this paper

@article{wei2025deepseekocr,
  title  = {DeepSeek-OCR: Contexts Optical Compression},
  author = {Haoran Wei and Yaofeng Sun and Yukun Li},
  year   = {2025},
  eprint = {2510.18234},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.18234v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.18234.svg)](https://codeofpaper.com/paper/2510.18234)

Discussion