Model reference · open weights

DeepSeek-OCR-2

LLMs deepseek-community Vision + text 1 build Open weights 47k dl/mo

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.

  • DeepSeek-OCR-2 is a 3.4B parameter image-text-to-text model developed by deepseek-community for optical character recognition and document conversion.
  • It supports multilingual input with an 8192 token context length and is licensed under apache-2.0.
  • The model features dynamic resolution support and can output coordinate-aware text with markdown conversion capabilities.

Summary of the deepseek-community/DeepSeek-OCR-2 model card, 2026-10-01

What it is

Released bydeepseek-community
Released2026-05-27
Parameters3.4B
VRAM6.8 GB for the weights

What it runs on

Memory and cards for DeepSeek-OCR-2 (BF16)

6.8 GBweights, file size
61 MBcache per 1K tokens
2.2 GBruntime overhead, at least
8,192 tokenscontext max
CardRequests at onceContext maxMemory
8K each
RTX 3060 12 GB5all 8K11.6 GB
RTX 4060 Ti 16 GB12all 8K15.4 GB
RTX 3090 24 GB28all 8K23.4 GB
RTX 4090 24 GB28all 8K23.4 GB
RTX 5090 32 GB43all 8K31.0 GB
L40S 48 GB69all 8K44.0 GB
A100 80 GB137all 8K78.2 GB
H100 80 GB127all 8K78.1 GB
RTX PRO 6000 Blackwell 96 GB158all 8K93.8 GB
DGX Spark (GB10) 128 GB unified185all 8K107 GB
H200 141 GB246all 8K138 GB
B200 180 GB319all 8K176 GB
2× RTX 3060 12 GB
tensor parallel
23all 8K11.6 GB a card
Memory needed at each load
Requests at once8K tokens each
19.5 GB
511.5 GB
813.1 GB
1617.1 GB
3225.1 GB
6441.2 GB

One card, with vLLM's small-card settings.

From the model card

What deepseek-community says about DeepSeek-OCR-2

Read the model card

Usage

Plain OCR

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. : (...)"

Grounding with markdown conversion

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 (...)"

vLLM

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

Support-Modes

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

Main Prompts

# document:        "\nConvert the document to markdown."
# without layouts: "\nFree OCR."

Acknowledgement

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.

Citation

@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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms