Vai al contenuto principale

Base di conoscenza

Trova le risposte e verificale nel testo originale

Leggi PDF ed EPUB in PDF Craft per desktop. Cerca i passaggi pertinenti o chiedi all’IA di spiegarti il documento. Apri un risultato o una citazione per consultare il testo originale.

DeepSeek-OCR: Contexts Optical Compression

Che cosa vuole verificare questo studio?

Domande all’IA

Gli autori vogliono verificare se è possibile rappresentare testi lunghi con meno token visivi.

Si chiedono poi quanti token visivi siano necessari, come minimo, per decodificare un documento di 1.000 parole.

Testo originale

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.

Esempio di letturaDeepSeek-OCR: Contexts Optical Compression (Wei, Sun & Li) CC BY 4.0

Come Wiki Graph conserva le fonti

PDF Craft usa Wiki Graph per organizzare il contenuto e collegarlo ai passaggi originali. La ricerca trova i passaggi pertinenti, l’IA li collega in una risposta e le citazioni ti permettono di verificare ogni punto.

Il formato .wikg può contenere il testo originale, la struttura dei capitoli e gli indici. La CLI autonoma di Wiki Graph può anche estrarre entità pubbliche e relazioni da testi preparati e collegarle ai passaggi che le documentano.

Consulta la specifica del formato .wikg

Apri i tuoi documenti in PDF Craft per desktop

Scarica per desktop