deepseek-ai_DeepSeek-OCR-2
deepseek-ai · View on Hugging Face ↗
Model card
The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.
pipeline_tag: image-text-to-text language:
- multilingual tags:
- deepseek
- vision-language
- ocr
- custom_code license: apache-2.0 library_name: transformers
🌟 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
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}
}
Magnet link
Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:
magnet:?xt=urn:btih:b6083331f4d5f11acc132340536090759d2b152b&dn=deepseek-ai_DeepSeek-OCR-2Open magnet in torrent client · infohash b6083331f4d5f11acc132340536090759d2b152b
Files & hashes
| Path | Size | sha1 | sha256 |
|---|---|---|---|
| LICENSE.txt | 11.1 KB (11,342 B) | 78a3bb92155448004aca4c07b09613808f9585df | 9debfe045c2a2755a52d0ae1087605d15770fe6636798c09efd93c1dc732ef28 |
| README.md | 4.0 KB (4,143 B) | 175cf52ef29da8fea09f3eff3e9946deeb1c1f49 | 507812c8e4620f72625305377daa697faf7135d7400ac25ab4b7d6299a92d60b |
| assets/fig1.png | 137.5 KB (140,796 B) | 4aadc921a87794784856b061992526e4f7c61d6a | bfa3301b397df240c5eba7206c7865cae3d9aaf6674a6c8a68904a9c98bcbc77 |
| config.json | 2.5 KB (2,588 B) | bf67e90876829f88e146c9873e2537ba77f2d203 | e2bb23b49b445f0bfd6eeb978bac9f19a2df82cb38472754e4ae83662d18f845 |
| configuration_deepseek_v2.py | 10.4 KB (10,646 B) | a8622c20101ed06940eb7fb6164babbc499bc524 | 6ab21f29a4722e26fa28c8e0d4277591689a598df17cf6c712330e8f62b3fc7c |
| conversation.py | 9.0 KB (9,253 B) | 65c295e81cd804080ec238b31d1922f33e1f9405 | ec7b6ce89bcda643de1f43269ffa66a7b2e65dc3ed30e427958f776546b4ba03 |
| deepencoderv2.py | 35.4 KB (36,299 B) | ef3635fe6d6c9b6a5a97da2acd05ad058c8d8056 | 562e4da383b7ba5ef5db79b5ddfb705c649a80044b99122fe4d5d42c16284193 |
| model-00001-of-000001.safetensors | 6.31 GB (6,778,573,880 B) | 76a1965d673acc005d2c2241634d5c38ce0f5843 | d8ff67a424ba6f4dd077885eb9d6a05d2537e76fe5491f0e2a9b712f8c8870fa |
| model.safetensors.index.json | 241.6 KB (247,401 B) | 7d80f3c53327ff3fead4558299cd8786c00e34dd | f97aa45bbff64ccb2d645789303b1e2be17f45990812e5f0c2f80d169587aed7 |
| modeling_deepseekocr2.py | 38.3 KB (39,226 B) | 9c69562aa4d454017379d7a0335d37ba618b054c | 4166e8f014250143e257f48fb4eaa57a2ef49fa6ad375ecc016bc7d262fc7160 |
| modeling_deepseekv2.py | 80.3 KB (82,224 B) | ff008470d58b98d3f8304ecfb6ee1bd04c877739 | 69184a0493d1fdac21c360f9f9eabc5b5af3188e0265df44cfaeafc44f9095e3 |
| processor_config.json | 460 B (460 B) | 9153af2ad5e59ad9cf24fed29cf286fcf10d389a | 0fe7ba9aa6b967a90e4af40d43c8030cbdd3dbcfbb387b8907625d5e54f0dbbe |
| special_tokens_map.json | 801 B (801 B) | d59d312be868edc63b195e19e256c730dba685ad | ab4bd57ce17d62e39e0a39e739de1e407484f090f0b2c7e391312bca7a5b061a |
| tokenizer.json | 9.5 MB (9,979,544 B) | c93a1c4d2ecf31bb5a9ec39eb73dfbf915aaf77e | a02f8fd5228c90256bb4f6554c34a579d48f909e5beb232dc4afad870b55a8b4 |
| tokenizer_config.json | 162.0 KB (165,938 B) | ba9d4175d69cde58ad9f68a76a4758df091eaffa | a0cbe8464049da1f891b7a12676de06af4cb54c130995d42f71adc1c30c6e9f3 |
Cite this release
- Canonical URL
- https://aiseedbank.org/models/deepseek-ai_DeepSeek-OCR-2/
- Slug
- deepseek-ai_DeepSeek-OCR-2
- Infohash
- b6083331f4d5f11acc132340536090759d2b152b
- License
- apache-2.0
- Signing key fingerprint
- 85a3b32c3712427b
Every file carries a locally computed sha256 — verify a download against the signed sums: deepseek-ai_DeepSeek-OCR-2.SHA256SUMS (+ minisign signature).
Provenance
| Upstream repository | deepseek-ai/DeepSeek-OCR-2 |
|---|---|
| Revision (pinned) | aaa02f3811945a91062062994c5c4a3f4c0af2b0 |
| Fetched at | 2026-09-03T21:34:23Z |
| License at fetch | apache-2.0 |
| Snapshot tool | huggingface · seedbank 0.1.0 |
Trackers
- udp://announce.aitorrent.org:6969/announce
- http://announce.aitorrent.org:7070/announce
- udp://announce2.aitorrent.org:6970/announce
- http://announce2.aitorrent.org:7071/announce
- udp://tracker.opentrackr.org:1337/announce
- udp://open.demonii.com:1337/announce
- udp://open.stealth.si:80/announce
- udp://exodus.desync.com:6969/announce
- udp://tracker.torrent.eu.org:451/announce
✓ verified · rehash-vs-hf-metadata at 2026-09-03T21:35:29Z
apache-2.06.32 GB (6,789,304,541 bytes)transformerssafetensorsdeepseek_vl_v2feature-extractiondeepseekvision-languageocrcustom_codeimage-text-to-textmultilingualeval-resultspaper: 2601.20552paper: 2510.18234