Chandra

Chandra

Datalab's OCR model returns page structure with block positions

Chandra is an OCR model from Datalab, the company behind Marker and Surya. It is a vision-language model: it reads a PDF page or an image and returns its structure as Markdown, HTML or JSON, with the position of every block. Chandra 2, released in March 2026, is built on the Qwen 3.5 architecture.

The chandra-ocr Python package ships a CLI, a library and a small Streamlit app. The model weights are a separate download from Hugging Face.

The comparison of OCR and document conversion tools sets Chandra against classic OCR engines and Markdown converters.

Flowcharts come out as Mermaid, charts as values

  • Output that keeps the layout: the CLI writes a .md, an .html and a _metadata.json per file, plus the extracted images. Chandra 2 tells apart more than 15 block types, tables, forms, equations and chemical structures among them, each with its coordinates.
  • Forms and handwriting: checkboxes are rebuilt, and the README shows cursive writing and handwritten math.
  • Diagrams and charts as data: a flowchart comes out as Mermaid, and a bar, line or pie chart comes out as values, categories and axis labels.
  • 90+ languages: on Datalab's own 43-language benchmark, Chandra 2 averages 77.8%, up from 69.4% for Chandra 1.
  • Two inference paths: a vLLM server by default, or Hugging Face Transformers locally. The CLI handles a single file or a whole folder.

Funding and revenue caps on the weights, competitors barred

The code is Apache 2.0; the weights are not. By default the package loads the datalab-to/chandra-ocr-2 weights, which fall under the repo's MODEL_LICENSE: an OpenRAIL-M license modified by Datalab. Personal and research use are free. Any other use is off-limits once the user, their employer or their organization made more than $2M in gross revenue the previous year, or raised more than $2M in equity or debt. Past either threshold, Datalab's pricing page requires a commercial license.

Datalab's competitors can't use it, whatever their size. The license excludes anyone offering a product or service that competes with Datalab's, and Datalab sells its own document conversion API. The restrictions extend to the model's output, and a model trained on Chandra-generated data to mimic it counts as a derivative under the same license. PaddleOCR, for its PaddleOCR-VL model, and Falcon-Perception publish their weights under Apache 2.0 instead.

The vLLM launcher assumes an NVIDIA GPU. The weights file is 10.6 GB in BF16. chandra_vllm starts a vLLM Docker container through sudo on the NVIDIA runtime; its presets cover cards from 16 GB (T4) to 80 GB (H100).

Datalab's hosted API scores higher than the open weights. The README says the platform runs an improved, more accurate Chandra. On the olmOCR benchmark published in the repo, the API scores 86.7 against 85.8 for Chandra 2, both measured by Datalab. The same table puts Chandra 2 ahead of olmOCR 2, dots.ocr 1.5 and the Mistral OCR API.

Version 0.2, one main developer. Seven 0.1 releases reached PyPI between October 21 and 26, 2025, then 0.2.0 on March 18, 2026, alongside Chandra 2. None since; the last commit dates from June 26, 2026. One developer accounts for 75 of the 82 commits GitHub credits to contributors.