unsloth / DeepSeek-OCR-2

huggingface.co
Total runs: 5.6K
24-hour runs: 0
7-day runs: 2.0K
30-day runs: 2.3K
Model's Last Updated: June 16 2026
image-text-to-text

Introduction of DeepSeek-OCR-2

Model Details of DeepSeek-OCR-2

Read our Guide How to: Run & Fine-tune DeepSeek-OCR 2 .

✨ Read our DeepSeek-OCR 2 Guide here !


DeepSeek AI

🌟 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 ✅
Prompts examples
# document: <image>\n<|grounding|>Convert the document to markdown.
# other image: <image>\n<|grounding|>OCR this image.
# without layouts: <image>\nFree OCR.
# figures in document: <image>\nParse the figure.
# general: <image>\nDescribe this image in detail.
# rec: <image>\nLocate <|ref|>xxxx<|/ref|> in the image.
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
coming soon~

Runs of unsloth DeepSeek-OCR-2 on huggingface.co

5.6K
Total runs
0
24-hour runs
703
3-day runs
2.0K
7-day runs
2.3K
30-day runs

More Information About DeepSeek-OCR-2 huggingface.co Model

More DeepSeek-OCR-2 license Visit here:

https://choosealicense.com/licenses/apache-2.0

DeepSeek-OCR-2 huggingface.co

DeepSeek-OCR-2 huggingface.co is an AI model on huggingface.co that provides DeepSeek-OCR-2's model effect (), which can be used instantly with this unsloth DeepSeek-OCR-2 model. huggingface.co supports a free trial of the DeepSeek-OCR-2 model, and also provides paid use of the DeepSeek-OCR-2. Support call DeepSeek-OCR-2 model through api, including Node.js, Python, http.

DeepSeek-OCR-2 huggingface.co Url

https://huggingface.co/unsloth/DeepSeek-OCR-2

unsloth DeepSeek-OCR-2 online free

DeepSeek-OCR-2 huggingface.co is an online trial and call api platform, which integrates DeepSeek-OCR-2's modeling effects, including api services, and provides a free online trial of DeepSeek-OCR-2, you can try DeepSeek-OCR-2 online for free by clicking the link below.

unsloth DeepSeek-OCR-2 online free url in huggingface.co:

https://huggingface.co/unsloth/DeepSeek-OCR-2

DeepSeek-OCR-2 install

DeepSeek-OCR-2 is an open source model from GitHub that offers a free installation service, and any user can find DeepSeek-OCR-2 on GitHub to install. At the same time, huggingface.co provides the effect of DeepSeek-OCR-2 install, users can directly use DeepSeek-OCR-2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

DeepSeek-OCR-2 install url in huggingface.co:

https://huggingface.co/unsloth/DeepSeek-OCR-2

Url of DeepSeek-OCR-2

DeepSeek-OCR-2 huggingface.co Url

Provider of DeepSeek-OCR-2 huggingface.co

unsloth
ORGANIZATIONS

Other API from unsloth

huggingface.co

Total runs: 629.2K
Run Growth: 627.3K
Growth Rate: 97.49%
Updated:August 29 2026
huggingface.co

Total runs: 537.9K
Run Growth: 31.4K
Growth Rate: 5.71%
Updated:July 16 2026
huggingface.co

Total runs: 462.0K
Run Growth: 52.1K
Growth Rate: 11.28%
Updated:June 08 2025
huggingface.co

Total runs: 408.9K
Run Growth: -197.3K
Growth Rate: -47.58%
Updated:August 07 2026
huggingface.co

Total runs: 352.9K
Run Growth: 157.4K
Growth Rate: 45.18%
Updated:April 20 2026
huggingface.co

Total runs: 344.2K
Run Growth: -24.1K
Growth Rate: -7.00%
Updated:June 23 2026
huggingface.co

Total runs: 306.1K
Run Growth: 17.4K
Growth Rate: 5.67%
Updated:June 23 2025
huggingface.co

Total runs: 214.2K
Run Growth: -49.1K
Growth Rate: -22.94%
Updated:May 12 2025
huggingface.co

Total runs: 191.5K
Run Growth: 61.2K
Growth Rate: 31.97%
Updated:May 14 2025
huggingface.co

Total runs: 126.4K
Run Growth: -883
Growth Rate: -0.70%
Updated:June 03 2025
huggingface.co

Total runs: 109.2K
Run Growth: 85.3K
Growth Rate: 78.11%
Updated:January 28 2026