Marker
Marker is a document conversion tool that turns PDFs, images, and other file types into markdown, JSON, chunks, and HTML. It solves the problem of extracting structured content from complex documents, including tables, equations, and forms, and is designed for developers and data scientists who need accurate document processing.
🎬 How to adjust a Marker ski binding | Snowcountry · Snowcountry
✨ Key features
- 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 custom formatting and logic
- Optionally boost accuracy with LLMs (and your own prompt)
🎯 Use cases
- Convert PDFs to markdown for use in documentation or LLM training
- Extract tables and forms from scanned documents
- Process large batches of documents for data pipelines
- Generate structured JSON output for further analysis
- Create HTML versions of documents for web display
📦 Installation
🧰 Requirements: Python 3.10+, PyTorch, and for PDFs only the base install; for other formats install marker-pdf[full]. GPU recommended for balanced mode, CPU/MPS supported.
pip install marker-pdf
If you want to use marker on documents other than PDFs, you will need to install additional dependencies with:
pip install marker-pdf[full]
For inference backend: NVIDIA GPU requires Docker and NVIDIA Container Toolkit; CPU/Apple Silicon requires llama.cpp (e.g., brew install llama.cpp).
🚀 Usage
marker_single /path/to/file.pdf
Or from Python:
from marker.converters.pdf import PdfConverter
from marker.models import create_model_dict
from marker.output import text_from_rendered
converter = PdfConverter(
artifact_dict=create_model_dict(),
)
rendered = converter("FILEPATH")
text, _, images = text_from_rendered(rendered)
❓ FAQ
What file formats does Marker support?
Marker supports PDF, image, PPTX, DOCX, XLSX, HTML, and EPUB files.
How do I use Marker with an LLM for higher accuracy?
Pass the --use_llm flag when running Marker. It works with Gemini, Claude, OpenAI-compatible, Azure, Vertex, OpenRouter, or Ollama models, defaulting to gemini-3.5-flash.
Can I run Marker on CPU?
Yes, Marker works on CPU, GPU, or MPS. On CPU, the default mode is fast, which uses a lightweight layout detector and minimal VLM usage.
How do I convert multiple files at once?
Use the marker command with a folder path: marker /path/to/input/folder. You can also use options like --workers to control concurrency.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.