docling-project / docling-project/docling

Conversion seems slow, while GPU is underutilized - num_threads seem to have absolutely no effect

Open
#1,715 6 comments 0 reactions 0 assignees View on GitHub
performance question
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
3d 4h
Merged PRs (30d)
98

Description

### Question

Hello, everyone. Thanks for making such a great tool available.

I've been trying to get faster conversions, but tweaking the parameters seems to have little to no effect when compared with the default configuration.

I'm trying to run Docling on a VM in Google Cloud with the following especifications:
- **Machine type**: g2-standard-8 (8 vCPUs, 32 GB Memory)
- **GPUs**: 1 x NVIDIA L4 (24 Gb VRAM)
- **OS**: Ubuntu 22.04 LTS NVIDIA version: 570 (also tryed with debian 12 and ubuntu 24.04)
- **Python 3.10.2** (also tryed with 3.11, 3.12 and 3.13)
- **Cuda 12.9**
- **Docling 2.35** (also tryed with 2.34, 2.30, 2.26, 2.15, 2.11)

I'm currently working on a dataset os quarter reports for brazilian companies.

This is one example for the 1st quarter of 2025 for Vale do Rio Doce (search for "Vale IFRS 1Q25_POR - Mziq" if you don't want to click the link) :
https://api.mziq.com/mzfilemanager/v2/d/53207d1c-63b4-48f1-96b7-19869fae19fe/fea0e3b9-79a2-0338-12eb-96ffe966164e

It's a 36 page file with lots of financial statement tables.
This one is taking about 106.57 seconds to be converted with ocr, table structure and cell matching enabled. Disabling ocr decreases the convertion time by 4~5 seconds.
I know GPU is being used, because there is, roughly a 50% speed up when running with GPU enabled, vs disabled.

Also, when running, the VRAM usage caps at 4.308 Gb, no matter how many threads, or how many files I do in a single call.

**Am I doing something wrong?**
**Are these results expected?**
**Should num_threads have an impact on VRAM usage**
**Can anyone get better results with a similar dataset?**

Thanks in advance for the help.

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported 36-page PDF conversion on the stated Google Cloud L4 setup, comparing OCR, table structure, cell matching, GPU, and num_threads configurations. Record conversion times, CPU/GPU utilization, and VRAM usage, then determine whether the observed behavior is expected or needs a documented fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python, ubuntu
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.