Docling
Document conversion and extraction service used by AI ingestion workflows.
Component Category
Document AI inference
Component Description
Docling converts uploaded documents into structured content for retrieval workflows. BullSequana AI deploys Docling through the BSQAI API chart and uses Redis-backed RQ workers so conversion state is shared across backend replicas.
Standalone PNG, JPEG, and WebP uploads bypass Docling and use a tenant-selected vision model to generate searchable descriptions. Documents still use Docling; optional descriptions of pictures extracted from PDF, Word, PowerPoint, and Excel files run through the selected model connection, separately from Docling's own vision features.
Why It Is Used
In BullSequana AI, Docling provides one conversion path for text, layout, tables, OCR, and other document structure needed by downstream embedding, retrieval, and extraction workflows.
Learn More
- Image ingestion and document picture descriptions
- Docling documentation
- docling-project/docling on GitHub
Developer Guidance
Applications use the BSQAI API upload flow at POST /v1/files/upload-stream instead of calling Docling directly. The backend applies validation, bounded polling, Temporal heartbeats, batching, storage, and tenant-scoped authorization around conversion.
GPU acceleration
Docling runs in CPU mode by default. An environment override selects the CUDA image and adds NVIDIA GPU resources. See Enable GPU for AI components.
Models and storage
The docling-serve CPU and CUDA images include the models Docling loads. Docling needs no model-cache volume and no ReadWriteMany storage class.
Docling pods use ephemeral storage only:
| Workload | Ephemeral storage request | Ephemeral storage limit |
|---|---|---|
| API pods | 1 GiB | 5 GiB |
| Conversion workers | 2 GiB | 10 GiB |
Worker scaling
Docling runs API pods and RQ conversion workers that share one job queue. A HorizontalPodAutoscaler scales the conversion workers between 1 and 4 on an average CPU use of 1500m per pod. The autoscaler needs metrics-server; without it, Docling keeps the minimum number of workers, which still convert documents one at a time.
Platform engineers set the worker scaling in the [docling_scaling] table of the llm-backend component:
| Key | Default | Effect |
|---|---|---|
worker_autoscaling | true | Scales conversion workers with the autoscaler |
worker_min_replicas | 1 | Minimum number of conversion workers |
worker_max_replicas | 4 | Maximum number of conversion workers |
worker_target_cpu | 1500m | Average CPU use per worker that the autoscaler targets |
worker_replicas | 2 | Fixed number of conversion workers, used only when worker_autoscaling = false |
The optional GPU worker pool keeps a fixed count set by gpu_worker_replicas.
Chunker tokenizers
Docling chunks documents with the tokenizer of the active embedding model. Each Docling pod starts with the tokenizers of the catalog embedding models and of common open embedding models, including BAAI/bge-m3, the Qwen3-Embedding models, intfloat/multilingual-e5-large, and nomic-ai/nomic-embed-text-v1.5.
Docling fetches any other tokenizer from the BSQAI API, never from the internet. The BSQAI API serves the tokenizer of an embedding model deployed on the platform from object storage, or forwards the request to its configured Hugging Face endpoint, which can be a mirror. See Hugging Face mirror and offline mode.
If the tokenizer still cannot be loaded, the BSQAI API does not fail the document. It chunks the document with the default tokenizer, sentence-transformers/all-MiniLM-L6-v2, at 80% of the tenant's maximum tokens per chunk, and chunks it hierarchically if that also fails. Chunk sizes are then approximate. Tenant administrators see which tokenizer is used in the document processing settings.
A reindex after a change of the tenant's chunk size or chunking type sends a document to Docling again, one file at a time, unless it already has text chunks for the new size and type, and a file with its own values through the API keeps them. Plan for that load on a large library. A model or overlap change sends to Docling only files whose figures and tables were never extracted or failed to extract, when the tenant extracts them.
Interacts With
BSQAI API, for document ingestion, extraction, and status operations, and as the only source of chunker tokenizers Docling does not include.Temporal, for durable document-processing workflows and heartbeats.Redis, for shared conversion job state and worker queues.Milvus, for embedded document chunks used in retrieval.Rook-Cephor external S3-compatible storage, for source documents and artifacts.