Practical guides

Run open OCR models on a cloud GPU

Turn PDFs and scans into Markdown with open OCR tools and models on a rented GPU: MinerU, Docling, GLM-OCR and more, the GPU each needs, and batch runs.

The open source OCR tools for a GPU come in two kinds, and the kind decides how you run them. Pipelines such as MinerU, Docling, marker and olmOCR take a folder of PDFs and write Markdown. OCR models such as GLM-OCR, DeepSeek-OCR, PaddleOCR-VL, dots.ocr and Unlimited-OCR are vision-language models that you serve with vLLM and call once per page image. Every checkpoint below is between 1.9 and 10.1 GB, so by the calculation further down all of them fit a 48 GB GPU with room for batches, and I would start on the cheapest 48 GB offer. The repository, Hugging Face, PyPI and vLLM recipe facts were checked on 12 November 2026.

Pipelines and OCR models are different tools

A pipeline is a program with several parts: a layout detector, text recognition, table and formula models, and code that puts the pieces back in reading order. You give it PDFs and it gives back Markdown or JSON per document. Some pipelines run a vision-language model inside. MinerU's standard tier adds a VLM to its small models, and marker's README says it runs layout, OCR and table recognition through one served VLM.

An OCR model is only the recognition part, a vision-language model that reads an image and writes text. You serve it and send it one page image per request, so you convert PDF pages to images first. Several vendors close the gap with their own pipeline: the GLM-OCR SDK adds the PP-DocLayoutV3 layout model, and the PaddleOCR-VL recipe pairs its 0.9B model with a PP-DocLayout model, V2 for the first version and V3 for 1.6. That is why a search for PDF to Markdown ends at both kinds of tool.

Open source OCR tools and models side by side

The pipelines first. Versions are the latest on PyPI today:

ToolLatestLicenseWhat its docs ask for
MinerU4.2.1, 11 November 2026MinerU Open Source License, Apache 2.0 with added conditionsPython 3.11 to 3.14, and for NVIDIA GPUs 8 GB of VRAM as a planning start
Docling2.150.0, 10 November 2026Code under MIT, each model under its own licensePython 3.10 or newer, and its README gives no GPU figure
marker2.1.0, 29 October 2026Code under Apache 2.0, weights under a modified AI Pubs Open Rail-M licensePython 3.10 or newer, PyTorch, and Docker with the NVIDIA Container Toolkit for the VLM server
olmOCR0.4.27, 12 March 2026Apache-2.0Python 3.11, at least 12 GB of GPU RAM and 30 GB of free disk

MinerU's license allows commercial use, requires a separate license above 100 million monthly active users or USD 20 million in monthly revenue, and requires attribution if you offer an online service built on it. marker's README says the weights are free for research, personal use and startups under $5M in funding or revenue. Now the models, with parameters from the Hub's safetensors metadata and checkpoint sizes summed from the *.safetensors files, in GB of 10^9 bytes:

ModelParametersCheckpointLicense on the HubGPU memory its docs stateServe it with
GLM-OCR1.33 billion2.65 GBMIT, with the Apache-2.0 layout modelNot statedvLLM recipe
PaddleOCR-VL-1.60.96 billion1.92 GBApache-2.0One GPU, small footprintvLLM recipe
dots.ocr3.04 billion6.08 GBMIT, plus a license agreement fileNot statedvLLM, per its README
DeepSeek-OCR3.34 billion6.67 GBMIT8 GBvLLM recipe
DeepSeek-OCR-23.39 billion6.78 GBApache-2.08 GBvLLM recipe
Unlimited-OCR3.34 billion6.67 GBMIT8 GBvLLM recipe, own image
Unlimited-OCR-23.34 billion6.69 GBMITNot statedSGLang, per its card
olmOCR-2-7B-1025-FP88.29 billion10.06 GBApache-2.012 GBolmOCR toolkit

The cards name some sizes differently: GLM-OCR says 0.9B, and dots.ocr says a 1.7B language model, while the metadata counts the whole model. Unlimited-OCR lists the same 6.67 GB file under two names, and the Hub repository rednote-hilab/dots.ocr now redirects to dots-studio/dots.ocr. The dots.ocr agreement adds a prohibited-uses clause that covers unauthorized digitization of publications and bulk scraping, and data-privacy rules, so read it before a large run. Unlimited-OCR-2 reached the Hub on 26 October 2026. Its card describes sparse reference sliding window attention, which it says keeps decoding memory nearly constant as a document grows, and it recommends SGLang with a wheel from its own repository. Every GPU DeployGPU rents as a VM has at least 48 GB. By the site's calculated rule, 92 percent of 48 GB is 44.2 GB, and the largest checkpoint above leaves about 34 GB for activations and batches.

GPUGPUsProviderRegionvCPU / RAM / DiskInterconnectPer GPU-hrPer hourLaunch
RTX A6000 48 GB1xQuantaCloudMidwest, US6 / 48 GB / 256 GB-$0.48$0.48Launch
RTX A6000 48 GB1xMassed ComputeIowa, US6 / 32 GB / 256 GB-$0.55$0.55Launch
RTX A6000 48 GB1xQuantaCloudMidwest, US6 / 24 GB / 256 GB-$0.55$0.55Launch
RTX A6000 48 GB1xQuantaCloudMidwest, US6 / 24 GB / 256 GB-$0.55$0.55Launch
RTX A6000 48 GB1xMassed ComputeIowa, US6 / 32 GB / 256 GB-$0.55$0.55Launch
RTX A6000 48 GB1xQuantaCloudMidwest, US12 / 64 GB / 256 GB-$0.57$0.57Launch
19 48 GB GPUs VM offers available, checked 2026-11-13 04:48 UTC. Showing the 6 cheapest. Prices include any platform fee. The deploy page shows the full breakdown before you pay. See all in the marketplace.

Convert a folder of PDFs to Markdown with a pipeline

Docling's CLI reference documents docling convert with a directory as the source, Markdown as the default output and a --device option. MinerU's quick start documents the batch form with a directory and -o. Install each tool in its own virtual environment, as the PyTorch install guide shows for uv:

Code example
pip install docling
docling convert ./pdfs --from pdf --to md --output ./markdown --device cuda
Code example
uv venv --python 3.12 .mineru
source .mineru/bin/activate
uv pip install -U "mineru>=4.0,<5"
mineru-kit parse ./pdfs -o ./markdown --format zip

MinerU's README says mineru[full] suits high-throughput NVIDIA deployments, and its documentation says the first model-backed parse may download weights. Its output reference says --format zip saves markdown.md, middle_json.json, structured_content.json and an images folder, so expect zip files in the output folder. marker and olmOCR take a folder or a glob in the same way:

Code example
pip install marker-pdf
marker ./pdfs --output_dir ./markdown
olmocr ./localworkspace --markdown --pdfs ./pdfs/*.pdf

olmOCR's README asks for a clean conda environment with Python 3.11, the poppler-utils package plus fonts, and pip install olmocr[gpu] from the PyTorch cu128 index, and it writes Markdown to ./localworkspace/markdown/. marker starts a vLLM server in Docker on NVIDIA GPUs by itself, so the VM needs the Container Toolkit, which the toolkit guide covers.

Serve an OCR model with vLLM and send it an image

The vLLM recipe for GLM-OCR, updated on 17 April 2026, asks for vLLM 0.16.0 or newer, and its install notes ask for the nightly wheel and Transformers from source, so check the recipe again before you rely on those lines. This is its Docker command with three changes: it runs detached under a name, the port is bound to the VM's loopback address as in the vLLM guide, and the recipe's --privileged flag is gone. Check the CUDA Version first, as the CUDA guide explains.

Code example
sudo docker run -d --name glm-ocr --gpus all --ipc=host \
  -p 127.0.0.1:8000:8000 \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  vllm/vllm-openai:latest zai-org/GLM-OCR \
  --tensor-parallel-size 1 \
  --speculative-config.method mtp \
  --speculative-config.num_speculative_tokens 1

A model server takes images, so turn the PDF pages into PNG files first. The pdftoppm manual says -png writes PNG files and -r sets the resolution, 150 DPI by default:

Code example
pdftoppm -png scan.pdf page

The recipe's client is the OpenAI SDK with the prompt Text Recognition:, and it says greedy sampling with temperature=0.0 gives the best OCR accuracy. vLLM's multimodal documentation shows base64 data URLs in image_url fields, so this is the recipe's call with a local page in place of its remote URL:

Code example
import base64
from openai import OpenAI

client = OpenAI(api_key="EMPTY", base_url="http://localhost:8000/v1", timeout=3600)
with open("page-1.png", "rb") as f:
    data_url = "data:image/png;base64," + base64.b64encode(f.read()).decode()

response = client.chat.completions.create(
    model="zai-org/GLM-OCR",
    messages=[{
        "role": "user",
        "content": [
            {"type": "image_url", "image_url": {"url": data_url}},
            {"type": "text", "text": "Text Recognition:"},
        ],
    }],
    max_tokens=2048,
    temperature=0.0,
)
print(response.choices[0].message.content)

The other models need their own settings, so use their recipes and cards and not a plain serve command. DeepSeek-OCR, DeepSeek-OCR-2 and Unlimited-OCR need an n-gram logits processor and per-request arguments, and the Unlimited-OCR recipe says empty output almost always means the prompt lacks the literal <image> prefix or skip_special_tokens was left True. PaddleOCR-VL-1.6 adds --max-num-batched-tokens 16384 and uses PaddleOCR as the client for layout. The SSH port forwarding guide shows how to reach the server from your own machine.

Reported accuracy, with the benchmark named

These are the numbers the projects themselves publish in text. They come from different benchmarks and versions, so they do not rank the tools against each other:

ToolReported byBenchmarkResult
GLM-OCRModel cardOmniDocBench V1.594.62
PaddleOCR-VL-1.6Model cardOmniDocBench v1.696.33 percent
dots.ocrModel cardOmniDocBench, overall edit distance0.125 English, 0.160 Chinese, lower is better
olmOCRolmOCR READMEolmOCR-Bench82.4 with a margin of 1.1
markermarker READMEolmocr-bench, balanced mode76.0 percent

I found no headline score in the text of the MinerU, Docling, DeepSeek-OCR or Unlimited-OCR pages I read, so I list none. To find the best OCR model for your documents, run two or three on a sample of your own pages and compare the output by eye, then compare the cost per page, as the Whisper guide does for audio.

Move PDFs in and Markdown out

The Hugging Face cache and the Python environment share the VM's disk, so check df -h first, and note that the disk is fixed by the offer on QuantaCloud, Massed Compute and Hyperstack. Push the PDFs from your machine, run the job in tmux, and pull the Markdown back before you stop the instance, because stopping deletes the disk:

Code example
# from your machine
rsync -avP -e "ssh -p 22" ./pdfs/ ubuntu@YOUR_VM_IP:~/pdfs/
# on the VM: open tmux and run the pipeline command inside it
tmux new -s ocr
# from your machine again, before you stop the instance
rsync -avP -e "ssh -p 22" ubuntu@YOUR_VM_IP:~/markdown/ ./markdown/

Use the user from your deployment's SSH command, which is ubuntu on QuantaCloud and Hyperstack, Ubuntu on Massed Compute and root on Verda. The data transfer guide compares the tools, keeping jobs running covers tmux, and the batch jobs guide shows how to launch, run, copy off and stop from a script. DeployGPU has no idle timer, so the meter runs until you stop the instance.

Launch a GPU VM on a 48 GB GPU

Opens the deploy page on the cheapest 1x 48 GB GPUs offer at 2026-11-13 04:48 UTC: QuantaCloud, $0.48/hr. You can pick another GPU there before paying.

Frequently asked questions

What is the best open source OCR?

It depends on your documents, and the projects report scores on different benchmarks. Run two or three on a sample of your own pages, then pick on accuracy and on cost per page.

How do I convert PDF to Markdown on a GPU?

Run a pipeline over a folder of PDFs. Docling and MinerU document a folder command, marker takes a folder, and olmOCR takes a glob of PDFs. Each writes Markdown to an output folder you copy off before stopping the instance.

What is Unlimited-OCR?

It is Baidu's document parsing model in the DeepSeek-OCR lineage. Its card describes one-shot long-horizon parsing, and version 2 appeared on the Hub on 26 October 2026 with sparse reference sliding window attention.

Which OCR model needs the smallest GPU?

By checkpoint size that is PaddleOCR-VL-1.6 at 1.92 GB and GLM-OCR at 2.65 GB. All the models here fit a 48 GB GPU by calculation, and DeployGPU rents no smaller VM.

Which licenses do these OCR models use?

On the Hub, GLM-OCR, DeepSeek-OCR, Unlimited-OCR and dots.ocr list MIT, while PaddleOCR-VL-1.6, DeepSeek-OCR-2 and olmOCR list Apache-2.0. dots.ocr adds a license agreement file, and marker's weights have their own terms, so read them.

What is an OCR LLM?

It is a vision-language model that reads a page image and writes text, Markdown or JSON. You serve it with a server such as vLLM and send it one image per request.