Black Friday: 10% off every GPU you launch, no code needed. Until 30 Nov. Rent a GPU

Arrakis / Blog / Images, video, speech and robots

DeepSeek OCR GPU Guide: Document AI on One Small Card

You do not need a data-center GPU for document AI. DeepSeek-OCR needs about 8 GB of GPU memory in 16-bit, and a 24 GB RTX 4090 holds that three times over. Rent that DeepSeek OCR GPU by the hour, serve the model at full precision as your own endpoint, and pay for hours instead of pages.

What it needs

Model Params 16-bit 8-bit 4-bit Context Licence
DeepSeek-OCR 3.3B 8 GB 4 GB 2 GB 8,192 MIT
Unlimited-OCR 3.3B 8 GB 4 GB 2 GB 32,768 MIT

Every cell fits one RTX 4090, at the live price an hour right now. The memory includes about 20% for the KV cache at moderate context, per the GPU memory guide. Both models are small mixtures of experts, and their model pages count every expert in the memory, as you should for any MoE. Neither is gated, so no Hugging Face token is needed.

The context column is the real difference between the two. Unlimited-OCR takes four times DeepSeek-OCR's context window, which matters when a page, or its output, runs long.

Skip the quantization

Quantizing exists to squeeze a model into a smaller card. Here the model already fits with 16 GB to spare in 16-bit, so 8-bit or 4-bit saves memory you are not short of, and you would be testing a changed model for nothing. Serve the published 16-bit weights.

The spare memory is not wasted, either. The KV cache grows with long pages and with many documents in flight at once, and that is exactly what the headroom pays for.

Deploy it

Shell
curl -X POST https://arrakis.goodailabs.com/v1/deploy \
  -H "Authorization: Bearer ark_..." \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-ai/DeepSeek-OCR", "engine": "vllm",
       "termination_hours": 4}'

Without a node_id, Arrakis rents the best-ranked machine that holds the model, on as few GPUs as it allows. Send the same body to POST /v1/deploy/plan first to see every option and its price, for free. The deploy's answer carries the endpoint and its own API key, and the model answers a few minutes later, once the engine has downloaded it. Swap the model name for baidu/Unlimited-OCR to try the other one. Every option is on the deploy page.

Send it a page

The endpoint speaks the OpenAI chat API, so a page goes in as an image:

Python
import base64
from openai import OpenAI

client = OpenAI(base_url="http://<endpoint>/v1", api_key="sk-...")
page = base64.b64encode(open("scan-p1.png", "rb").read()).decode()
reply = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-OCR",
    messages=[{"role": "user", "content": [
        {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{page}"}},
        {"type": "text", "text": "Convert the document to markdown."},
    ]}],
)
print(reply.choices[0].message.content)

The prompts that work best for each model are on its model card; start there, and keep the one that gives you clean output for your documents. The key in that code is the endpoint's own key, made at deploy time, not your Arrakis token.

PDFs, folders and big backlogs

The model reads images, so turn PDF pages into PNGs first, with any PDF tool you like. For a large backlog, run the batch next to the model instead of over the internet: you have root SSH, so copy the scans to the machine with scp or rsync and point your script at http://localhost:8000/v1 on the machine itself. Keep the scans and the output on a volume at /mnt (pass volume_id in the deploy call) if they should outlive the machine; a volume is billed per GB-month of data it holds.

From pages to data

OCR gives you text. If you need fields (dates, totals, names), chain a second endpoint: deploy a language model such as Qwen3.8-27B on its own card and ask it to pull the fields out of the markdown as JSON. Two machines, two hourly prices, and both stop when the batch does.

Cost per page, honestly

We do not publish pages-per-hour figures for OCR: page size, layout and output length all move them. The math is two lines once you measure:

  • Pages per hour = what you process in your first full hour.
  • Cost per page = the live price / pages per hour, on an RTX 4090.

Then make the hour count:

  • Batch the backlog. Send pages in parallel, not one at a time. The endpoint serves several requests at once, and idle minutes bill the same as busy ones.
  • Set the removal time to the job. termination_hours removes the machine and stops the billing. A backlog that takes two hours should not keep a machine for eight.
  • Run it on a schedule. Deploy when the day's scans land, terminate when they are done. An agent can do both from one prompt (deploy a model from chat).

Each started hour is charged in full, at the price locked when you rented, so a two-hour backlog is 2 x the live price whatever the page count turns out to be.

Let an agent run the backlog

An agent connected to the Arrakis MCP server can run the whole job inside a spend cap:

Text
Deploy deepseek-ai/DeepSeek-OCR with vLLM for 3 hours. Send every PNG in ./scans
to it with the prompt from the model card, save each answer as markdown in ./out,
then terminate the machine.

It plans with plan_deploy, deploys with deploy_model, waits for the endpoint, works through the files and calls terminate_instance. The token's cap counts the rental at its worst case before it starts.

Your endpoint, and its limits

The endpoint is your machine's address, with a gate that checks its key before a request reaches the engine. To keep pages off the open internet, open an SSH tunnel and call http://localhost:8000/v1:

Shell
ssh root@<host> -p <port> -N -L 8000:localhost:8000

The limit, stated plainly: machines run on independent hosts, and a host can read what runs on its machine. Use your own OCR endpoint for archives, catalogs, public filings and other non-confidential documents, and keep regulated or confidential records off it. More in private LLM deployment.

Other OCR models

The /models catalog has more document models, including DeepSeek-OCR-2 and HunyuanOCR. Each has its own page with the same memory check and a link to deploy it.

Digitize the backlog

One small card, one call, an endpoint that bills by the hour. Start in the console.

New here? Use code FIRST25 for $25 off your first deposit of $50 or more, until 31 December 2026.

Rent the GPUs in this post

New here? Use code FIRST25 for $25 off your first deposit of $50 or more, until 31 December 2026.

Lowest price now, per GPU-hour. Billed per started hour; stop any time.

Questions

How much GPU memory does DeepSeek-OCR need?
About 8 GB in 16-bit, 4 GB in 8-bit and 2 GB in 4-bit, including about 20% for the KV cache at moderate context. One RTX 4090 (24 GB) runs it at full precision.
Do I need to quantize DeepSeek-OCR?
No. In 16-bit it needs about 8 GB, which already fits a 24 GB card, so quantizing saves memory you are not short of.
What is the difference between DeepSeek-OCR and Unlimited-OCR?
Both have 3.3B parameters, need the same memory and are MIT-licensed. DeepSeek-OCR's context window is 8,192 tokens; Unlimited-OCR's is 32,768.
How much does OCR cost per page on a rented GPU?
Divide the GPU's hourly price by the pages you process in an hour. Measure your pages per hour in the first hour; we do not publish a speed figure.
Can I send confidential documents to it?
The endpoint is yours, behind its own key, and you can reach it through an SSH tunnel. But machines run on independent hosts that can read what runs on them, so keep regulated or confidential documents off it.

More from the blog

Every postRSS feed