SAVRN
Search Contact SAVRN

Open-weight model · Image and text to text

DeepSeek-OCR-2

by DeepSeek deepseek-ai/DeepSeek-OCR-2

Inference using Huggingface transformers on NVIDIA GPUs. Requirements tested on python 3.12.9 + CUDA11.8: Refer to GitHub for guidance on model inference acceleration and PDF processing, etc.

Parameters3.4B
Context8,192
Weights6.8 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads899.3k

Runs On

What it takes to serve DeepSeek-OCR-2 (3.4B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 6.8 GB 8.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 3.4 GB 4.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 1.7 GB 2.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

SAVRN's Notes on DeepSeek-OCR-2

Documents arrive as pages, and 8,192 tokens of context is a page-sized window, so this runs as a queue of pages, not a book in one pass. At 16-bit it needs 8.1 GB of memory; at 4-bit, 2.0 GB. Its 3.4B parameters sit in 64 routed experts with 6 active per token. On the cheapest listing, one 192 GB MI300X at $1.85 an hour, memory is not the limit; pages per hour is what you are paying for.

Apache 2.0 permits commercial use, modification and redistribution, with notices kept, changes stated and a patent grant. Check the stack first. The publisher tested on NVIDIA GPUs with CUDA 11.8 and Python 3.12.9, and the cheapest Index listing is an MI300X, so prove it on your hardware before booking hours. The scores on this page are third-party reported and run from 61.28 on skewed pages to 89.59 on scans.

Model Card

By DeepSeek, published under apache-2.0, revision aaa02f381194.

Github | Model Download | Paper Link | Arxiv Paper Link |

DeepSeek-OCR 2: Visual Causal Flow

Explore more human-like visual encoding.

Usage

Inference using Huggingface transformers on NVIDIA GPUs. Requirements tested on python 3.12.9 + CUDA11.8:

torch==2.6.0
transformers==4.46.3
tokenizers==0.20.3
einops
addict 
easydict
pip install flash-attn==2.7.3 --no-build-isolation
from transformers import AutoModel, AutoTokenizer
import torch
import os
os.environ["CUDA_VISIBLE_DEVICES"] = '0'
model_name = 'deepseek-ai/DeepSeek-OCR-2'

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModel.from_pretrained(model_name, _attn_implementation='flash_attention_2', trust_remote_code=True, use_safetensors=True)
model = model.eval().cuda().to(torch.bfloat16)

# prompt = "<image>\nFree OCR. "
prompt = "<image>\n<|grounding|>Convert the document to markdown. "
image_file = 'your_image.jpg'
output_path = 'your/output/dir'


res = model.infer(tokenizer, prompt=prompt, image_file=image_file, output_path = output_path, base_size = 1024, image_size = 768, crop_mode=True, save_results = True)

vLLM

Refer to GitHub for guidance on model inference acceleration and PDF processing, etc.

Support-Modes

  • Dynamic resolution
  • Default: (0-6)×768×768 + 1×1024×1024 — (0-6)×144 + 256 visual tokens

Main Prompts

# document: <image>\n<|grounding|>Convert the document to markdown.
# without layouts: <image>\nFree OCR.

Acknowledgement

Read the full model card (221 words)

Configuration

Architecture
DeepseekOCR2ForCausalLM
Context length (tokens)
8,192
Layers
12
Hidden size
1,280
Feed-forward size
6,848
Attention heads
10
Key/value heads
10
Vocabulary size
129,280
Routed experts
64
Experts active per token
6
Stored precision
bfloat16
Model type
deepseek_vl_v2

Identity and Version

Repository
deepseek-ai/DeepSeek-OCR-2
Publisher
DeepSeek
Task
Image and text to text
Modality
Image and text
Library
transformers
Parameters
3.4B parameters
Languages
ocr
Revision
aaa02f3811945a91062062994c5c4a3f4c0af2b0
First published
2026-01-27
Last updated
2026-02-03

Files and Weights

16 files, 6.8 GB in total. The weights are 1 file totalling 6.8 GB in safetensors.

Weights1 file · 6.8 GB
Configuration9 files · 428.9 KB
Tokenizer2 files · 10.1 MB
Documentation2 files · 15.5 KB
Other1 file · 140.8 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
model-00001-of-000001.safetensorsWeights6.8 GB d8ff67a424ba
config.jsonConfiguration2.6 KB
configuration_deepseek_v2.pyConfiguration10.6 KB
conversation.pyConfiguration9.3 KB
deepencoderv2.pyConfiguration36.3 KB
model.safetensors.index.jsonConfiguration247.4 KB
modeling_deepseekocr2.pyConfiguration39.2 KB
modeling_deepseekv2.pyConfiguration82.2 KB
processor_config.jsonConfiguration460 B
special_tokens_map.jsonConfiguration801 B
LICENSE.txtDocumentation11.3 KB
README.mdDocumentation4.1 KB
assets/fig1.pngOther140.8 KB bfa3301b397d
.gitattributesRepository1.6 KB
tokenizer.jsonTokenizer10.0 MB
tokenizer_config.jsonTokenizer165.9 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
6.8 GB
Download from DeepSeek

Released by DeepSeek through its official repository on Hugging Face. Read the license.

Built From

  • Described by arXiv:2510.18234
  • Described by arXiv:2601.20552

Evaluations

Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.

BenchmarkConditionsResultReported byRevisionDate
PaddlePaddle/Real5-OmniDocBench Task illuminationMetric illuminationComparison conditions not established 76.02 Real5-OmniDocBench Leaderboard
Reported by a third party
Evaluated revision not stated 2026-08-08
PaddlePaddle/Real5-OmniDocBench Task overallMetric overallComparison conditions not established 73.01 Real5-OmniDocBench Leaderboard
Reported by a third party
Evaluated revision not stated 2026-08-08
PaddlePaddle/Real5-OmniDocBench Task scanningMetric scanningComparison conditions not established 89.59 Real5-OmniDocBench Leaderboard
Reported by a third party
Evaluated revision not stated 2026-08-08
PaddlePaddle/Real5-OmniDocBench Task screen_photographyMetric screen_photographyComparison conditions not established 71.65 Real5-OmniDocBench Leaderboard
Reported by a third party
Evaluated revision not stated 2026-08-08
PaddlePaddle/Real5-OmniDocBench Task skewMetric skewComparison conditions not established 61.28 Real5-OmniDocBench Leaderboard
Reported by a third party
Evaluated revision not stated 2026-08-08
PaddlePaddle/Real5-OmniDocBench Task warpingMetric warpingComparison conditions not established 66.53 Real5-OmniDocBench Leaderboard
Reported by a third party
Evaluated revision not stated 2026-08-08
allenai/olmOCR-bench Task arxiv_mathMetric arxiv_mathComparison conditions not established 82 Tweet by @staghado
Reported by a third party
Evaluated revision not stated 2026-02-19
allenai/olmOCR-bench Task long_tiny_textMetric long_tiny_textComparison conditions not established 90.7 Tweet by @staghado
Reported by a third party
Evaluated revision not stated 2026-02-19
allenai/olmOCR-bench Task multi_columnMetric multi_columnComparison conditions not established 79 Tweet by @staghado
Reported by a third party
Evaluated revision not stated 2026-02-19
allenai/olmOCR-bench Task old_scansMetric old_scansComparison conditions not established 33.8 Tweet by @staghado
Reported by a third party
Evaluated revision not stated 2026-02-19
allenai/olmOCR-bench Task old_scans_mathMetric old_scans_mathComparison conditions not established 72 Tweet by @staghado
Reported by a third party
Evaluated revision not stated 2026-02-19
allenai/olmOCR-bench Task overallMetric overallComparison conditions not established 76.3 Tweet by @staghado
Reported by a third party
Evaluated revision not stated 2026-02-19
allenai/olmOCR-bench Task table_testsMetric table_testsComparison conditions not established 77.4 Tweet by @staghado
Reported by a third party
Evaluated revision not stated 2026-02-19
llamaindex/ParseBench Task chartMetric chartSetup Pipeline name: deepseekocr2_vllmComparison conditions not established 1.1 ParseBench
Reported by a third party
Evaluated revision not stated 2026-04-14
llamaindex/ParseBench Task layoutMetric layoutSetup Pipeline name: deepseekocr2_vllmComparison conditions not established 7 ParseBench
Reported by a third party
Evaluated revision not stated 2026-04-14
llamaindex/ParseBench Task meanMetric meanSetup Pipeline name: deepseekocr2_vllmComparison conditions not established 41.2 ParseBench
Reported by a third party
Evaluated revision not stated 2026-04-14
llamaindex/ParseBench Task tableMetric tableSetup Pipeline name: deepseekocr2_vllmComparison conditions not established 61.7 ParseBench
Reported by a third party
Evaluated revision not stated 2026-04-14
llamaindex/ParseBench Task text_contentMetric text_contentSetup Pipeline name: deepseekocr2_vllmComparison conditions not established 82 ParseBench
Reported by a third party
Evaluated revision not stated 2026-04-14
llamaindex/ParseBench Task text_formattingMetric text_formattingSetup Pipeline name: deepseekocr2_vllmComparison conditions not established 54 ParseBench
Reported by a third party
Evaluated revision not stated 2026-04-14

Memory Requirements

PrecisionWeights in memory
As published6.8 GB
16-bit6.8 GB
8-bit3.4 GB
4-bit1.7 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About DeepSeek-OCR-2

How much GPU memory does DeepSeek-OCR-2 need?

About 8.1 GB at 16-bit and 2 GB at 4-bit: the weights (3.4B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run DeepSeek-OCR-2 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use DeepSeek-OCR-2 commercially?

Yes. DeepSeek-OCR-2 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is DeepSeek-OCR-2's context length?

8,192 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Image and text to text

Unlimited-OCR-AWQ

Sahil Chachra

AWQ 4-bit (W4A16) quantization of baidu/Unlimited-OCR, a 3B vision-language OCR model that pushes DeepSeek-OCR one step further (one-shot, long-horizon document parsing). This repo quantizes the DeepSeek-V2 MoE text decoder with activation-aware scaling (AWQ) while keeping the vision tower in BF16, so it stays a drop-in transformers model. Unlimited-OCR uses the DeepSeek-OCR prompt vocabulary. The prompt must contain; prefix it with whenever you also want bounding boxes for what was read. - base — basesize=1024, imagesize=1024, cropmode=False. Good default for normal pages. - gundam — basesize=1024, imagesize=640, cropmode=True. Tiles the page; use for dense or large/high-resolution…

Open weights mit 3.4B parameters 32,768 tokens transformers

Model · Image and text to text

DeepSeek-OCR

DeepSeek

Inference using Huggingface transformers on NVIDIA GPUs. Requirements tested on python 3.12.9 + CUDA11.8: Refer to GitHub for guidance on model inference acceleration and PDF processing, etc. [2025/10/23] DeepSeek-OCR is now officially supported in upstream vLLM. We would like to thank Vary, GOT-OCR2.0, MinerU, PaddleOCR, OneChart, Slow Perception for their valuable models and ideas. author={Wei, Haoran and Sun, Yaofeng and Li, Yukun}, year={2025}

Open weights mit 3.3B parameters 8,192 tokens transformers

Model · Image and text to text

Unlimited-OCR

BAIDU

[2026/07/21] Thanks to the ms-swift community for their support, our model now supports training with ms-swift. - [2026/07/03] Thanks to the Baidu Cloud team for their support. Our model is now available on Baidu Cloud. - [2026/06/28] Thanks to the vLLM community and Tianyu Guo for their support, our model now supports vLLM inference. - [2026/06/24] Thanks to AK for creating a demo for us. It is now available at Hugging Face Spaces. - [2026/06/23] Our paper is now available on arXiv. - [2026/06/23] Thanks to the ModelScope community for their support. Our model is now available at ModelScope. - [2026/06/22] We present Unlimited-OCR, aiming to push Deepseek-OCR one step further. Inference…

Open weights mit 3.3B parameters 32,768 tokens transformers

Model · Image and text to text

unlimited-ocr-max

Konstantin

baidu/Unlimited-OCR as one repository max serve opens directly on Apple Silicon: baidu's weights unchanged (model.safetensors, byte-identical to upstream at revision 07dea832e22aefee32ad281d4b80551282e1c168, sha256 2bc48a7a110061ea58fff65d3169367eebe3aee371ca6968dc2219c1b2855fc6), the tokenizer files as published, and the checkpoint's config.json with two keys removed (automap, modeltype) so MAX can load it without trustremotecode. The runtime is a MAX custom architecture with two Mojo custom ops, served from https://github.com/kthr/unlimited-ocr-max as an OpenAI-compatible endpoint on the Metal GPU or the CPU. The repository also carries model-int8.safetensors, this port's weight-only int8…

Open weights mit 3.3B parameters 32,768 tokens

Model · Image and text to text

dots.ocr

Dots Studio

dots.ocr: Multilingual Document Layout Parsing in a Single Vision-Language Model dots.ocr is a powerful, multilingual document parser that unifies layout detection and content recognition within a single vision-language model while maintaining good reading order. Despite its compact 1.7B-parameter LLM foundation, it achieves state-of-the-art(SOTA) performance. 1. Powerful Performance: dots.ocr achieves SOTA performance for text, tables, and reading order on OmniDocBench, while delivering formula recognition results comparable to much larger models like Doubao-1.5 and gemini2.5-pro. 2. Multilingual Support: dots.ocr demonstrates robust parsing capabilities for low-resource languages…

Open weights mit 3B parameters 131,072 tokens dots_ocr

Model · Image and text to text

dots.mocr

Dots Studio

dots.mocr We present dots.mocr. Beyond achieving state-of-the-art (SOTA) performance in standard multilingual document parsing among models of comparable size, dots.mocr excels at converting structured graphics (e.g., charts, UI layouts, scientific figures and etc.) directly into SVG code. Its core capabilities encompass grounding, recognition, semantic understanding, and interactive dialogue. Simultaneously, we are releasing dots.mocr-svg, a variant specifically optimized for robust image-to-SVG parsing tasks. More information can be found in the paper. Visual languages (e.g., charts, graphics, chemical formulas, logos) encapsulate dense human knowledge. dots.mocr unifies the…

Open weights mit 3B parameters 131,072 tokens dots_mocr