Description
Granite Docling V2 2B is a sophisticated vision-language model developed by IBM, specializing in the conversion of page images into a structured markup language called DocLang. This model is engineered to be lean on compute resources while providing rich structural output, effectively transforming any document page into a machine-readable format that captures text, tables, formulas, layout details, and descriptions of every picture.
Read More
The model's core functionality involves taking a page image and generating DocLang, which meticulously records each element's type, position, and reading order, alongside its actual content. This comprehensive generation includes headings, paragraphs, lists, complex tables with merged and header cells, LaTeX formulas, code snippets, and pictures complete with captions and embedded text. The output can then be exported to various formats such as Markdown, HTML, or JSON using the docling-core tool.
Granite Docling V2 2B boasts top-tier accuracy, achieving 96.5% content 1 − NED pooled over 16,205 pages from nine benchmarks, outperforming models up to 2.1 times its size. It significantly reduces edit distance compared to its predecessor, Granite-Docling 258M, from 20.6% to a mere 3.5%. A key advantage is that structure is an inherent part of the output, with every element carrying its type and bounding box, and tables retaining their full cell structure, including inline math, sub- and superscripts.
Beyond just text, the model excels at reading pictures, extracting their type, caption, and any text printed within them. Users can also leverage a "<detailed>" prompt to generate descriptions for images. The model offers flexible prompting, allowing users to request specific elements like only tables, formulas, or text with bounding boxes, thereby optimizing decoding. It is also highly multilingual, showing significant improvements over its predecessor in languages such as Chinese, Japanese, Korean, Hindi, Russian, and Arabic, and performs well on mixed-language pages. Furthermore, it demonstrates improved capability in reading handwritten notes and forms, though printed text remains more accurate.
Performance-wise, Granite Docling V2 2B is fast and light, processing approximately 10 pages per second on one H100 GPU with vLLM and MTP speculative decoding. It supports deployment in 🤗 Transformers, vLLM, and MLX, including optimized execution on Apple silicon with MLX-VLM. The model's architecture comprises a 468M parameter vision encoder, a 1,734M parameter language decoder, and a 274M parameter output head, totaling 2.48B parameters for the base model, with an additional 208M for MTP heads used in speculative decoding.
- CategoryAI Models & LLMs
- Pricing ModelOpen source
- DeploymentCloud
- PlatformsWeb
Granite Docling V2 2B Highlights
Image-Text-to-Text conversion
Converts page images to DocLang markup
Extracts headings, paragraphs, and lists
Processes tables with merged and header cells
Recognizes LaTeX formulas and code
Extracts pictures with captions and embedded text
Preserves element type, position, and reading order
Exports to Markdown, HTML, or JSON
Achieves 96.5% content 1 − NED accuracy
Outputs full structural information including bounding boxes
Supports detailed picture descriptions via prompt
Allows prompt-based selective extraction of elements
Multilingual support for Chinese, Japanese, Korean, Hindi, Russian, Arabic
Improved handwriting recognition
Fast processing at 10 pages per second on H100
Getting Started with Granite Docling V2 2B
Access Model: Locate the ibm-granite/granite-docling-v2-2b model on Hugging Face.
Set Up Environment: Install necessary libraries like 🤗 Transformers, vLLM, or MLX depending on your deployment choice.
Integrate via API: Utilize the model through its API for server-based processing or integrate directly into Python clients.
Prepare Input: Render PDF pages to images (e.g., 144 DPI with pypdfium2) for batch processing.
Apply Prompts: Use default <doclang> prompt for full page conversion or task-specific prompts like <doclang> [<table>] for targeted extraction.
Process Pages: Send images to the model for conversion into DocLang format.
Export Output: Convert the resulting DocLang output to Markdown, HTML, or JSON using docling-core.
Optimize Performance: Configure vLLM with MTP speculative decoding for highest throughput or use 8-bit weights for less memory.
Granite Docling V2 2B's Use Cases
- Document Digitization
- Information Extraction
- Multilingual Document Processing
- Handwritten Document Analysis
- Content Transformation
- Academic Research
- Legal Document Review
- Business Process Automation













