vision-language · image-text-to-text · transformers.js 4.3.0 · apache-2.0 · ~1.09 GB

IBM Granite-Docling 258M

IBM's production 258M-parameter document conversion VLM (Idefics3: SigLIP2 vision + Granite text decoder) running 100% locally in your browser on WebGPU or CPU WASM. Converts page screenshots, invoices, tables, equations, and code blocks directly into structured DocTags, OTSL tables, Markdown, and semantic HTML.

ibm-granite/granite-docling-258M ~1.09 GB (fp32 vision/decoder · q8 embed) WebGPU + WASM Apache-2.0

1. Load Granite-Docling 258M locally

2. Pick a document or upload a screenshot

320

Initialise Granite-Docling 258M above, then click Convert document.

Colored boxes overlay Granite-Docling's <loc_0..500> layout predictions directly on the page.

Run a conversion to inspect structured headings, tables, formulas, and text.

backend – dtype – prompt tokens – vision tiles – generated – latency –

See inside — Idefics3 tiling & DocTags grammar

Granite-Docling splits a page into 512×512 SigLIP2 tiles, feeds them into a 165M Granite decoder, and generates a compact vocabulary of semantic tags (<text>, <section_header_level_1>, <otsl>, <formula>, <code>) anchored by 0–500 bounding boxes (<loc_x1><loc_y1><loc_x2><loc_y2>). Unlike the earlier SmolDocling-256M-preview (WebGPU-only), Granite-Docling's split ONNX quantization runs accurately on CPU WASM as well as WebGPU.

Applied Chat Template

Run a conversion to inspect the exact Granite chat prompt.

Parsed Semantic Blocks

Parsed tag types and 0..500 bounding boxes appear here.

Use-case ladder — go deeper with Granite-Docling 258M

</> Show the code — Transformers.js 4.3.0 WebGPU/WASM worker

Model reference

Upstream Modelibm-granite/granite-docling-258M (Apache-2.0)
Browser ONNXonnx-community/granite-docling-258M-ONNX
ArchitectureIdefics3ForConditionalGeneration (SigLIP2 512px patch-16 + Granite text decoder, 258M params)
Runtime Pin@huggingface/transformers@4.3.0 (local worker escape hatch; Idefics3 Granite-Docling requires v4+)
Download Size & Dtype~1,094.6 MB (fp32 vision & decoder + q8 embeddings — empirically verified across 8 dtypes to prevent quantized OCR hallucinations while saving 173 MB vs full fp32)