Skip to content

VersusCPU

Docling vs Marker: Which PDF-to-Markdown Tool Is Best for Local AI?

Docling and Marker are two of the most popular free tools for turning PDFs into clean Markdown for local AI document chat. We compare their licences, hardware needs, GPU use, supported formats and features, using each project's official documentation.

By , Senior Hardware Editor

5 min read

Docling vs Marker: Which PDF-to-Markdown Tool Is Best for Local AI?

Local document chat is only as good as the text you feed it. Before an embedding model or LLM sees your PDFs, a converter has to turn them into clean Markdown, keeping headings, tables and the right reading order. Two of the most popular free tools for the job are Docling, which started at IBM Research, and Marker, from Datalab. Both run on your own PC, but they differ in licences, hardware needs and how they use a GPU. This comparison is based on each project's official GitHub README and documentation.

The short version

Docling

Marker

Developer

Started by IBM Research Zurich; hosted by LF AI & Data Foundation

Datalab

Code licence

MIT

Apache 2.0

Model licence

Per model (check each one)

Modified AI Pubs Open Rail-M: free for research, personal use and startups under $5M funding/revenue

Python

3.10 or newer

3.10 or newer

Main inputs

PDF, Office files, HTML, EPUB, images, LaTeX, audio and video

PDF, images, PPTX, DOCX, XLSX, HTML, EPUB

Outputs

Markdown, HTML, text, JSON, chunks and more

Markdown, JSON, HTML, chunks

GPU

Optional (CUDA, MPS, XPU or CPU)

Optional; GPU modes use a local vLLM (Nvidia, via Docker) or llama.cpp server

LLM boost

VLM pipeline (GraniteDocling)

--use_llm with Gemini, Claude, OpenAI-compatible or Ollama models

Install

pip install docling

pip install marker-pdf

Licences: the biggest practical difference

For personal use at home, both are free. The difference matters if you're using them for work. Docling's codebase is MIT-licensed, and its README says the individual models carry their own licences. Marker's code is Apache 2.0, but Datalab's README says its model weights use a modified AI Pubs Open Rail-M licence that is free for research, personal use and startups under $5M in funding or revenue; beyond that, commercial use of the weights needs a paid licence from Datalab. If you're setting up document chat for a business, read both licences before choosing.

How they work

Docling runs a pipeline of layout, table-structure and OCR models over each page and builds what it calls a DoclingDocument, which it can then export as Markdown, JSON and other formats. The README lists layout, reading order, table structure, code and formulas among the things it understands. It also offers a VLM pipeline that reads pages with IBM's small GraniteDocling vision model instead.

Marker offers four modes, according to its README:

  • no_ocr uses the PDF's own text layer plus a small ONNX layout model on the CPU, with no OCR at all.

  • fast (the default on CPU and Apple Silicon) adds ONNX-based OCR, still without a separate server.

  • balanced (the default on a GPU) handles clean prose on the CPU and sends equations, complex tables, non-Latin scripts and scans to Datalab's Surya 2.5 vision model.

  • vllm runs the Surya vision model on every page for the highest accuracy.

In the balanced and vllm modes, Marker starts a local Surya inference server for you: vLLM in Docker on Nvidia GPUs (which needs the Nvidia Container Toolkit), and llama.cpp's llama-server elsewhere.

Speed and accuracy: Datalab's own claims

Marker's README includes benchmark results from Datalab on its OmniParseBench test set and on olmOCR-bench. On those figures, Marker's balanced mode scores 80.5 on OmniParseBench at 16.9 pages per second, against 67.5 at 2.1 pages per second for Docling, and the CPU-only fast mode scores 78.6 at 23.6 pages per second. These are a developer's results for its own product on the tests it chose, so treat them as a guide rather than a verdict; speeds also depend heavily on your hardware and documents.

What you can take from the README is how Marker is designed: in balanced mode it keeps easy pages on the CPU and only spends GPU time on the hard ones. Docling's GPU guide, by contrast, focuses on raising batch sizes so its models keep a graphics card busy.

Hardware: what your PC needs

Neither tool needs a powerful graphics card for occasional use. Docling's CLI picks a device automatically (auto, cpu, cuda, mps or xpu), and on Linux its install guide suggests a CPU-only PyTorch build if you have no GPU. Marker's fast and no_ocr modes run entirely on the CPU or Apple Silicon.

The difference comes with GPUs. Docling uses your card through PyTorch directly. Marker's GPU modes use a separate inference server, which means Docker on Nvidia systems; that's straightforward on Linux but an extra step on Windows. If you're short on VRAM, our guide to how much VRAM you need explains what else competes for it, such as the LLM you're chatting with.

Formats and features

Docling reads more kinds of input. Its supported-formats page lists Office files (including legacy DOC, XLS and PPT via LibreOffice), OpenDocument, EPUB, Apple Pages, Numbers and Keynote, HTML, LaTeX, images, and audio and video files that it transcribes. It also has ready-made integrations with LangChain, LlamaIndex, Haystack and Crew AI, an MCP server and an API server, and Open WebUI lists it as a built-in document extraction engine.

Marker focuses on documents: PDF, images, PPTX, DOCX, XLSX, HTML and EPUB (non-PDF files need pip install marker-pdf[full]). Its strengths are in output clean-up: the README says it formats tables, forms, equations, inline maths, links and code blocks, and removes headers, footers and other artefacts. It also has a built-in web viewer (marker_gui) for checking layout and reading order page by page, and a --use_llm mode that can use a local Ollama model to merge tables across pages, handle inline maths and extract values from forms.

Which should you choose?

  • Choose Docling if you want the most permissive licence, need to convert lots of file types (including audio, video and Apple iWork files), or plan to plug it into Open WebUI or a LangChain/LlamaIndex pipeline. GPU use is also simpler to set up on Windows, as Docling uses PyTorch directly rather than a Docker-based inference server.

  • Choose Marker if your documents are mostly PDFs heavy on maths, tables or scans, you value Datalab's speed claims, and your use falls within its model licence. It's also a good fit for CPU-only laptops thanks to its fast mode.

  • Try both if accuracy matters: convert a handful of your own trickiest documents with each and compare the Markdown. Both are free to install.

If you mainly need to pull text out of scans and photos rather than full document structure, our best free OCR software guide covers simpler tools, and our best local AI document chat apps guide covers where the converted files go next.

The bottom line

Docling and Marker both turn PDFs into clean Markdown on your own PC, for free at home. Docling is the safer all-rounder, with an MIT licence, the widest range of input formats and built-in support in Open WebUI. Marker is aimed at hard PDFs, with smart CPU/GPU routing and Datalab's own benchmarks showing it ahead on speed and accuracy, but its model weights have a more restrictive licence for larger businesses. Test both on your own documents before committing.

Sources

  1. 01Docling project, Docling GitHub README
  2. 02Docling documentation, Supported formats
  3. 03Docling documentation, CLI reference
  4. 04Docling documentation, GPU support
  5. 05Datalab, Marker GitHub README
  6. 06Open WebUI documentation, Retrieval Augmented Generation (RAG)

About the author

Callum Reid

Senior Hardware Editor

Callum leads GPU, CPU and platform architecture coverage at Forge PC. Before joining the editorial desk, he spent nine years specifying, assembling and stress-testing custom gaming and workstation systems in the UK, with a focus on PCIe bandwidth, VRM thermal design, DDR5 memory tuning and 1440p/4K frame-time consistency.

More from Callum Reid

Read next

RX 9060 XT 16GB vs RX 9070: Is the Bigger Radeon Worth the Step Up?

Versus

RX 9060 XT 16GB vs RX 9070: Is the Bigger Radeon Worth the Step Up?

The RX 9060 XT 16GB and RX 9070 both have 16GB of GDDR6, but AMD's specs show the RX 9070 has 56 compute units to 32, a 256-bit bus with twice the bandwidth and a 650W PSU recommendation. We compare them on official specs to show who should pay for the bigger card.

Callum Reid4 min

MangoHud-next Beta Arrives: A Rewritten Linux Performance Overlay

News

MangoHud-next Beta Arrives: A Rewritten Linux Performance Overlay

MangoHud 0.8.5-rc1 introduces MangoHud-next, a beta server/client rewrite of the Linux performance overlay with YAML layouts, per-process GPU and VRAM metrics, a reworked FPS limiter and direct Gamescope support. It runs alongside MangoHud-classic, so existing setups are unchanged.

Eleanor Shaw4 min

Best PDF-to-Markdown Tools for Local RAG in 2026

Best Picks

Best PDF-to-Markdown Tools for Local RAG in 2026

Local RAG is only as good as the text you feed it. We pick the best free, open-source tools for turning PDFs into clean Markdown on your own PC, from Docling and Marker to MinerU and olmOCR, with licences and the hardware each developer says you need.

Hannah Vance5 min

How to Convert PDFs to Markdown for Local AI with Docling

How-To

How to Convert PDFs to Markdown for Local AI with Docling

Clean input documents make local AI document chat far more accurate. Using Docling's official documentation, we show how to install the free tool, convert PDFs to Markdown or chunks, handle scans with OCR and use your graphics card to speed it up.

Marcus Thorne6 min