Installation and setup
Docling installs from PyPI and runs locally. It needs no API key, but it downloads layout and table models from Hugging Face the first time it converts a PDF.
pip install docling 2.127.0
One package installs the document backends for every format in this course and the machine-learning parts needed for PDFs.
pip install "docling==2.127.0"from importlib.metadata import version
print(version("docling"))Layout and table models from Hugging Face
Markdown, HTML and CSV need no models. The first PDF conversion in lesson 14 downloads Docling's models from Hugging Face, about half a gigabyte. docling-tools models download fetches them in advance, which helps on a machine that will later run offline.
docling-tools models downloadPublic model downloads work without a Hugging Face account. If you hit download rate limits, log in with hf auth login or set HF_TOKEN to a token from your Hugging Face settings.
- Run
docling --helpand read the list of options.
Little by little, you're building something great.