メインコンテンツへスキップ

ナレッジベース

文書で答えを探し、原文で確かめる

デスクトップ版の PDF Craft で PDF や EPUB を読みながら、関連する箇所を検索したり、文書の内容を AI に質問したりできます。検索結果や回答の引用を開くと、該当箇所の原文を確認できます。

DeepSeek-OCR: Contexts Optical Compression

この論文は何を検証しようとしている?

AI 質問

著者らは、より少ない視覚トークンで長いテキストを表現できるかを検証しようとしています。

さらに、1,000 語の文書を復号するには最低いくつの視覚トークンが必要かを問うています。

論文の原文

1. Introduction

Current Large Language Models (LLMs) face significant computational challenges when processing long textual content due to quadratic scaling with sequence length. We explore a potential solution: leveraging visual modality as an efficient compression medium for textual information. A single image containing document text can represent rich information using substantially fewer tokens than the equivalent digital text, suggesting that optical compression through vision tokens could achieve much higher compression ratios.

This insight motivates us to reexamine vision-language models (VLMs) from an LLM-centric perspective, focusing on how vision encoders can enhance LLMs’ efficiency in processing textual information rather than basic VQA [12, 24, 32, 41, 16] what humans excel at. OCR tasks, as an intermediate modality bridging vision and language, provide an ideal testbed for this vision-text compression paradigm, as they establish a natural compression-decompression mapping between visual and textual representations while offering quantitative evaluation metrics.

Accordingly, we present DeepSeek-OCR, a VLM designed as a preliminary proof-of-concept for efficient vision-text compression. Our work makes three primary contributions:

First, we provide comprehensive quantitative analysis of vision-text token compression ratios. Our method achieves 96%+ OCR decoding precision at 9-10× text compression, ∼90% at 10-12× compression, and ∼60% at 20× compression on Fox [21] benchmarks featuring diverse document layouts (with actual accuracy being even higher when accounting for formatting differences between output and ground truth), as shown in Figure 1(a). The results demonstrate that compact language models can effectively learn to decode compressed visual representations, suggesting that larger LLMs could readily acquire similar capabilities through appropriate pretraining design.

Second, we introduce DeepEncoder, a novel architecture that maintains low activation memory and minimal vision tokens even with high-resolution inputs. It serially connects window attention and global attention encoder components through a 16× convolutional compressor. This design ensures that the window attention component processes a large number of vision tokens, while the compressor reduces vision tokens before they enter the dense global attention component, achieving effective memory and token compression.

Third, we develop DeepSeek-OCR based on DeepEncoder and DeepSeek3B-MoE [19, 20]. As shown in Figure 1(b), it achieves state-of-the-art performance within end-to-end models on OmniDocBench while using the fewest vision tokens. Additionally, we equip the model with capabilities for parsing charts, chemical formulas, simple geometric figures, and natural images to enhance its practical utility further. In production, DeepSeek-OCR can generate 33 million pages of data per day for LLMs or VLMs using 20 nodes (each with 8 A100-40G GPUs).

In summary, this work presents a preliminary exploration of using visual modality as an efficient compression medium for textual information processing in LLMs. Through DeepSeek-OCR, we demonstrate that vision-text compression can achieve significant token reduction (7-20×) for different historical context stages, offering a promising direction for addressing long-context challenges in large language models. Our quantitative analysis provides empirical guidelines for VLM token allocation optimization, while the proposed DeepEncoder architecture showcases practical feasibility with real-world deployment capabilities. Although focused on OCR as a proof-of-concept, this paradigm opens new possibilities for rethinking how vision and language modalities can be synergistically combined to enhance computational efficiency in large-scale text processing and agent systems.

閲覧例DeepSeek-OCR: Contexts Optical Compression (Wei, Sun & Li) CC BY 4.0

Wiki Graph が出典を残す仕組み

PDF Craft は Wiki Graph を使って文書の内容を整理し、原文の該当箇所と結び付けます。検索で関連箇所を見つけ、AI がそれらをつないで回答し、引用から各箇所を確認できます。

.wikg 形式には原文、章構成、インデックスを保存できます。独立した Wiki Graph CLI では、整えたテキストから公開エンティティや関係を抽出し、根拠となる原文に結び付けることもできます。

.wikg 形式の仕様を見る

デスクトップ版 PDF Craft で文書を開く

デスクトップ版をダウンロード