Contexts Optical Compression
📥 Model Download | 📄 Paper Link | 📄 Arxiv Paper Link |
DeepSeek-OCR: Contexts Optical Compression
Explore the boundaries of visual-text compression.
Our environment is cuda11.8+torch2.6.0.
git clone https://github.com/deepseek-ai/DeepSeek-OCR.gitconda create -n deepseek-ocr python=3.12.9 -y
conda activate deepseek-ocrpip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118
pip install vllm-0.8.5+cu118-cp38-abi3-manylinux1_x86_64.whl
pip install -r requirements.txt
pip install flash-attn==2.7.3 --no-build-isolationNote: if you want vLLM and transformers codes to run in the same environment, you don't need to worry about this installation error like: vllm 0.8.5+cu118 requires transformers>=4.51.1
Note: change the INPUT_PATH/OUTPUT_PATH and other settings in the DeepSeek-OCR-master/DeepSeek-OCR-vllm/config.py
cd DeepSeek-OCR-master/DeepSeek-OCR-vllmpython run_dpsk_ocr_image.pypython run_dpsk_ocr_pdf.pypython run_dpsk_ocr_eval_batch.py[2025/10/23] The version of upstream vLLM:
uv venv
source .venv/bin/activate
# Until v0.11.1 release, you need to install vLLM from nightly build
uv pip install -U vllm --pre --extra-index-url https://wheels.vllm.ai/nightly……or you can
cd DeepSeek-OCR-master/DeepSeek-OCR-hf
python run_dpsk_ocr.pyThe current open-source model supports the following modes:
# 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.
# '先天下之忧而忧'We would like to thank Vary, GOT-OCR2.0, MinerU, PaddleOCR, OneChart, Slow Perception for their valuable models and ideas.
We also appreciate the benchmarks: Fox, OminiDocBench.
@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}
}Verify evals on Papers with Code
Improvement vectors for DeepSeek-OCR
基于中间层隐状态读取的内生安全通路——替代外挂护栏与参数对齐的第三种架构
prompt修改不起作用
[教程TUTORIAL] DeepSeek-OCR Windows WSL本地安装部署避坑指南 Local Installation and Deployment Guide for Windows WSL
Invitation: WDCC Shanghai subconference on the forgetting-mechanism direction
Does it support multiple images per prompt?
Hallucination/generation loop on Blackwell GPUs (sm_120)
【想法探讨】讨论是否可行--使用“文本内容(现代汉语)→文言文”转换极致压缩上下文输入
DeepSeek OCR Triton Error [CUDA] an illegal memory access on vLLM 0.11.2