Image-Text-to-Text
Transformers
Safetensors
multilingual
deepseek_vl_v2
feature-extraction
deepseek
vision-language
ocr
custom_code
Eval Results
Instructions to use deepseek-ai/DeepSeek-OCR-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-OCR-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="deepseek-ai/DeepSeek-OCR-2", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("deepseek-ai/DeepSeek-OCR-2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use deepseek-ai/DeepSeek-OCR-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/DeepSeek-OCR-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-OCR-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-OCR-2
- SGLang
How to use deepseek-ai/DeepSeek-OCR-2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "deepseek-ai/DeepSeek-OCR-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-OCR-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "deepseek-ai/DeepSeek-OCR-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/DeepSeek-OCR-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-OCR-2 with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-OCR-2
"You are using a model of type deepseek_vl_v2 to instantiate a model of type DeepseekOCR2" Warning
#31 opened 5 days ago
by
AndreyPanfilov
什么时候适配50系显卡啊,sm_120,vllm使用也有问题,啥时候支持较新的版本
#30 opened 20 days ago
by
xiaotu6e
Is that deepseek-ocr-2 compatible for H200
#29 opened 25 days ago
by
balajivasudevan
Add ParseBench evaluation results
#28 opened about 1 month ago
by
boyang-runllama
Rename README.md to ebook sur la monétisation de contenu sur Tik tok
#26 opened 2 months ago
by
Marquissalomon
Rename README.md to ebook sur la monétisation de contenu sur Tik tok
#25 opened 2 months ago
by
Marquissalomon
Duestions about the Stage 1 Encoder Pretraining
#24 opened 2 months ago
by
nero2023
config.kv_lora_rank is null?
#23 opened 3 months ago
by
SuHu753
元宵节快乐,v4也该来了吧?
#22 opened 3 months ago
by
luckjone
How many Language?
#21 opened 3 months ago
by
aoiandroid
Update conversation.py
#19 opened 3 months ago
by
HyzeAI
Add OlmOCRBench evaluation results
#18 opened 3 months ago
by
nielsr
📋 Documentation Enhancement Suggestion
#16 opened 4 months ago
by
CroviaTrust
📋 Documentation Enhancement Suggestion
#15 opened 4 months ago
by
CroviaTrust
The model performs poorly.
1
#14 opened 4 months ago
by
wyb5210
Update README.md
#13 opened 4 months ago
by
Lawziet
Update README.md to include the correct Arxiv link instead of linking to the github pdf
#12 opened 4 months ago
by
shokrydev
Request a compatible version with newer transformer versions
👀 2
#11 opened 4 months ago
by
AliKhajegiliM
Link model to paper and update citation
#10 opened 4 months ago
by
nielsr
What do you mean by "novel"? Google has been doing this for ages
👍 1
5
#9 opened 4 months ago
by
davidboring
Analysis on Prompt + Document Type Compatibility
🔥 9
2
#8 opened 4 months ago
by
ysong21
Installation Video and Testing - Step by Step
👍 5
#7 opened 4 months ago
by
fahdmirzac
Testing video and colab notebook, Issues with accuracy
👍 1
#6 opened 4 months ago
by
ritheshSree
ms-swift has supported inference, deployment, and fine-tuning of the DeepSeek-OCR-2 model.
#5 opened 4 months ago
by
hu5enpai
Guide to Run + Fine-tune DeepSeek-OCR 2
🤯❤️ 7
4
#4 opened 4 months ago
by
danielhanchen
Model architectures ['DeepseekOCR2ForCausalLM'] are not supported with latest vllm
2
#3 opened 4 months ago
by
avishekjana
Made a Demo for people who want to quickly try the model
16
#2 opened 4 months ago
by
ysong21
Compare to LightOnOCR-2-1B
9
#1 opened 4 months ago
by
staghado