DeepSeekDeepSeek OCR

DeepSeek OCR 2

DeepSeek OCR 2 is a document extraction model with published weights and inference code. Its examples distinguish layout-aware Markdown conversion from plain text recognition.

The encoder changes the reading order

DeepEncoder V2 can reorder visual tokens according to image content. The research contrasts this with a fixed scan from the top left to the bottom right. The reordered sequence then goes to the language model for interpretation.DeepSeek OCR 2 paper and publication record

Crops affect the visual-token budget

The documented default assigns 144 visual tokens to each crop and 256 to the whole image. The repository includes PDF processing and accelerated inference guidance.DeepSeek OCR 2 model cardDeepSeek OCR 2 inference code

Practical guidance. A dense page and a simple letter can need different image treatment. Keep the source page alongside extracted text so a reviewer can inspect small numbers, merged columns and missing footnotes.

Use the model-specific inference path

The model card’s example loads custom model code, applies the image prompt and calls model.infer.DeepSeek OCR 2 model card

Practical guidance. A generic text-generation example is not a complete document pipeline. Include image preparation, page ordering, output parsing and error reporting in the integration.

Specifications & access

DeepSeek OCR 2 specifications
DetailValue and conditions
Launch dateJanuary 2026
AccessDownloadable
Model identifiersdeepseek-ai/DeepSeek-OCR-2
LicenseApache 2.0.DeepSeek OCR 2 model card
Default visual inputUp to six 768 × 768 crops plus one 1024 × 1024 image.DeepSeek OCR 2 model card
Output modesDocument-to-Markdown with grounding, or plain OCR without layout.DeepSeek OCR 2 inference code

Related models

  • Multimodal mixture-of-experts model with a causal encoder-decoder design and separate computation budgets for reading input and generating text.

    Launch date API · Downloadable
  • The larger Janus Pro model combines image understanding and image generation through separate visual encoders and a shared language model.

    Launch date Research releaseDownloadable