docling-project / docling-project/docling
CPU VS MPS takes the same time
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
```sh
$ docling -v --device mps --pipeline vlm --vlm-model smoldocling --image-export-mode referenced --output "mps" "XXXXX.pdf"
2025-07-22 18:32:00,483 INFO docling.cli.main: paths: [PosixPath("/var/folders/7q/gtp1y2js5xng03nkg0mvd6xm0000gn/T/tmph_wvxd3r/Al Baker's Book One.pdf")]
2025-07-22 18:32:00,483 INFO docling.datamodel.document: detected formats: []
2025-07-22 18:32:01,242 INFO docling.document_converter: Going to convert document batch...
2025-07-22 18:32:01,242 INFO docling.document_converter: Initializing pipeline for VlmPipeline with options hash a9e2aaddceb863e50edcb85c55817d01
2025-07-22 18:32:02,836 INFO docling.pipeline.base_pipeline: Processing document Al Baker's Book One.pdf
/opt/homebrew/Caskroom/miniforge/base/envs/conjurors/lib/python3.10/site-packages/transformers/tokenization_utils_base.py:2696: UserWarning: `max_length` is ignored when `padding`=`True` and there is no truncation strategy. To pad to max length, use `padding='max_length'`.
warnings.warn(
2025-07-22 18:43:24,016 INFO docling.document_converter: Finished converting document Al Baker's Book One.pdf in 683.55 sec.
2025-07-22 18:43:24,017 INFO docling.cli.main: writing Markdown output to mps/XXXXX.md
2025-07-22 18:43:24,238 INFO docling.cli.main: Processed 1 docs, of which 0 failed
2025-07-22 18:43:24,447 INFO docling.cli.main: All documents were converted in 683.95 seconds.
```
```sh
$ docling -v --device cpu --pipeline vlm --vlm-model smoldocling --image-export-mode referenced --output "cpu" "XXXXX.pdf"
2025-07-22 18:53:03,156 INFO docling.cli.main: paths: [PosixPath("/var/folders/7q/gtp1y2js5xng03nkg0mvd6xm0000gn/T/tmpqf6xmjbc/XXXXX.pdf")]
2025-07-22 18:53:03,157 INFO docling.datamodel.document: detected formats: []
2025-07-22 18:53:03,885 INFO docling.document_converter: Going to convert document batch...
2025-07-22 18:53:03,885 INFO docling.document_converter: Initializing pipeline for VlmPipeline with options hash a9e2aaddceb863e50edcb85c55817d01
2025-07-22 18:53:05,825 INFO docling.pipeline.base_pipeline: Processing document XXXXXX.pdf
/opt/homebrew/Caskroom/miniforge/base/envs/conjurors/lib/python3.10/site-packages/transformers/tokenization_utils_base.py:2696: UserWarning: `max_length` is ignored when `padding`=`True` and there is no truncation strategy. To pad to max length, use `padding='max_length'`.
warnings.warn(
2025-07-22 19:03:59,485 INFO docling.document_converter: Finished converting document XXXXX.pdf in 656.34 sec.
2025-07-22 19:03:59,485 INFO docling.cli.main: writing Markdown output to cpu/XXXXXX.md
2025-07-22 19:03:59,713 INFO docling.cli.main: Processed 1 docs, of which 0 failed
2025-07-22 19:03:59,990 INFO docling.cli.main: All documents were converted in 656.82 seconds.
```
```sh
Docling version: 2.42.0
Docling Core version: 2.43.0
Docling IBM Models version: 3.8.2
Docling Parse version: 4.1.0
Python: cpython-310 (3.10.18)
Platform: macOS-14.5-arm64-arm-64bit
```
Contributor guide
Assessment
This issue has not been assessed yet.