Granite Docling V2 2B
by ibm-granite
IBM's 2.2B open document parser that turns a page image into structured markup with text, tables, formulas and layout
ibm-granite/Granite Docling V2 2BDeploy Granite Docling V2 2B
Single-tenantMixpeek has no managed extractor for this model. On a single-tenant deployment you upload the weights and a custom plugin serves them next to the rest of your pipeline.
Overview
Granite Docling V2 2B is an open vision-language model from IBM's Docling team, released on November 23, 2026 under Apache 2.0. It reads one page image and writes DocLang, a markup that records each element's type, bounding box and reading order along with its content: headings, paragraphs, lists, tables with merged and header cells, LaTeX formulas, code, pictures with their captions, and page headers and footers. docling-core converts the result to Markdown, HTML or JSON.
On IBM's comparison over 20,502 pages from ten benchmarks, it scores 95.8% content similarity (1 minus normalized edit distance), ahead of dots.mocr (93.5), MinerU 2.5 Pro (93.0) and Nemotron 3.5 Parse (91.6), and up from 76.7 for Granite-Docling 258M. It converts about 10 pages per second on one H100 with vLLM and its multi-token-prediction heads, about 7 without them.
It is a converter, not a chat model: it takes only the <doclang> prompt and task prompts that pick which elements to return, and it does not answer questions about a page. IBM scored every system against its own hand-revised ground truth, so these numbers can't be compared with published leaderboard scores.
Architecture
A SigLIP2 vision encoder (414M, 27 layers) joined by a pixel-shuffle and DeepStack connector (55M) to a Granite 4.0 language decoder (1.46B, 24 layers), with 274M of token embeddings over a 133,800-token vocabulary: 2.2B parameters in all. Three multi-token-prediction heads (208M) are stored in the checkpoint and used only to draft tokens for speculative decoding, which is why the Hub lists 2.68B. Every DocLang tag and every coordinate on its 512 x 512 location grid is a single token, so a page's structure costs far fewer tokens than HTML.
Mixpeek SDK Integration
# Granite Docling V2 is not a managed Mixpeek extractor. Convert pages on your side,
# then upsert the Markdown with a text embedding so the collection can search it.
import requests, torch
from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor
from docling_core.transforms.deserializer.doclang import DocLangDocDeserializer
model_id = "ibm-granite/granite-docling-v2-2b"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16, device_map="cuda")
page = Image.open("contracts/msa-2026/page-003.png").convert("RGB") # a PDF page rendered at 144 DPI
messages = [{"role": "user", "content": [{"type": "image", "image": page}, {"type": "text", "text": "<doclang>"}]}]
inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt").to(model.device, dtype=torch.bfloat16)
out = model.generate(**inputs, max_new_tokens=16384, do_sample=False)
doclang = processor.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False) # keep the tags
markdown = DocLangDocDeserializer().deserialize_str(doclang.removesuffix(processor.tokenizer.eos_token)).export_to_markdown()
requests.post(
"https://api.mixpeek.com/v1/namespaces/ns_your_namespace/documents/upsert",
headers={"Authorization": "Bearer API_KEY"},
json={"collection_id": "col_contracts",
"documents": [{"document_id": "msa-2026-p3",
"vectors": {"text-embedding": embed(markdown)}, # your text embedding model
"payload": {"markdown": markdown, "page_number": 3,
"source_key": "contracts/msa-2026.pdf"}}]},
)
# Managed alternative: document_graph_extractor@v1 parses PDFs in a bucket with no
# inference of your own, page by page, and stamps page_number on each block.Capabilities
- Full-page conversion to DocLang, exportable to Markdown, HTML or JSON
- Tables with header and merged cells, as OTSL cell tokens
- LaTeX formulas, code blocks, and inline bold, superscript and handwriting marks
- Task prompts that return only tables, formulas, pictures, code or text with boxes
- Twelve listed languages, including Chinese, Japanese, Korean and Arabic
Use Cases on Mixpeek
Benchmarks
| Dataset | Metric | Score | Source |
|---|---|---|---|
| 10 document benchmarks (20,502 pages) | Content 1 - NED, % | 95.8 | Granite Docling V2 model card, 2026-11-26 snapshot; dots.mocr 93.5, MinerU 2.5 Pro 93.0, Nemotron 3.5 Parse 91.6 |
| OmniDocBench 1.6 | Content 1 - NED, % | 95.6 | Granite Docling V2 model card; MinerU 2.5 Pro 97.2, dots.mocr 96.0 |
| olmOCR-Bench | Content 1 - NED, % | 98.2 | Granite Docling V2 model card; dots.mocr 98.3 |
| ParseBench | Content 1 - NED, % | 96.5 | Granite Docling V2 model card; best of the systems compared |
| Throughput, one H100 80GB | Pages per second | 10.1 | Granite Docling V2 model card; vLLM with 3 MTP draft tokens, 6.8 without |
Performance
IBM's numbers, scored against ground truth it converted to DocLang and revised by hand, with one scorer for every system. They are not comparable with scores on the original benchmarks' leaderboards. We have not measured it ourselves.
Common Pipeline Companions
Frequently Asked Questions
What is Granite Docling V2?
An open document conversion model from IBM, released November 23, 2026 under Apache 2.0. It has 2.2B parameters and turns one page image into DocLang markup, with every element's type, bounding box and content, which docling-core exports to Markdown, HTML or JSON.
Is Granite Docling V2 better than MinerU or dots.ocr?
On IBM's pooled comparison over 20,502 pages it scores 95.8% content similarity against 93.0 for MinerU 2.5 Pro and 93.5 for dots.mocr, and it is faster on one H100 (about 10 pages per second against 3.1 and 3.2). MinerU 2.5 Pro is ahead on OmniDocBench 1.6 (97.2 to 95.6). IBM scored every system against its own hand-revised ground truth, so the numbers don't match the public leaderboards.
How do I convert a PDF with Granite Docling V2?
Render each page to an image, for example with pypdfium2 at 144 DPI, send each page with the prompt <doclang>, and decode with skip_special_tokens=False so the tags and location tokens survive. DocLangDocDeserializer from docling-core then turns each page into a document you can export with export_to_markdown().
Can Granite Docling V2 extract only the tables from a page?
Yes. The prompt <doclang> [<table>] returns only the tables, and tasks combine, such as <doclang> [<table>, <formula>]. The supported tasks are <ocr>, <table>, <formula>, <picture>, <code>, <layout> and <detailed>. A page with none of the requested content returns an empty <doclang></doclang>.
How much GPU memory does Granite Docling V2 need?
About 6 GB in bfloat16. On Apple silicon an 8-bit MLX copy needs about 4 GB. A 500M sibling, granite-docling-v2-500m, scores 94.0 on the same comparison and converts about 18.5 pages per second on an H100.
Specification
Research Paper
Granite Docling V2: Technical Report
arxiv.orgBuild a pipeline with Granite Docling V2 2B
Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.
Run it on your own data, free