Model reference · open weights
chandra-ocr-2 is an open-weight language model from datalab-to. chandra-ocr-2 (BF16) weighs 10.6 GB; the smallest configuration that runs it is RTX 4060 Ti 16 GB.
Summary of the datalab-to/chandra-ocr-2 model card, 2026-10-01
What it is
| Released by | datalab-to |
|---|---|
| Released | 2026-03-16 |
| Parameters | 5.3B |
| VRAM | 10.6 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB | — | — | — | 11.6 GB |
| RTX 4060 Ti 16 GB | 7 | 2 | 78K | 15.4 GB |
| RTX 3090 24 GB | 28 | 9 | all 256K | 23.4 GB |
| RTX 4090 24 GB | 28 | 9 | all 256K | 23.4 GB |
| RTX 5090 32 GB | 49 | 15 | all 256K | 31.0 GB |
| L40S 48 GB | 84 | 26 | all 256K | 44.0 GB |
| A100 80 GB | 176 | 55 | all 256K | 78.2 GB |
| H100 80 GB | 161 | 51 | all 256K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 204 | 64 | all 256K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 240 | 75 | all 256K | 107 GB |
| H200 141 GB | 323 | 101 | all 256K | 138 GB |
| B200 180 GB | 424 | 134 | all 256K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 22 | 7 | 249K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 43 | 13 | all 256K | 15.4 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 13.1 GB | 13.9 GB |
| 5 | 14.5 GB | 18.6 GB |
| 8 | 15.7 GB | 22.1 GB |
| 16 | 18.6 GB | 31.5 GB |
| 32 | 24.6 GB | 50.3 GB |
| 64 | 36.5 GB | 88.0 GB |
One card, with vLLM's small-card settings.
From the model card
Chandra 2 is a state of the art OCR model from Datalab that outputs markdown, HTML, and JSON. It is highly accurate at extracting text from images and PDFs, while preserving layout information.
Try Chandra in the free playground, or use the hosted API for higher accuracy and speed.
pip install chandra-ocr
# With vLLM (recommended, easy install)
chandra_vllm
chandra input.pdf ./output
# With HuggingFace (requires torch)
pip install chandra-ocr[hf]
chandra input.pdf ./output --method hf
from chandra.model import InferenceManager
from chandra.model.schema import BatchInputItem
from PIL import Image
# Start vLLM server first with: chandra_vllm
manager = InferenceManager(method="vllm")
batch = [
BatchInputItem(
image=Image.open("document.png"),
prompt_type="ocr_layout"
)
]
result = manager.generate(batch)[0]
print(result.markdown)
from transformers import AutoModelForImageTextToText, AutoProcessor
from chandra.model.hf import generate_hf
from chandra.model.schema import BatchInputItem
from chandra.output import parse_markdown
from PIL import Image
import torch
model = AutoModelForImageTextToText.from_pretrained(
"datalab-to/chandra-ocr-2",
dtype=torch.bfloat16,
device_map="auto",
)
model.eval()
model.processor = AutoProcessor.from_pretrained("datalab-to/chandra-ocr-2")
model.processor.tokenizer.padding_side = "left"
batch = [
BatchInputItem(
image=Image.open("document.png"),
prompt_type="ocr_layout"
)
]
result = generate_hf(batch, model)[0]
markdown = parse_markdown(result.raw)
print(markdown)
| Model | ArXiv | Old Scans Math | Tables | Old Scans | Headers and Footers | Multi column | Long tiny text | Base | Overall | Source |
|---|---|---|---|---|---|---|---|---|---|---|
| Datalab API | 90.4 | 90.2 | 90.7 | 54.6 | 91.6 | 83.7 | 92.3 | 99.9 | 86.7 ± 0.8 | Own benchmarks |
| Chandra 2 | 86.9 | 89.1 | 92.1 | 51.1 | 91.4 | 82.1 | 93.7 | 99.9 | 85.8 ± 0.8 | Own benchmarks |
| dots.ocr 1.5 | 85.9 | 85.5 | 90.7 | 48.2 | 94.0 | 85.3 | 81.6 | 99.7 | 83.9 | dots.ocr repo |
| Chandra 1 | 82.2 | 80.3 | 88.0 | 50.4 | 90.8 | 81.2 | 92.3 | 99.9 | 83.1 ± 0.9 | Own benchmarks |
| olmOCR 2 | 83.0 | 82.3 | 84.9 | 47.7 | 96.1 | 83.7 | 81.9 | 99.6 | 82.4 | olmocr repo |
| dots.ocr | 82.1 | 64.2 | 88.3 | 40.9 | 94.1 | 82.4 | 81.2 | 99.5 | 79.1 ± 1.0 | dots.ocr repo |
| olmOCR v0.3.0 | 78.6 | 79.9 | 72.9 | 43.9 | 95.1 | 77.3 | 81.2 | 98.9 | 78.5 ± 1.1 | olmocr repo |
| Datalab Marker v1.10.0 | 83.8 | 69.7 | 74.8 | 32.3 | 86.6 | 79.4 | 85.7 | 99.6 | 76.5 ± 1.0 | Own benchmarks |
| Deepseek OCR | 75.2 | 72.3 | 79.7 | 33.3 | 96.1 | 66.7 | 80.1 | 99.7 | 75.4 ± 1.0 | Own benchmarks |
| Mistral OCR API | 77.2 | 67.5 | 60.6 | 29.3 | 93.6 | 71.3 | 77.1 | 99.4 | 72.0 ± 1.1 | olmocr repo |
| GPT-4o (Anchored) | 53.5 | 74.5 | 70.0 | 40.7 | 93.8 | 69.3 | 60.6 | 96.8 | 69.9 ± 1.1 | olmocr repo |
| Qwen 3 VL 8B | 70.2 | 75.1 | 45.6 | 37.5 | 89.1 | 62.1 | 43.0 | 94.3 | 64.6 ± 1.1 | Own benchmarks |
| Gemini Flash 2 (Anchored) | 54.5 | 56.1 | 72.1 | 34.2 | 64.7 | 61.5 | 71.5 | 95.6 | 63.8 ± 1.2 | olmocr repo |
| Type | Name | Link |
|---|---|---|
| Tables | Statistical Distribution | View |
| Tables | Financial Table | View |
| Forms | Registration Form | View |
| Forms | Lease Form | View |
| Math | CS229 Textbook | View |
| Math | Handwritten Math | View |
| Math | Chinese Math | View |
| Handwriting | Cursive Writing | [View](https://githu |
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.