Model reference · open weights

chandra-ocr-2

LLMs datalab-to Vision + text 1 build Open weights 2.9M dl/mo

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.

  • Chandra 2 is a 5.3B parameter image-text-to-text model developed by Datalab for extracting text from images and PDFs while preserving layout information.
  • It outputs markdown, HTML, or JSON and supports over 90 languages, with specific capabilities for handwriting, tables, and math.
  • The model weights are distributed under a modified OpenRAIL-M license, while the code is released under Apache 2.0.

Summary of the datalab-to/chandra-ocr-2 model card, 2026-10-01

What it is

Released bydatalab-to
Released2026-03-16
Parameters5.3B
VRAM10.6 GB for the weights

What it runs on

Memory and cards for chandra-ocr-2 (BF16)

10.6 GBweights, file size
33 MBcache per 1K tokens
103 MBfixed state per request
2.1 GBruntime overhead, at least
262,144 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB———11.6 GB
RTX 4060 Ti 16 GB7278K15.4 GB
RTX 3090 24 GB289all 256K23.4 GB
RTX 4090 24 GB289all 256K23.4 GB
RTX 5090 32 GB4915all 256K31.0 GB
L40S 48 GB8426all 256K44.0 GB
A100 80 GB17655all 256K78.2 GB
H100 80 GB16151all 256K78.1 GB
RTX PRO 6000 Blackwell 96 GB20464all 256K93.8 GB
DGX Spark (GB10) 128 GB unified24075all 256K107 GB
H200 141 GB323101all 256K138 GB
B200 180 GB424134all 256K176 GB
2× RTX 3060 12 GB
tensor parallel
227249K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
4313all 256K15.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
113.1 GB13.9 GB
514.5 GB18.6 GB
815.7 GB22.1 GB
1618.6 GB31.5 GB
3224.6 GB50.3 GB
6436.5 GB88.0 GB

One card, with vLLM's small-card settings.

From the model card

What datalab-to says about chandra-ocr-2

Read 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.

What's New in Chandra 2

  • 85.8% olmocr bench score (sota), 77.8% multilingual bench score (12% improvement over Chandra 1)
  • Significant improvements to math, tables, complex layouts
  • Improved layout, especially on wider documents
  • Significantly better image captioning
  • 90+ language support with major accuracy gains

Features

  • Convert documents to markdown, HTML, or JSON with detailed layout information
  • Excellent handwriting support
  • Reconstructs forms accurately, including checkboxes
  • Strong performance with tables, math, and complex layouts
  • Extracts images and diagrams, with captions and structured data
  • Support for 90+ languages

Quickstart

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

Usage

With vLLM (recommended)

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)

With HuggingFace Transformers

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)

Benchmarks

olmOCR Benchmark

ModelArXivOld Scans MathTablesOld ScansHeaders and FootersMulti columnLong tiny textBaseOverallSource
Datalab API90.490.290.754.691.683.792.399.986.7 ± 0.8Own benchmarks
Chandra 286.989.192.151.191.482.193.799.985.8 ± 0.8Own benchmarks
dots.ocr 1.585.985.590.748.294.085.381.699.783.9dots.ocr repo
Chandra 182.280.388.050.490.881.292.399.983.1 ± 0.9Own benchmarks
olmOCR 283.082.384.947.796.183.781.999.682.4olmocr repo
dots.ocr82.164.288.340.994.182.481.299.579.1 ± 1.0dots.ocr repo
olmOCR v0.3.078.679.972.943.995.177.381.298.978.5 ± 1.1olmocr repo
Datalab Marker v1.10.083.869.774.832.386.679.485.799.676.5 ± 1.0Own benchmarks
Deepseek OCR75.272.379.733.396.166.780.199.775.4 ± 1.0Own benchmarks
Mistral OCR API77.267.560.629.393.671.377.199.472.0 ± 1.1olmocr repo
GPT-4o (Anchored)53.574.570.040.793.869.360.696.869.9 ± 1.1olmocr repo
Qwen 3 VL 8B70.275.145.637.589.162.143.094.364.6 ± 1.1Own benchmarks
Gemini Flash 2 (Anchored)54.556.172.134.264.761.571.595.663.8 ± 1.2olmocr repo

Examples

TypeNameLink
TablesStatistical DistributionView
TablesFinancial TableView
FormsRegistration FormView
FormsLease FormView
MathCS229 TextbookView
MathHandwritten MathView
MathChinese MathView
HandwritingCursive Writing[View](https://githu

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms