Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines
by Datalab
The open model currently topping olmOCR-Bench — turns messy PDFs, forms and handwriting into layout-preserving Markdown, HTML or JSON.
Overview
Chandra is an open document-OCR model and toolkit from Datalab, the team behind Marker, aimed squarely at the ingestion stage of RAG and LLM training pipelines rather than at classic text OCR. Chandra 2, released in March 2026 (Chandra 1 shipped October 2025), is a roughly 5B-parameter vision-language model fine-tuned from Qwen 3.5 that converts PDFs and images into structured Markdown, HTML or JSON while preserving layout, and emits cropped images with their coordinates. It targets the cases that break naive parsers: complex and financial tables, filled forms including checkboxes, cursive handwriting, mathematical notation, multi-column academic layouts, headers and footers, and chart and chemistry notation. On olmOCR-Bench it scores 85.8 plus or minus 0.8 overall — the leading open model at the time of writing, ahead of olmOCR's 82.4 — with 92.1 on tables and 93.7 on long tiny text, and it averages 77.8% across a 43-language multilingual benchmark, extending to 90+ supported languages. The README documents three ways to run it: `pip install chandra-ocr` then the `chandra` CLI against either the HuggingFace or vLLM backend, a `chandra_vllm` server for throughput (about 1.44 pages per second on a single H100 80GB at 96 concurrent sequences), a Streamlit UI via `chandra_app`, and a hosted Datalab API with zero data retention and SOC 2 Type 2. Read the licensing before you commit: the code is Apache 2.0, but the weights are modified OpenRAIL-M — free for research, personal use and startups under $2M in funding or revenue, with a paid licence required for commercial self-hosting and a clause forbidding building a competitor to Datalab's own API.
At a Glance
- Topic
- RAG
- Level
- Intermediate
- Format
- Documentation
- Cost
- Freemium
- Duration
- ~1-2 hours to your first converted document; reference docs thereafter
- Provider
- Datalab
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Convert PDFs and images to layout-preserving Markdown, HTML or JSON with a single CLI invocation
- ✓Choose between the HuggingFace and vLLM backends, and understand which one fits batch versus interactive work
- ✓Stand up a `chandra_vllm` server and tune batch size and concurrency for production page throughput
- ✓Extract tables, filled forms with checkboxes, handwriting, equations and multi-column layouts that break naive parsers
- ✓Pull out cropped images and their layout coordinates so figures survive into a multimodal RAG index
- ✓Read olmOCR-Bench category scores to decide whether Chandra beats your current parser on your document mix
- ✓Work through the modified OpenRAIL-M weight licence and decide between self-hosting and the Datalab API
- ✓Process multilingual corpora across 90+ languages and check the per-language benchmark before trusting a locale
Highlights
- •Currently the top open model on olmOCR-Bench at 85.8, ahead of olmOCR (82.4) — and the benchmark is public, so the claim is checkable
- •Layout-aware output including image crops with coordinates, not just a flat text dump — which is what actually improves chunking
- •Three documented run paths (local HuggingFace, self-hosted vLLM, hosted API) so you can prototype and scale without changing tools
- •Strong on the hard categories most parsers quietly fail: 92.1 on tables, 93.7 on long tiny text, plus handwriting and math
- •From the Marker team, ~12.2k GitHub stars and roughly 2.6M HuggingFace downloads in the last month — heavily exercised in the wild
Who It’s For
Best For
- ✓RAG engineers whose retrieval quality is bottlenecked by bad PDF-to-text conversion
- ✓Teams building LLM training or evaluation corpora from scanned and born-digital document archives
- ✓Anyone processing tables, forms or handwriting where off-the-shelf OCR loses structure
- ✓Practitioners with multilingual document sets who need per-language accuracy numbers before committing
Prerequisites
- •Python and pip, plus an NVIDIA GPU for local inference — the hosted API is the only CPU-friendly path
- •Familiarity with vLLM or Docker if you intend to serve it for batch throughput rather than one-off conversions
- •Legal review if this is commercial: the weights are not Apache 2.0 and self-hosting above the startup threshold needs a paid licence
FAQ
What is Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines?
Chandra is an open document-OCR model and toolkit aimed at the ingestion stage of RAG and LLM training pipelines rather than at classic text OCR. It is for engineers whose retrieval quality is limited by how badly their PDFs parse — scanned reports with merged-cell tables, filled forms with checkboxes, multi-column papers with equations, handwritten notes. The repository documents local, vLLM-server and hosted paths, so after working through it you can convert a document corpus to layout-preserving Markdown, HTML or JSON at production throughput.
Is Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines free?
Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines offers free content, with paid options for certificates or premium features.
What level is Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines for?
Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines is aimed at a intermediate audience. Recommended background: Python and pip, plus an NVIDIA GPU for local inference — the hosted API is the only CPU-friendly path, Familiarity with vLLM or Docker if you intend to serve it for batch throughput rather than one-off conversions, Legal review if this is commercial: the weights are not Apache 2.0 and self-hosting above the startup threshold needs a paid licence.
How long does Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines take?
Expect roughly ~1-2 hours to your first converted document; reference docs thereafter. Most learners work through it at their own pace.
What will I learn from Chandra OCR 2 — Open Document OCR for RAG and LLM Data Pipelines?
You'll learn: Convert PDFs and images to layout-preserving Markdown, HTML or JSON with a single CLI invocation; Choose between the HuggingFace and vLLM backends, and understand which one fits batch versus interactive work; Stand up a `chandra_vllm` server and tune batch size and concurrency for production page throughput; Extract tables, filled forms with checkboxes, handwriting, equations and multi-column layouts that break naive parsers; Pull out cropped images and their layout coordinates so figures survive into a multimodal RAG index; Read olmOCR-Bench category scores to decide whether Chandra beats your current parser on your document mix; Work through the modified OpenRAIL-M weight licence and decide between self-hosting and the Datalab API; Process multilingual corpora across 90+ languages and check the per-language benchmark before trusting a locale.
Topics
Sources
This page was written from 2 sources, 1 on domains other than github.com.