Skip to content
IFAI

Open source

Deepseek's new OCR crushes document tokens

Published Reach 48

Deepseek just open-sourced an OCR system that compresses image-based text by up to 10x while retaining 97% of information. By drastically reducing vision tokens to as few as 64 per page, it lets language models process massive context without hitting compute limits.

Deepseek's new OCR crushes document tokens
Image: the-decoder.com

Deepseek OCR is a lightweight document parsing and compression system built specifically for language models. Instead of dumping raw text or massive image grids into your prompt, it compresses text-heavy images by up to 10x while preserving 97 percent of the original information, preventing long documents from blowing up your context window.

Both the code and model weights are publicly available right now.

What it can do

Deepseek OCR processes documents across roughly 100 languages. It handles plain text along with tricky elements like financial charts, chemical formulas, and geometric diagrams, all while keeping original layouts intact.

In deep parsing mode, it turns financial charts into clean Markdown tables and figures without losing general image captions.

The system dynamically adjusts its vision token budget based on layout complexity. A basic slide deck uses just 64 vision tokens per page, while books and standard reports consume around 100 tokens.

For dense, multi-column layouts like newspapers, the system switches to Gundam mode, capping usage at 800 tokens. Traditional OCR approaches easily burn through thousands of tokens on the exact same pages.

On the OmniDocBench benchmark, Deepseek OCR beat GOT-OCR 2.0 while using just 100 tokens versus 256. It also surpassed MinerU 2.0 with under 800 tokens, whereas MinerU requires more than 6,000 tokens per page.

How it works

The whole system runs on modest hardware. It combines DeepEncoder, a 380-million-parameter vision processor, with a text generator based on Deepseek3B-MoE that uses only 570 million active parameters.

The real secret is inside DeepEncoder. Deepseek paired Meta's 80-million-parameter SAM for segmentation with OpenAI's 300-million-parameter CLIP for vision-text mapping, placing a custom 16x compressor right between them.

A standard 1,024 by 1,024 image starts with 4,096 tokens. SAM processes the raw input, the compressor crushes that footprint down to just 256 tokens, and only then is the data handed over to the compute-heavy CLIP stage.

Deepseek trained the setup on 30 million PDF pages across 100 languages, including 25 million in Chinese and English, alongside 10 million synthetic diagrams, 5 million chemical formulas, and 1 million geometric figures.

Throughput and hardware

In production, a single Nvidia A100 GPU chews through over 200,000 document pages per day.

Scaled across an infrastructure cluster of 20 servers running eight A100s each, throughput hits 33 million pages daily, making it a viable pipeline engine for teams building LLM pre-training datasets from scratch.

Why it matters

Anyone building RAG pipelines, parsing scientific archives, or feeding books to language models should spin this up immediately. Cutting token footprints by 90 percent without sacrificing accuracy solves the biggest hidden cost in document AI.

While competitor tools continue throwing massive vision-language backbones at PDF extraction, Deepseek's pipeline design proves that clever intermediate compression easily beats brute-force compute.

Sources (1)

  1. [1]
    the-decoder.com(opens in a new tab)Originalthe-decoder.com

Best of AI, daily