Model reference · open weights
DeepSeek-OCR-2 is an open-weight language model from deepseek-community. DeepSeek-OCR-2 (BF16) weighs 6.8 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the deepseek-community/DeepSeek-OCR-2 model card, 2026-10-01
What it is
| Released by | deepseek-community |
|---|---|
| Released | 2026-05-27 |
| Parameters | 3.4B |
| VRAM | 6.8 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 8K each | |||
| RTX 3060 12 GB | 5 | all 8K | 11.6 GB |
| RTX 4060 Ti 16 GB | 12 | all 8K | 15.4 GB |
| RTX 3090 24 GB | 28 | all 8K | 23.4 GB |
| RTX 4090 24 GB | 28 | all 8K | 23.4 GB |
| RTX 5090 32 GB | 43 | all 8K | 31.0 GB |
| L40S 48 GB | 69 | all 8K | 44.0 GB |
| A100 80 GB | 137 | all 8K | 78.2 GB |
| H100 80 GB | 127 | all 8K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 158 | all 8K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 185 | all 8K | 107 GB |
| H200 141 GB | 246 | all 8K | 138 GB |
| B200 180 GB | 319 | all 8K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 23 | all 8K | 11.6 GB a card |
| Requests at once | 8K tokens each |
|---|---|
| 1 | 9.5 GB |
| 5 | 11.5 GB |
| 8 | 13.1 GB |
| 16 | 17.1 GB |
| 32 | 25.1 GB |
| 64 | 41.2 GB |
One card, with vLLM's small-card settings.
From the model card
from transformers import AutoProcessor, AutoModelForImageTextToText
model = AutoModelForImageTextToText.from_pretrained(
"deepseek-community/DeepSeek-OCR-2", device_map="auto"
)
processor = AutoProcessor.from_pretrained("deepseek-community/DeepSeek-OCR-2")
image = "https://huggingface.co/datasets/hf-internal-testing/fixtures_got_ocr/resolve/main/image_ocr.jpg"
inputs = processor(images=image, text="\nFree OCR.", return_tensors="pt").to(model.device)
generate_ids = model.generate(**inputs, do_sample=False, max_new_tokens=256)
print(processor.decode(generate_ids[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# "R&D QUALITY IMPROVEMENT\nSUGGESTION/SOLUTION FORM\nName/Phone Ext. : (...)"
The token enables coordinate-aware output with and `` tags.
inputs = processor(
images=image,
text="\nConvert the document to markdown.",
return_tensors="pt",
).to(model.device)
generate_ids = model.generate(**inputs, do_sample=False, max_new_tokens=256)
print(processor.decode(generate_ids[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False))
# "title[[330, 198, 558, 230]]\n# R&D QUALITY (...)"
Refer to 🌟GitHub for guidance on model inference acceleration and PDF processing.
# document: "\nConvert the document to markdown."
# without layouts: "\nFree OCR."
We would like to thank DeepSeek-OCR, Vary, GOT-OCR2.0, MinerU, PaddleOCR for their valuable models and ideas.
We also appreciate the benchmark OmniDocBench.
@article{wei2025deepseek,
title={DeepSeek-OCR: Contexts Optical Compression},
author={Wei, Haoran and Sun, Yaofeng and Li, Yukun},
journal={arXiv preprint arXiv:2510.18234},
year={2025}
}
@article{wei2026deepseek,
title={DeepSeek-OCR 2: Visual Causal Flow},
author={Wei, Haoran and Sun, Yaofeng and Li, Yukun},
journal={arXiv preprint arXiv:2601.20552},
year={2026}
}
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.