Image-Text-to-Text
Transformers
Safetensors
multilingual
deepseek_vl_v2
feature-extraction
deepseek
vision-language
ocr
custom_code
Instructions to use NeuralMetrics/DeepSeek-OCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuralMetrics/DeepSeek-OCR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="NeuralMetrics/DeepSeek-OCR", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NeuralMetrics/DeepSeek-OCR", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NeuralMetrics/DeepSeek-OCR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeuralMetrics/DeepSeek-OCR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuralMetrics/DeepSeek-OCR", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NeuralMetrics/DeepSeek-OCR
- SGLang
How to use NeuralMetrics/DeepSeek-OCR 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 "NeuralMetrics/DeepSeek-OCR" \ --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": "NeuralMetrics/DeepSeek-OCR", "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 "NeuralMetrics/DeepSeek-OCR" \ --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": "NeuralMetrics/DeepSeek-OCR", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NeuralMetrics/DeepSeek-OCR with Docker Model Runner:
docker model run hf.co/NeuralMetrics/DeepSeek-OCR
Add Neural Metrics card (upstream card preserved below)
Browse files
README.md
CHANGED
|
@@ -10,6 +10,30 @@ tags:
|
|
| 10 |
license: mit
|
| 11 |
library_name: transformers
|
| 12 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
<div align="center">
|
| 14 |
<img src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" width="60%" alt="DeepSeek AI" />
|
| 15 |
</div>
|
|
@@ -183,4 +207,6 @@ We also appreciate the benchmarks: [Fox](https://github.com/ucaslcl/Fox), [Omini
|
|
| 183 |
author={Wei, Haoran and Sun, Yaofeng and Li, Yukun},
|
| 184 |
journal={arXiv preprint arXiv:2510.18234},
|
| 185 |
year={2025}
|
| 186 |
-
}
|
|
|
|
|
|
|
|
|
| 10 |
license: mit
|
| 11 |
library_name: transformers
|
| 12 |
---
|
| 13 |
+
<div align="center">
|
| 14 |
+
|
| 15 |
+
# Neural Metrics · Compressing pages into far fewer vision tokens.
|
| 16 |
+
|
| 17 |
+
<img src="https://img.shields.io/badge/Neural%20Metrics-document%20extraction-4F46E5?style=for-the-badge" alt="Neural Metrics" />
|
| 18 |
+
<img src="https://img.shields.io/badge/fork%20of-deepseek--ai%2FDeepSeek--OCR-2563EB?style=flat-square" alt="fork" />
|
| 19 |
+
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
DeepSeek-OCR explores optical context compression - representing a full page with an order of magnitude fewer tokens than conventional pipelines. For long multi-page documents, token budget is the binding constraint, so this matters commercially.
|
| 23 |
+
|
| 24 |
+
**We use it for:** long-document processing where context length is the bottleneck - cost-per-page experiments.
|
| 25 |
+
|
| 26 |
+
> ### Attribution
|
| 27 |
+
> This is an **unmodified fork** of [`deepseek-ai/DeepSeek-OCR`](https://huggingface.co/deepseek-ai/DeepSeek-OCR), created by the [Qwen team](https://huggingface.co/Qwen).
|
| 28 |
+
> All weights, files and behaviour are identical to upstream — we rehost it so our experiments stay
|
| 29 |
+
> reproducible and version-pinned. The original license and all credit remain with the Qwen team.
|
| 30 |
+
> If you want the canonical model, please use [the original](https://huggingface.co/deepseek-ai/DeepSeek-OCR).
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
<details>
|
| 35 |
+
<summary><b>Original model card from deepseek-ai/DeepSeek-OCR</b> (click to expand)</summary>
|
| 36 |
+
|
| 37 |
<div align="center">
|
| 38 |
<img src="https://github.com/deepseek-ai/DeepSeek-V2/blob/main/figures/logo.svg?raw=true" width="60%" alt="DeepSeek AI" />
|
| 39 |
</div>
|
|
|
|
| 207 |
author={Wei, Haoran and Sun, Yaofeng and Li, Yukun},
|
| 208 |
journal={arXiv preprint arXiv:2510.18234},
|
| 209 |
year={2025}
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
</details>
|