This is an early release preview. You may encounter bugs.
Marker logo
Unclaimed

Tool data-wrangling

Marker

Converts PDFs and other documents to markdown/JSON with high accuracy.

B 73/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Marker.

Marker converts documents to markdown, JSON, chunks, and HTML. It reads PDF, image, PPTX, DOCX, XLSX, HTML, and EPUB files in all languages, formats tables, forms, equations, inline math, links, references, and code blocks, extracts and saves images, and strips running headers, footers, and other artifacts. It runs on GPU, CPU, or MPS.

Conversion runs in one of two modes. Balanced, the default on a GPU, uses the Surya vision-language model (VLM) for layout, OCRs inline math, and re-OCRs a whole page whenever any of its embedded text is bad. Fast, the default on CPU and MPS, uses a lighter layout detector, extracts text with pdftext, and calls the VLM only for equations, individual garbled or empty blocks, and pages that are scanned or mostly bad. Tables are reconstructed from the text layer in both modes, and --disable_ocr removes VLM calls entirely.

The VLM is served by a local inference server that Marker spawns on first use, vLLM under Docker on NVIDIA GPUs and llama.cpp on CPU or Apple Silicon, or you can point it at an already-running server through a configurable URL. Thin CPU workers share a single server, and the parent process budgets total concurrency across them, so adding workers does not over-queue the server. Folder mode adds worker pools, resume with --skipexisting, and sharding across machines with --numchunks and --chunk_idx.

Passing --use_llm adds a model on top of the pipeline to merge tables across pages, handle inline math, format tables, and extract values from forms, with services for Gemini, Google Vertex, Claude, Azure OpenAI, OpenRouter, and Ollama, defaulting to gemini-3.5-flash. A custom correction prompt can be supplied, and processors, converters, and renderers can be replaced.

Conversion quality is measured on olmocr-bench, a third-party set of 1,403 PDFs with roughly 8,400 pass or fail tests covering math, table structure, reading order, headers and footers, multi-column layout, and old scans. Reported scores are the macro-average across its 8 categories. The published comparison, with throughput as sustained concurrent pages per second on one B200 host:

System Overall Digital-only Throughput (pages/sec)
Chandra 2 (hosted) 85.8 n/a n/a
Gemini Flash 3.5 (API) 76.4 79.1 n/a
Marker, balanced (GPU) 76.0 83.5 2.9
MinerU pipeline (GPU) 72.7 83.3 0.54
Marker, fast (GPU) 66.6 71.6 7.4
Docling (GPU) 50.3 64.0 2.1
Marker, fast with no OCR (CPU) 43.6 55.8 23.7
liteparse (CPU) 22.4 27.3 8.9
  • Input formats: PDF, image, PPTX, DOCX, XLSX, HTML, and EPUB files in all languages
  • Output formats: markdown, JSON, HTML, and chunks, with LaTeX equations, HTML tables, and extracted images
  • Two modes: balanced for quality on a GPU and fast for cheaper CPU conversion, plus --disable_ocr for pure text-layer extraction
  • Hybrid LLM pass: --use_llm merges tables across pages, handles inline math, formats tables, and extracts form values
  • LLM services: Gemini, Google Vertex, Claude, Azure OpenAI, OpenRouter, and Ollama, with gemini-3.5-flash as the default
  • Local inference server: vLLM on NVIDIA GPUs or llama.cpp elsewhere, spawned automatically or reused
  • Alternate converters: a table-only converter and an OCR-only converter take the same configuration as the PDF converter
  • Block tree: JSON output is a tree of typed blocks with polygons and section hierarchy that you can query from Python
  • Batch conversion: folder mode with worker pools, --skipexisting resume, --maxfiles, and multi-machine sharding
  • Extensible pipeline: processors, converters, and renderers can be overridden, and a block correction prompt customizes LLM output
  • Page control: --pagerange limits conversion to selected pages and --paginateoutput marks page boundaries in the output
  • Interactive app: a Streamlit interface for trying conversions with basic options

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Marker.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Marker →

Browse the catalog