📈 GH Trending Explorer 🎲 Surprise me

← all repos

datalab-to / marker

git clone https://github.com/datalab-to/marker.git v2.0.0 · 3mo ago

Convert PDF to markdown + JSON quickly with high accuracy

+7
stars, 24h · #2,117
+~49
stars, 7 days · #2,632
+~210
stars, 30 days · #2,573
41k
★ total · +0% this week
2.9k
forks · 494 open issues

Star history (as recorded here)

2026-10-20 · 40,562 ★ 2026-10-22 · 40,585 ★
LanguagePython
LicenseApache-2.0
Created2023-10-30 (2y ago)
Last push3d ago
Watchers149
OwnerOrganization

Links

README excerpt
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 runs a version of our latest open source model, Chandra — higher accuracy than Marker, with zero data retention by default, SOC 2 Type 2, and custom BAAs.
If you have high volume workloads, we offer a batch processing service that has processed 1B+ pages per week — we manage the infrastructure so your workloads finish on time.
Get started with **$5 in free credits** — 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 commercially. Our model weights use a modified AI Pubs Open Rail-M license (free for research, personal use, and startups under $5M funding/revenue). For commercial use of the model weights beyond that, visit our pricing page here.
# Community
Discord is where we discuss future development.
# Installation
You'll need python 3.10+ and PyTorch.
Install with:
 [code] 
If you want to use marker on documents other than PDFs, you will need to install additional dependencies with:
 [code] 
## Inference backend prerequi