What is DeepSeek-OCR 2
DeepSeek-OCR 2 is DeepSeek the second-generation OCR model launched by the team. By introducing the DeepEncoder V2 architecture, it achieves a paradigm shift from fixed scanning to semantic reasoning. The model adopts causal flow queries and a dual-stream attention mechanism, enabling dynamic reordering of visual Tokens and more accurately restoring the natural reading logic of complex documents. In the OmniDocBench v1.5 evaluation, the model achieved an overall score of 91.09%, compared withthe previous generationa significant improvement, while also significantly reducing the repetition rate of OCR recognition results, providing a new path for building a full-modal encoder in the future.
Main Features of DeepSeek-OCR 2
-
Complex document parsing: The model can accurately parse complex documents with tables, formulas, and multi-column layouts, restoring natural reading logic.
-
Efficient visual compression: Only 256 to 1120 visual Tokens are needed to cover complex document pages, significantly reducing computational overhead.
-
Dynamic semantic reordering: Through causal flow queries, the model dynamically adjusts the order of visual Tokens according to image semantics, breaking the limitations of traditional fixed scanning.
-
High-precision recognition: In the OmniDocBench v1.5 evaluation, the overall score reached 91.09%, a significant improvement over the previous generation, with outstanding performance in reading order recognition.
Technical Principles of DeepSeek-OCR 2
-
DeepEncoder V2 architecture:The visual tokenizer discretizes images into visual Tokens, using SAM-base and two convolutional layers, with an output dimension of 896.It introduces causal flow queries. Visual Tokens use bidirectional attention, while causal flow queries use causal attention, achieving semantic reordering.
-
Causal reasoning mechanism:Through causal flow queries, visual Tokens are dynamically reordered, enabling the encoder to dynamically adjust the order of Tokens according to image semantics.This mechanism is highly consistent with the unidirectional attention pattern of LLMs, allowing it to better align with continuous visual semantics.
-
Decoder:It continues to use DeepSeek-OCR's DeepSeek-MoE Decoder, with a parameter scale of 3 billion, and about 500 million parameters activated during inference.
-
Training process:It is divided into three stages: encoder pretraining, query enhancement, and decoder specialization, improving model performance through multi-stage optimization.
Project Address of DeepSeek-OCR 2
- GitHub repository:https://github.com/deepseek-ai/DeepSeek-OCR-2
- HuggingFace model library:https://huggingface.co/deepseek-ai/DeepSeek-OCR-2
- Technical paper:https://github.com/deepseek-ai/DeepSeek-OCR-2/blob/main/DeepSeek_OCR2_paper.pdf
Application Scenarios of DeepSeek-OCR 2
-
Document processing and digitization: The model can quickly convert paper documents into editable electronic documents, supporting high-precision recognition of complex layouts and multilingual content, and is suitable for digitization work in libraries, archives, and other institutions.
-
Academia and scientific research: It efficiently parses formulas, charts, and multi-column text in academic papers, helping researchers quickly extract key information and improving the efficiency of literature organization and data analysis.
-
Enterprise office automation: The model can automatically identify key information in documents such as contracts and reports, supporting rapid review, archiving, and retrieval of enterprise documents, improving office efficiency.
-
Education: It quickly digitizes documents such as textbooks and exam papers, supports online teaching and electronic exams, helps teachers and students organize academic materials, and improves teaching and learning efficiency.
-
Publishing and Media: The model quickly parses the complex layouts of magazines and newspapers, supports digital edition production and content distribution, and helps the media industry achieve efficient content creation and management.