selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

baidu logo

Can the RTX 4070 run Unlimited-OCR-2?

Unlimited-OCR-2·3.3B (1.1B active)·GeForce RTX 4070·12 GB VRAM

Saved in this browser, used on every model page.
Yes

Yes. The RTX 4070 runs Unlimited-OCR-2 fully in VRAM at FP16 / BF16 (about 7.1 GB of 12 GB).

best quant
FP16 / BF16
needs
7.1 GB
usable
12 GB

Estimates from the model's size.Try other contexts on the Unlimited-OCR-2 page →

Every quantisation of Unlimited-OCR-2 on the RTX 4070

QuantMemoryFit
Q4_K_M 2.8 GBfits
Q8_0 4.0 GBfits
FP16 / BF16 pick7.1 GBfits

Speed is a bandwidth-based estimate for generating text (504 GB/s); prompt processing and long contexts are slower.

Run Unlimited-OCR-2 on the RTX 4070

Using FP16 / BF16, the best fit for RTX 4070.

llama.cpp · OpenAI-compatible server with a web UIdocs
llama-server -hf AtomicChat/Unlimited-OCR-2-GGUF:BF16

Downloads the GGUF on first run. Installed through llama.app? The same flags work with `llama serve`.

vLLM · Serve an OpenAI-compatible APIdocs
vllm serve baidu/Unlimited-OCR-2
vLLM · Smaller FP8 builddocs
vllm serve AutomatosX/AX-Unlimited-OCR-2-AXQ-MXFP8
vLLM · Docker Compose (NVIDIA)docs
services:
  vllm:
    image: vllm/vllm-openai:latest
    command: baidu/Unlimited-OCR-2
    ports:
      - "8000:8000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 8000.

SGLang · Serve an OpenAI-compatible APIdocs
sglang serve baidu/Unlimited-OCR-2 --host 0.0.0.0 --port 30000
SGLang · Docker Compose (NVIDIA)docs
services:
  sglang:
    image: lmsysorg/sglang:latest
    command: sglang serve baidu/Unlimited-OCR-2 --host 0.0.0.0 --port 30000
    ports:
      - "30000:30000"
    ipc: host
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

API on port 30000.

Transformers · Ask about an imagedocs
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="baidu/Unlimited-OCR-2", dtype="auto", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
            {"type": "text", "text": "Describe this image."},
        ],
    }
]
out = pipe(text=messages, max_new_tokens=256)
print(out[0]["generated_text"][-1]["content"])

OCR models that fit the RTX 4070 comfortably

All that fit →
ModelParamsBest quantMemoryLicence
3.3BA1.1BFP16 / BF16≈8.0 GBFits in memoryCommercial OK
deepseek-ai logoDeepSeek-OCRdeepseek-ai
3.3BA1.1BFP16 / BF16≈8.0 GBFits in memoryCommercial OK
deepseek-ai logoDeepSeek-OCR-2deepseek-ai
3.4BA1.2BFP16 / BF16≈8.1 GBFits in memoryCommercial OK
dots-studio logodots.ocrdots-studio
3BFP16 / BF16≈7.3 GBFits in memoryCommercial OK
3.8BFP16 / BF16≈8.9 GBFits in memoryCheck licence
3.8BFP16 / BF16≈8.9 GBFits in memoryCheck licence

Other GPUs that run Unlimited-OCR-2

Frequently asked questions

Can the RTX 4070 run Unlimited-OCR-2?
Yes. The RTX 4070 runs Unlimited-OCR-2 fully in VRAM at FP16 / BF16 (about 7.1 GB of 12 GB).
Which quantisation of Unlimited-OCR-2 should I use on the RTX 4070?
FP16 / BF16: the largest one that fits. Expected quality: lossless compared with the full-precision weights.

Memory and speed are estimates from the model's size and the card's memory bandwidth; real numbers depend on the runtime, drivers and context length. Community figures are medians of user reports.