--- license: apache-2.0 base_model: - deepseek-ai/DeepSeek-OCR-2 base_model_relation: quantized pipeline_tag: image-text-to-text library_name: gguf language: - en - zh tags: - ocr - document-parsing - deepseek - gguf - llama.cpp - 42model --- # DeepSeek-OCR-2 · Fully Local Document Recognition (Lightweight Tier) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) [![Runs Local](https://img.shields.io/badge/Runs-100%25_Local-brightgreen.svg)](https://42model.com) [![Platform](https://img.shields.io/badge/Platform-macOS_|_Windows_|_Linux-lightgrey.svg)](https://42model.com) [![ModelScope](https://img.shields.io/badge/ModelScope-42ailab-624AFF.svg)](https://modelscope.cn/models/42ailab/DeepSeek-OCR-2-GGUF) **English** | [简体中文](./README_zh.md) · Also on [ModelScope](https://modelscope.cn/models/42ailab/DeepSeek-OCR-2-GGUF) · [42ailab.com](https://42ailab.com) Give it a document photo or scan and this model reads the whole page into **editable text and tables** — entirely on your own computer. **No cloud, free, private.** The two files total about 2.5 GB, well within reach of an ordinary laptop. > **The model was built by [DeepSeek](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) and released under Apache-2.0** (DeepSeek-OCR 2: Visual Causal Flow). **The GGUF quantization was produced by community contributor [sabafallah](https://huggingface.co/sabafallah/DeepSeek-OCR-2-GGUF)** (Apache-2.0 permits redistribution). **This repo is neither a new model nor our own quantization** — what we did was mirror that community quantization **byte for byte** and wire it into the 42model engine so it works with one click on the desktop. ## 1. The problem it solves Turning documents — contracts, invoices, papers, books, scans, screenshots — into text that is **editable, searchable and feedable to an AI** is one of the highest-frequency steps in knowledge work: - **Convert to editable documents**: turn the contents of images and scans into text and tables you can edit and search directly; - **Build retrieval and Q&A**: digitize paper and image material, then feed it to an AI for summarization and questions; - **Grab text on the fly**: text inside a screenshot or a photographed page, without retyping it. Getting decent document recognition used to mean **uploading your files to someone else's server** — with the privacy and compliance concerns, and possibly the cost, that entails. This model keeps that step **entirely local**. Its other virtue is being **small**: about 2.5 GB total, runnable on an 8 GB machine, which makes it the **lightweight OCR tier** in our curated library. ## 2. How it works **The recognition capability comes from DeepSeek's DeepSeek-OCR 2.** Its published design points: - **Reads the whole page rather than slicing it up**: the full page image is first compressed into **a small number of "vision tokens"** (roughly 256–1120 per page), then body text and layout are read out in one pass — so structures spanning columns and lines are less likely to get scrambled. This idea of compressing long documents into vision tokens comes from its predecessor DeepSeek-OCR (Contexts Optical Compression); - **Adaptive resolution**: the image is sampled dynamically between 768×768 and 1024×1024 depending on page complexity — less compute on simple pages, finer detail on complex ones; - **Text and layout together**: it can return plain text only, or text with layout positions. **What we did** (no model training, no quantization): - Mirrored the community GGUF quantization **byte for byte**, with each file's sha256 identical to the source; - **Wired it into the engine**: layout annotations in the recognition output are stripped automatically by the engine, so what you get is clean body text. On Apple GPUs (Metal) the engine **automatically runs the vision component on the CPU** — this generation of the DeepSeek-OCR architecture has a known precision issue on Metal, and once worked around you never have to think about it; - Kept the **same Apache-2.0 license** as upstream. ## 3. How well it performs For a full evaluation of the model itself, refer to the **upstream paper** ([arXiv:2601.20552](https://arxiv.org/abs/2601.20552)) — we do not repeat scores we have not verified. Here we list only **the two things we can vouch for ourselves**: | What we verified | Result | |---|---| | Mirror fidelity (our files vs the community source, byte for byte) | Both files match **exactly** in sha256 and size, with no re-compression | | Runnability on the engine (the inference engine version we bundle) | DeepSeek-OCR / OCR-2 is a **natively supported architecture** — no custom build or branch switch needed | We did **not** re-run public document-parsing benchmarks, so we give no "points lost to quantization" figures. ## 4. Limitations and what's next - **Positioned as the lightweight tier**: about 2.5 GB and easy on memory, its virtues are size and quick installation; for documents with very complex layouts, the larger OCR tiers in our curated library are more reliable. - **Decorative vertical text** (such as vertically set Japanese headings) and other rare layouts can still be misread — a shared difficulty of this generation of document OCR. - **Apple GPU (Metal)**: the vision component has a known precision issue on Metal, which the engine **works around automatically** (vision on CPU, text still GPU-accelerated); ordinary users need not think about it. - Next: track upstream model updates; evaluate our own quantizations to shrink the footprint further. ## 5. How to download and use it This model is packaged for [42model](https://42model.com), which is the recommended way to get it: **Desktop app** 1. Open **Model Library → OCR**, find **DeepSeek-OCR-v2** and download it; 2. Click **Start** to set it as the current OCR model. After that, use the OCR feature to turn images and scans into text. ## Files and license | File | Role | Size | |---|---|---| | `deepseek-ocr-2-Q4_K_M.gguf` | Text decoder (Q4_K_M quantization) | ~1.95 GB | | `mmproj-deepseek-ocr-2-q8_0.gguf` | Vision encoder (Q8_0, near-lossless) | ~512 MB | Per-file sha256 values are listed on the Files page and can be verified independently. **License**: the model itself is DeepSeek-OCR 2, © DeepSeek, **Apache-2.0** (official sources: [GitHub](https://github.com/deepseek-ai/DeepSeek-OCR-2) · [Hugging Face](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) · [ModelScope](https://modelscope.cn/models/deepseek-ai/DeepSeek-OCR-2) · [paper](https://arxiv.org/abs/2601.20552)). The GGUF quantization was produced by community contributor [sabafallah](https://huggingface.co/sabafallah/DeepSeek-OCR-2-GGUF); this repo mirrors that quantization and is likewise governed by [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). By using it you agree to the upstream license terms. ## Citation Please cite upstream DeepSeek (DeepSeek-OCR 2 and its predecessor): ```bibtex @article{wei2026deepseek, title={DeepSeek-OCR 2: Visual Causal Flow}, author={Wei, Haoran and Sun, Yaofeng and Li, Yukun}, journal={arXiv preprint arXiv:2601.20552}, year={2026} } @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} } ``` This repo only mirrors and adapts for local use; we claim no credit for the model or the quantization. Contact us: **contact@42ailab.com** ## About us **[42ailab](https://42ailab.com)** — an AI research lab exploring the boundaries of intelligence. Grounded in cognitive science, we work toward a deep integration of AI and human intelligence — to truly understand and augment intelligence, carbon-based and silicon-based alike. **[42model](https://42model.com)** — a high-performance local inference engine from 42ailab that runs translation, transcription, recognition, chat and coding on your own machine, free and private; with optional cloud compute for fine-tuning your own models and bringing them back to run locally.