DeepSeek-OCR
Open-weights 3B document model that turns PDFs into markdown with roughly 10x token compression — and costs nothing per page.
| Params | Task type | License | Released | Access | Pricing |
|---|---|---|---|---|---|
| 3B (vision encoder + DeepSeek LLM) | OCR, document → markdown, deep compression | MIT (open weights) | Oct 2025 | Self-host (vLLM / transformers) | Free (your GPU) |
What it is
DeepSeek-OCR is DeepSeek’s open-weights document-AI model, released October 2025. It is not a chat model. It is a 3B-parameter vision-language pipeline that reads pages — printed text, tables, equations, figures — and emits markdown, with a headline trick: it compresses a document image into roughly an order of magnitude fewer tokens than a naive vision encoding, which makes long-document ingestion dramatically cheaper. MIT-licensed weights, no API gate, no per-page bill.
Architecture and how it reads documents
The design is end-to-end rather than a classic pipeline of layout detector → text detector → recognizer. A vision encoder (DeepSeek’s DeepEncoder, roughly 100–380M-class depending on config, hedged as of Nov 2026) compresses the page image into a small set of vision tokens, and a DeepSeek language decoder reconstructs the markdown. The “10x token compression” claim means a dense page that would naively cost thousands of vision tokens is represented in a few hundred — the model literally learns which pixels matter. It ships with a tiny and a larger encoder mode: fewer tokens for clean pages, more for dense ones. Details are from the paper and release notes; treat exact architecture internals as approximate.
Accuracy and table/handwriting handling
On printed text and structured documents, reported accuracy is in the mid-to-high 90s, competitive with Mistral OCR on public document leaderboards (OmniDocBench class), as of Nov 2026. Tables come through as markdown/HTML-ish structures and math as LaTeX-ish notation. Handwriting is the weak spot — legible hand prints survive, cursive and annotations degrade badly. Chinese and English are the best-supported languages; other languages work but with less validation.
Strengths
- Free at the margin. MIT weights, self-hosted, zero per-page cost — the economics destroy per-page APIs at archive scale.
- Token efficiency. ~10x compression means long documents cost a fraction of a frontier VLM pass.
- Table and equation fidelity. Genuinely usable structured output, competitive with commercial OCR on leaderboards.
- MIT license. Commercial use, fine-tuning, and redistribution without legal review theater.
Weaknesses
- Raw component, not a product. No SLA, no dashboard, no invoice endpoint — you own the GPUs and the plumbing.
- Young and Chinese-first. Evals lean Chinese/English; docs and community support skew Chinese. Rough edges abound.
- Handwriting and low-quality scans. Faded, skewed, stamp-covered archives still humble it.
- Tuning tax. Getting production-grade throughput means vLLM flags, batching and post-processing work.
Best for / avoid for
Best for: high-volume invoice and receipt pipelines, archival scans where per-page fees are untenable, RAG ingestion of long PDF corpora, and any team that wants document OCR without vendor lock-in.
Avoid for: handwritten forms at scale, regulated workflows needing a signed SLA, or teams without GPU capacity and someone to babysit vLLM.
Variants
The release ships as a single open-weights family with selectable context/token presets (Gundam/tiny vs base encoder modes, roughly speaking). There is no hosted multi-tier product line; forks and quantizations (AWQ/GPTQ-class) appear on Hugging Face, but the canonical artifact is the official DeepSeek release.
Pricing and access
$0 per page. The cost is GPU time: roughly one A100/H100-class card serves a busy pipeline, or a 24–48 GB consumer card for modest volumes. No API key, no rate limits beyond your hardware. If you want managed access, third parties host it on inference providers, but that reintroduces per-token fees.
How to run it
Quick local run with transformers:
from transformers import AutoModel, AutoTokenizer
import torch
model_name = "deepseek-ai/DeepSeek-OCR"
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).eval().cuda().to(torch.bfloat16)
model.infer(tokenizer, prompt="<image>\n<|grounding|>Convert the document to markdown.",
image_file="scan.pdf_converted.png", output_path="./out",
base_size=1024, image_size=640, crop_mode=True)
For throughput, serve it with vLLM (recent releases support DeepSeek-OCR via the vLLM model registry) and put a queue in front. Batch pages, pin dtype to bf16, and cache by file hash. Expect to spend a day on environment wrangling; the payoff is a per-page cost of essentially electricity.
Benchmarks snapshot
Models-data (as of Nov 2026): “Matches Mistral OCR on table/OCR leaderboards at open license.” Publicly reported figures are approximate: ~90%+ on clean printed text, strong table-structure scores on OmniDocBench-class benchmarks, and a claimed ~10x reduction in vision tokens at similar accuracy. Document benchmarks are extremely sensitive to preprocessing — treat every number here as a range, not a verdict, and test on your PDFs.
How it stacks up
vs Mistral OCR: Mistral is the managed, supported API at ~$3 per 1,000 pages; DeepSeek-OCR is the free, self-hosted sibling with similar leaderboard claims and zero hand-holding.
vs dots.ocr: dots.ocr is the grittier competitor, built for messy real PDFs; DeepSeek-OCR is cleaner, better documented (relatively), and better token economics.
vs cloud giants (Azure/Google/AWS): cloud services win on SLAs, prebuilt invoice/ID schemas and enterprise contracts; DeepSeek-OCR wins on raw cost, control and privacy for high-volume text extraction.
PeaBox fit
DeepSeek-OCR is the ingestion layer for turning document piles into tokens. Point it at your PDF corpus, hand the markdown to the PeaBox AI Workbench for reasoning, and cache results for Prompt Library research workflows. For RAG backbones feeding CodeProof-AI-adjacent paper review, it’s the cheapest front door available.
The practitioner’s take
If you process thousands of pages a month and have one engineer who can nurse a GPU box, DeepSeek-OCR is the obvious call — the per-page math is unbeatable and the markdown quality is genuinely good on printed documents. It is not a managed service, and it will not save you from a folder of faded faxes. Pilot it on fifty of your ugliest real documents before you rip out whatever you have now.