Datalab's Chandra OCR 2 Beats GPT-4o on Documents at Half the Size
Chandra OCR 2 is a 4B open-source model that tops the olmOCR benchmark at 85.9%, beating GPT-4o and Gemini Flash on structured document extraction across 90+ languages.
ProTakeaways
- Chandra OCR 2 is a 4B open-source model from Datalab that scores 85.9% on the olmOCR benchmark, topping GPT-4o, Gemini Flash, and Mistral OCR.
- Model size dropped from 9B to 4B parameters vs. Chandra 1, while improving accuracy across every benchmark category.
- Supports 90+ languages, with major gains in South Asian scripts (Malayalam +46.2%, Kannada +42.6% over Chandra 1).
- Converts PDFs and images to structured Markdown, HTML, or JSON with full layout, bounding boxes, and image captions in a single pass.
- Free for research and startups under $2M; available via GitHub and HuggingFace, with a hosted API offering $5 free credits.
- Built on Qwen 3.5 VLM fine-tuned on diverse document types; processes ~2 pages/sec on an H100 in real-world usage.
Chandra OCR 2, from Datalab, is a 4-billion parameter open-source model that converts images and PDFs into structured Markdown, HTML, or JSON while preserving full layout information. It just claimed the top spot on the olmOCR benchmark, the most widely used OCR evaluation suite, scoring 85.9% overall and outperforming GPT-4o, Gemini Flash 2, Mistral OCR, and every other open-weight model in the field.
What makes this notable is not just the score. Chandra 2 is smaller than Chandra 1, but improves on it in every category. The model dropped from 9B to 4B parameters, while pushing the olmOCR benchmark score from 83.1% to 85.9% and multilingual accuracy from 69.4% to 77.8% across the top 43 languages. Fewer parameters, better results, and twice the throughput.
The problem it actually solves
Everyone is racing to build smarter AI agents, but there is a quiet problem upstream: most real-world data is trapped in documents. PDFs, scanned insurance forms, handwritten clinical notes, lab reports with complex tables , none of this flows cleanly into an LLM context window. Traditional OCR gives you a text dump. What agents actually need is structured output: tables that are still tables, form fields that are labeled, images that are described, layout that is preserved.
Chandra 2 is built specifically for that. It converts images and PDFs into structured HTML, Markdown, or JSON while keeping full layout information intact. It is not just extracting characters; it is reconstructing the document as a structured artifact.
One model, one pass
What distinguishes Chandra OCR from its predecessors is its full-page decoding approach. Traditional OCR systems operate as pipelines: first segment the document into blocks (text, table, image), then process each block separately. This approach works reasonably for simple documents but fails when layout becomes complex. A table whose merged cells span multiple columns, or a page mixing printed text and handwriting, overwhelms segmentation pipelines.
Chandra takes a radically different approach. Based on a vision-language model, it processes the entire page in a single pass. The model sees the page as a human would: it simultaneously identifies content types, extracts and captions images, preserves table structures including colspan and rowspan, reconstructs forms, and handles handwriting and mathematical equations.
The training approach starts with a strong general-purpose foundation model, then fine-tunes intensively on task-specific data. The base model is Qwen 3.5, a vision-language model from Alibaba's Qwen team, designed to take in both images and text and reason over them. This provides the perception backbone that Chandra 2 builds on. Datalab then fine-tuned this model on a large dataset of documents spanning many categories including academic papers, handwritten forms, tables, multi-language documents, old scans, and more.
Benchmark breakdown
olmOCR is a widely used OCR benchmark from AllenAI. It involves unit testing OCR output against known correct elements. Chandra 2 scores 85.9% overall, and the hosted Datalab API (which adds post-processing on top of the open weights) pushes that to 86.7%.

The model is strong across most categories, but there is one exception worth noting: the "old scans" category (49.8), where Chandra 1 (50.4) holds a slight edge, suggesting that some capability was traded off in the architectural changes, though the gap is negligible and the overall improvement is clear.
On the multilingual side, Datalab built their own benchmark since no good public one existed. Multilingual performance was a focus for Chandra 2. There is no good public multilingual OCR benchmark, so they made their own. It tests tables, math, ordering, layout, and text accuracy. Chandra 2 averages 72.7% vs Gemini 2.5 Flash at 60.8% across 90 languages.

The largest improvements in multilingual performance came in South Asian scripts: Bengali +27.2, Kannada +42.6, Malayalam +46.2, Tamil +26.9, Telugu +39.1. These are languages where most commercial OCR tools still struggle significantly.
What it is good at
- Tables: On the olmOCR benchmark's dedicated table evaluation, it scores 89.9, higher than every competing model tested, including the Datalab hosted API.
- Forms: For paper forms with fill-in boxes and checkboxes, Chandra 2 can detect and accurately represent whether checkboxes are checked or unchecked, and it preserves the semantic structure of the form rather than just outputting a stream of text.
- Multilingual documents: 90+ languages, with particularly strong gains in South Asian and East Asian scripts versus Chandra 1.
- Math and handwriting: Significant improvements to math, tables, layout, and multilingual OCR over Chandra 1.
- Image extraction: Extracts images and diagrams, and adds captions and structured data.
Getting started
The model is available on HuggingFace and installable via pip. There are two inference backends: HuggingFace Transformers for local use, and vLLM for production deployments. The vLLM path is recommended for throughput.
pip install chandra-ocr
# Launch vLLM server (recommended)
chandra_vllm
chandra input.pdf ./output
# Or use HuggingFace backend
pip install chandra-ocr[hf]
chandra input.pdf ./output --method hfEach processed file produces a .md, .html, and _metadata.json output, with extracted images saved alongside. You can also run a Streamlit app locally with pip install chandra-ocr[app] && chandra_app for single-page interactive testing.
Throughput was benchmarked with vLLM on a single NVIDIA H100 80GB GPU using a diverse mix of documents. The benchmark set is significantly slower than real-world usage , Datalab estimates 2 pages per second in real-world usage. At 96 concurrent sequences, the benchmark set achieves 1.44 pages/sec with a 0% failure rate.
Licensing and cost
The code is Apache 2.0. Model weights use a modified OpenRAIL-M license: free for research, personal use, and startups under $2M funding/revenue. The weights cannot be used competitively with Datalab's own API. For broader commercial use, Datalab offers paid licensing. The hosted API starts with $5 in free credits.
Why this matters for the field
For developers, Chandra significantly simplifies document processing pipelines. Instead of chaining a layout detector, text OCR, table extractor, and formula parser, a single model handles everything. The structured output (JSON with bounding boxes) integrates naturally into RAG pipelines and data extraction applications.
The practical use cases are broad: RAG pipelines over scanned archives, automated form processing, clinical document extraction, financial filing parsing, and multilingual document workflows. Clinical documents are a near-perfect stress test for OCR: dense layout, mixed content types, handwriting, structured forms, and high-stakes accuracy requirements. Insurance prior authorization forms with checkboxes, intake questionnaires, lab reports with reference ranges in tables, consent forms, handwritten physician notes, discharge summaries with embedded medication tables , Chandra 2's combination of form reconstruction, handwriting support, table handling, and structured output makes it well-suited for this domain.
The deeper signal here is architectural. The shift from pipeline-based OCR (segment, then recognize) to a single vision-language model doing full-page understanding in one pass is proving to be the right bet. Chandra 2 is the clearest evidence yet that task-specific fine-tuning of a strong VLM base can beat much larger general-purpose models on structured document tasks, and do it at a fraction of the inference cost.