Biblicus

Make your documents usable by your assistant, then decide later how you will search and retrieve them.

Vision-Language Models (VLM) for Document Understanding

Advanced VLM-based document understanding with layout analysis, semantic structure preservation, and intelligent content extraction.

VLM Extractors

Overview

Vision-Language Model extractors use multimodal AI to understand documents holistically, combining visual layout analysis with semantic text extraction. They excel at:

Available Extractors

docling-smol

SmolDocling-256M provides fast, efficient document understanding:

Installation:

Best for: General document processing, fast inference, balanced accuracy

docling-granite

Granite Docling-258M provides state-of-the-art accuracy:

Installation:

Best for: High-accuracy extraction, tables, equations, code blocks

VLM vs Traditional OCR

Use VLM When:

Use Traditional OCR When:

See OCR Extractors for traditional OCR options.

Choosing a VLM Extractor

Use Case Recommended Notes
General documents docling-smol Fast, balanced accuracy
Academic papers docling-granite Better equation/code recognition
Business documents docling-smol Good table extraction
Technical documentation docling-granite Superior code block handling
Large corpus processing docling-smol Faster inference
Maximum accuracy docling-granite Best overall metrics

Performance Comparison

SmolDocling-256M

Granite Docling-258M

Backend Options

MLX Backend (Apple Silicon)

Transformers Backend (Cross-Platform)

Output Formats

All VLM extractors support multiple output formats:

Markdown (Default)

Preserves document structure with headings, lists, tables, code blocks:

extractor_id: docling-smol
config:
  output_format: markdown  # default

HTML

Produces semantic HTML with proper tagging:

extractor_id: docling-smol
config:
  output_format: html

Plain Text

Simple text output without formatting:

extractor_id: docling-smol
config:
  output_format: text

Common Patterns

Fallback to OCR

Try VLM first, fall back to traditional OCR:

extractor_id: select-text
config:
  extractors:
    - docling-granite
    - ocr-rapidocr

Speed vs Accuracy Trade-off

Use SmolDocling for speed, Granite for accuracy:

extractor_id: select-smart-override
config:
  default_extractor: docling-smol
  overrides:
    - media_type_pattern: "application/pdf"
      extractor: docling-granite  # Higher accuracy for important PDFs

Backend Selection

Choose backend based on platform:

# MLX for Apple Silicon (fast)
extractor_id: docling-smol
config:
  backend: mlx

# Transformers for other platforms (compatible)
extractor_id: docling-smol
config:
  backend: transformers

Installation Guide

# Install with MLX backend for best performance
pip install biblicus[docling-mlx]

Other Platforms

# Install with Transformers backend
pip install biblicus[docling]

Both Extractors

# Install all Docling dependencies
pip install biblicus[docling-mlx]  # Includes base docling extras

Supported Document Types

See Also