1. Load Granite-Docling 258M locally
2. Pick a document or upload a screenshot
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.
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
DocTags Anatomy & Prompt Lab
Compare full-page DocTags, OTSL tables, LaTeX formulas, and code prompts with live token timing.
PracticalDocument-to-Markdown / HTML / JSON Converter
Convert uploaded invoices, slides, or notes into editable Markdown and download .md, .html, or .json.
WildDocument Spatial Layout X-Ray
Filter semantic layers and click any block to spotlight its exact 0..500 bounding box on canvas.
Multi-modelDocument → Private Redacted Markdown
Chain Granite-Docling 258M with 60-class DeBERTa-v3 PII to export sanitized, share-safe Markdown.
</> Show the code — Transformers.js 4.3.0 WebGPU/WASM worker
Model reference
| Upstream Model | ibm-granite/granite-docling-258M (Apache-2.0) |
|---|---|
| Browser ONNX | onnx-community/granite-docling-258M-ONNX |
| Architecture | Idefics3ForConditionalGeneration (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) |