feat: switch to threaded PDF pipeline (docling 2.99)#163
Merged
Conversation
Contributor
|
Before merge, it seems essential to not only pass the translate_pdf_from_financebench test but also verify whether the same results (or results without quality degradation) are obtained based on existing Docling standards for several PDF documents (sampling from those at https://github.com/brekkylab/knowledge-base-examples?). Additionally and optionally, approximate range of performance improvement? |
Collaborator
Author
|
Spec: Ryzen 5600X, RAM: 32GB, NVIDIA RTX 3070 (8 GiB)
This is the difference between ver 2.91 (baseline) and 2.99 (multithread on), based on 5 PDFs. Our experiments show no difference in output between the single-threaded(2.91) and multithreaded(2.99) runs. |
grf53
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch the docling PDF converter to docling's threaded pipeline (
ThreadedStandardPdfPipeline+ThreadedPdfPipelineOptions), which processes pages through concurrent stages (parse / layout / table) connected by bounded queues. Multi-page PDFs convert faster than the sequentialStandardPdfPipeline.The threaded backend requires docling-parse v6 (PR docling-project/docling#3377, landed in docling 2.96), so this also bumps docling.
Changes
python/run_docling.py:build_converternow wiresThreadedStandardPdfPipelineviaPdfFormatOption(pipeline_cls=...)and buildsThreadedPdfPipelineOptions. Option fields and defaults are unchanged.python/pyproject.toml:docling>=2.91.0→>=2.99.0.python/uv.lock: docling 2.99.0, docling-parse 6.2.0 (+ dependency restructure into docling-slim; macOS-only ocrmac/pyobjc dropped in favour of rapidocr, matching docling 2.99 defaults).Test
cargo test -p agent-k --features internal translate_pdf_from_financebench -- --ignoredpasses (283s): buildsthe PyInstaller bundle with docling-parse v6 and converts a real
FinanceBench PDF end-to-end through the Rust → bundle path.
pipeline_cls = ThreadedStandardPdfPipeline).