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.
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.