datalab-to /marker

Convert PDF to markdown + JSON quickly with high accuracy

★ 40,836⑂ 2,956👁 139⑃ 407● 714▤ 73◈ 0
PythonApache-2.0Created 2023-10-30www.datalab.to
TA的项目
40,836
stars
+12
2,956
forks
139
watchers
407
prs
714
issues
73
releases
0
discussions

README

Datalab

  State of the Art models for Document Intelligence


  
  
  


  
  
  




 Marker

Marker converts documents to markdown, JSON, chunks, and HTML quickly and accurately.

- Converts PDF, image, PPTX, DOCX, XLSX, HTML, EPUB files in all languages
- Formats tables, forms, equations, inline math, links, references, and code blocks
- Extracts and saves images
- Removes headers/footers/other artifacts
- Extensible with your own formatting and logic
- Optionally boost accuracy with LLMs (and your own prompt)
- Works on GPU, CPU, or MPS

 Try Datalab's Managed Platform

Our managed platform uses Chandra, our latest open source model, and other models — higher accuracy than Marker, with opt-in zero data retention, SOC 2 Type 2, and custom BAAs.

If you have high volume workloads, we offer a batch processing service that has processed 1B+ pages in a day at peak — we manage the infrastructure so your workloads finish on time.

The Datalab API turns documents into verifiable knowledge your agents act on. Every result traces back to its page and position, and one API can parse, extract, fill and edit documents.

Get started with about 5,000 free convert pages every month (work email) — sign up.

 Performance



We measure marker on olmocr-bench, a third-party benchmark of 1,403 PDFs with tests covering math, tables, multi-column layout, scans, and hard edge cases.  Balanced mode scores 76.0% overall — 83.5% on born-digital PDFs — ahead of MinerU and docling and within range of much larger VLMs, while fast mode runs the layout + text-layer path far cheaper (and a no-OCR mode goes faster still).  Scores are the olmocr-bench overall (macro-average across the 8 categories).



See below for the full per-category scores, the competitive comparison, and instructions on how to run your own benchmarks.

 Hybrid Mode

For the highest accuracy, pass the --use_llm flag to use an LLM alongside marker.  This will do things like merge tables across pages, handle inline math, format tables properly, and extract values from forms.  It works with Gemini, Claude, OpenAI-compatible, Azure, Vertex, OpenRouter, or Ollama models.  By default, it uses gemini-3.5-flash.  See below for details.

 Examples

| PDF | File type | Markdown                                                                                                                     | JSON                                                                                                   |
|-----|-----------|------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
| Think Python | Textbook | View                 | View         |
| Switch Transformers | arXiv paper | View | View |
| Multi-column CNN | arXiv paper | View                 | View         |

 Commercial usage

Our code is licensed under Apache 2.0 — free to use, including c

Top issues

Latest release

Marker 2.1.0 v2.1.0 2026-10-29
Surya 2.5. Marker 2.1.0 requires surya-ocr 0.23.0, which uses Surya 2.5 (datalab-to/surya-ocr-2.5) by default: 1.7x as many pages per second as Surya 2 on one H100, and 85.9 on OmniParseBench, the best of any open model under 1B parameters. See the announcement.

- To stay on Surya 2: SURYA_MODEL_CHECKPOINT=datalab-to/surya-ocr-2.


 What's Changed
 CI fixes by @VikParuchuri in https://github.com/datalab-to/marker/pull/1064
 readme updates by @VikParuchuri in https://github.com/datalab-to/marker/pull/1132
 readme updates by @VikParuchuri in https://github.com/datalab-to/marker/pull/1133
 Surya

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON