DeepSeek-OCR:上下文光学压缩

DeepSeek-OCR: Contexts Optical Compression

深度求索 DeepSeek-AI · DeepSeek · 2025-10-21 · arXiv:2510.18234 ↗ · 被引 144

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

我们提出 DeepSeek-OCR,作为通过光学二维映射压缩长上下文可行性的初步研究。DeepSeek-OCR 由两个组件组成:DeepEncoder 作为核心引擎,旨在高分辨率输入下保持低激活值,同时实现高压缩比以确保最佳且可控的视觉令牌数量;以及 DeepSeek3B-MoE-A570M 作为解码器。实验表明,当文本令牌数量在视觉令牌的 10 倍以内(即压缩比<10 倍)时,模型可实现 97%的解码(OCR)精度。即使在 20 倍压缩比下,OCR 精度仍保持在约 60%。这为历史长上下文压缩和 LLM 记忆遗忘机制等研究领域展示了巨大潜力。此外,DeepSeek-OCR 还展示了高实用价值。在 OmniDocBench 上,它仅使用 100 个视觉令牌就超越了 GOT-OCR2.0(每页 256 个令牌),并在使用少于 800 个视觉令牌的情况下优于 MinerU2.0(平均每页 6000+令牌)。在生产中,DeepSeek-OCR 每天可为 LLM/VLM 生成 20 万页以上的训练数据(单张 A100-40G)。代码和模型权重已在 http://github.com/deepseek-ai/DeepSeek-OCR 公开。

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 &lt; 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.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 14)

阅读逐段中英对照全文 →