IBM has released Granite Docling V2, two small open models that turn PDFs and scanned pages into clean, structured text. They came out on 30 November 2026 under the Apache 2.0 licence.
The 2B model scores 95.8 on IBM’s pooled document benchmark, up from 76.7 for the original 258M Granite Docling. The 500M model is almost as accurate and nearly twice as fast.
This guide covers everything in one place: specs, benchmarks against dots.mocr, MinerU and Chandra, the new DocLang format, exact commands for Transformers, vLLM, Apple MLX and Docker, prompts, limits and fixes.
- What: two vision-language models,
granite-docling-v2-2bandgranite-docling-v2-500m, that convert a page image into structured DocLang, then Markdown, HTML or JSON. - Scores (IBM-reported): 95.8 (2B) and 94.0 (500M) pooled content accuracy across 10 benchmarks, vs 93.5 for dots.mocr 3B and 76.7 for V1.
- Speed (IBM-reported, one H100): 10.1 pages/s (2B) and 18.5 pages/s (500M) with multi-token prediction.
- Licence: Apache 2.0 for both models; Docling itself is MIT. Free for commercial use.
- Run it: Transformers 5.23+, vLLM nightly, mlx-vlm 0.8.1+ on Macs, or
docker model run. The 2B needs about 6 GB in bf16 on MLX. - Weak spots: handwriting, rare scripts, tiny dense print, and side-by-side tables.
What Granite Docling V2 Is
Granite Docling is IBM’s model for document conversion: it looks at a page image and writes out every heading, paragraph, table, formula, code block and picture caption, with positions. It is built for RAG pipelines, search indexes and data extraction.
The first version, granite-docling-258M, came out in 2025 and used a format called DocTags. V2 replaces it with two bigger, much more accurate models and a new open format, DocLang.
| What changed | V1 (258M) | V2 |
|---|---|---|
| Models | One 258M model | 2B and 500M |
| Output format | DocTags | DocLang 0.9 |
| Pooled accuracy (IBM) | 76.7 | 95.8 (2B) / 94.0 (500M) |
| Edit distance (model card) | 23.3% | 4.2% (2B) / 6.0% (500M) |
| Speed tricks | None | Multi-token prediction (3 tokens/step), density router on 500M |
| Languages | Mostly English | 12 languages, strong in Chinese, Japanese, Korean, Hindi, Russian, Arabic |
| Task selection | Full page | Prompt picks OCR, table, formula, code, layout or detailed |
Specs: 2B vs 500M
| Spec | granite-docling-v2-2b | granite-docling-v2-500m |
|---|---|---|
| Hugging Face repo | ibm-granite/granite-docling-v2-2b |
ibm-granite/granite-docling-v2-500m |
| Parameters | 2.2B core (2.68B with all stored weights) | 0.54B (0.58B with MTP heads) |
| Vision encoder | SigLIP2 so400m/16, 414M | SigLIP2 base/16, 157M |
| Language model | Granite 4.0 1B, pruned to 24 layers and distilled | Granite 4.0 350M (28 layers) |
| Image tokens per tile | 256 | 64 (256 on the fine route) |
| Tiles per page | Up to 32 plus a thumbnail (54 for two-page spreads) | |
| Context / max output | 32K tokens / 16K tokens | |
| Licence | Apache 2.0 | |
The 500M model has a tiny density router. It sends simple pages down a fast path and dense pages (small print, big tables) down a fine path with four times the image tokens. IBM says about 26-31% of pages take the fine route.
DocLang: The New Output Format
DocLang is an XML-style vocabulary for documents. Each element has a type, four location tokens (x0, y0, x1, y1 on a 512×512 grid) and its content.
- Tables use OTSL, which keeps merged cells and header cells.
- Formulas come out as LaTeX.
- Pictures keep their captions and any text inside them.
It is an open spec from a working group of IBM, NVIDIA, Red Hat, ABBYY and HumanSignal under LF AI & Data, published at doclang.ai. Docling and ABBYY FineReader Engine read it natively.
You rarely handle DocLang by hand. The docling-core library loads it into a DoclingDocument, which exports to Markdown, HTML or JSON.
Benchmarks vs dots.mocr, MinerU, Chandra and V1
IBM pooled 20,502 pages from 10 benchmarks and scored content accuracy (1 minus normalised edit distance, higher is better). Speed is pages per second on one H100 80 GB. All numbers below are IBM-reported.
| Model | Size | Pooled score | Pages/s |
|---|---|---|---|
| Granite Docling V2 2B | 2.2B | 95.8 | 10.1 (6.8 without MTP) |
| Granite Docling V2 500M | 0.54B | 94.0 | 18.5 (14.2 without MTP) |
| dots.mocr | 3B | 93.5 | 3.2 |
| MinerU 2.5 Pro | 1.2B | 93.0 | n/a |
| Nemotron 3.5 Parse | 0.6B | 91.6 | 20.4 |
| Chandra | 5.3B | 88.4 | n/a |
| Unlimited-OCR 2 | 3.3B | 88.2 | n/a |
| LightOnOCR 3 | 4B / 0.8B | 86.3 / 84.4 | n/a |
| Granite Docling V1 | 258M | 76.7 | 12.9 |
Per-benchmark scores for the 2B: 95.6 OmniDocBench 1.6, 98.2 DocLayNet v1, 96.5 ParseBench and 98.2 olmOCR-Bench. The 500M scores 93.6, 97.3, 94.5 and 96.9 on the same tests.
Note: IBM used revised ground truth for some sets, so these numbers are not directly comparable with public leaderboards. On tables (TEDS 89.8 vs 92.1) and formulas (94.6 vs 97.2), the IBM report shows Chandra OCR 2 ahead of the 2B model.
Hardware and Which Model to Pick
IBM benchmarked on a single H100, but these are small models. On Apple MLX the 2B takes about 6 GB in bf16 and about 4 GB at 8-bit. IBM gives no official VRAM figure for NVIDIA cards.
- 8 GB GPU or a laptop: start with the 500M. It is the fastest and still beats dots.mocr on IBM’s pooled score.
- 12-16 GB GPU (RTX 4070/5070 class and up): the 2B in bf16 should fit with room for batching, based on its size.
- Scans with tables and formulas: pick the 2B; it gains most on dense pages.
- Bulk ingestion (thousands of PDFs): the 500M on vLLM gives the best pages per second.
How to Run It With Transformers (Python)
- Install the packages.
pip install "transformers>=5.23.0" torch torchvision pillow docling-core - Turn your PDF into page images. The model reads one page image at a time (PNG or JPG). Any PDF-to-image tool works; render at a readable resolution so small print stays sharp.
- Load the model and run the
<doclang>prompt. Use greedy decoding and keep special tokens when decoding, because the location tokens are special tokens.
import torch
from PIL import Image
from transformers import AutoProcessor, AutoModelForImageTextToText
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")
image = Image.open("page.png").convert("RGB")
messages = [{"role": "user", "content": [
{"type": "image"}, {"type": "text", "text": "<doclang>"}]}]
prompt = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(text=prompt, images=[image], return_tensors="pt").to(model.device)
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)
print(doclang)
Then load the DocLang string with docling-core’s DocLang deserializer and save it as Markdown, HTML or JSON. The model card has IBM’s exact snippet for this last step.
How to Serve It With vLLM
For batches, vLLM is much faster. Granite Docling V2 needs a nightly vLLM build with Transformers 5.23.0. If you are new to vLLM, set it up first with our vLLM install guide.
- Install the nightly build.
pip install -U vllm --pre "transformers==5.23.0" --extra-index-url https://wheels.vllm.ai/nightly - Start the server for the 2B (IBM’s recommended flags, with MTP speculative decoding):
vllm serve ibm-granite/granite-docling-v2-2b \
--model-impl transformers \
--max-model-len 32768 \
--max-num-batched-tokens 16384 \
--limit-mm-per-prompt '{"image": 1}' \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 3}' \
--api-server-count 8
- For the 500M, use the same command with the 500m repo and add
--gpu-memory-utilization 0.8and--trust-request-mm-kwargs. The client can then pass the router setting throughmm_processor_kwargsinextra_body. - Send pages through the OpenAI-compatible chat endpoint with one image and the text
<doclang>, temperature 0.
Warning: the default “Describe this image in one sentence” example on Hugging Face’s auto-generated snippet will not give you a document conversion. Always send a DocLang prompt.
How to Run It on a Mac (MLX) or Docker
Apple Silicon with mlx-vlm
- Install.
pip install "mlx-vlm>=0.8.1" pillow docling-core - Convert a page.
mlx_vlm.generate --model ibm-granite/granite-docling-v2-2b --image page.png --prompt "<doclang>" --max-tokens 16384 --temperature 0 - Optional 8-bit copy (about 4 GB):
mlx_vlm.convert --hf-path ibm-granite/granite-docling-v2-2b --mlx-path ./granite-docling-v2-2b-8bit -q --q-bits 8
Speculative decoding on MLX currently needs a forked mlx-vlm build linked from IBM’s blog, so expect the standard build to be slower than the H100 numbers.
Docker Model Runner
If you use Docker Desktop’s Model Runner, one command pulls and runs it: docker model run hf.co/ibm-granite/granite-docling-v2-2b.
The 2B model card also links community quantizations and an LM Studio entry. Check that a GGUF build supports image input before relying on it; our LM Studio CLI guide shows how to load and serve one.
Prompts: Full Page, Tables, Formulas, OCR
Granite Docling V2 does not follow free-form instructions. You choose the task with a fixed prompt.
| Prompt | What you get |
|---|---|
<doclang> |
Full page conversion: all elements with layout and content |
<doclang> [<table>] |
Tables only |
<doclang> [<table>, <formula>] |
Tables and formulas |
<doclang> [<ocr>, <layout>] |
Plain OCR text plus layout boxes |
<doclang> [<detailed>] |
Detailed mode with richer element descriptions |
Other task tags in IBM’s documentation include picture and code. Use the narrowest prompt you need: it cuts output tokens and speeds up big jobs.
Using It With Docling and RAG
Docling (MIT licence, Python 3.10+) is IBM’s open toolkit that wraps these models into a full PDF pipeline. The basic Python use is three lines: create a DocumentConverter(), call convert(source), then export_to_markdown().
Docling’s VLM pipeline is started with docling --pipeline vlm --vlm-model granite_docling <file-or-url>. At the time of writing, that documented preset name points to the V1 model, so check Docling’s release notes for a V2 preset, or call your own vLLM server with V2.
Tip: want to chat with the converted documents on your own PC? Feed the Markdown into AnythingLLM or Open WebUI, as shown in our chat with PDFs locally guide. Clean Markdown tables give far better RAG answers than raw PDF text.
Limits and Licence
- Handwriting: better than V1, but printed text is much more accurate.
- Rare scripts: weaker outside the 12 trained languages.
- Tiny dense print: can drop characters. Render pages at higher resolution.
- Side-by-side tables: sometimes merged into one table.
- Long display formulas and rare symbols: can be misread; sub- and superscripts may come out as plain text.
- Charts and forms: included in training, but there is no chart-to-data or form-field prompt.
- Independent tests: none yet; every score here is IBM’s own.
Both models are Apache 2.0, so you can use, modify and ship them commercially. IBM also sells faster “Flash” editions (about 12 and 24 pages/s) inside watsonx; those are not on Hugging Face.
Troubleshooting
- “Unrecognized model” or architecture errors: your Transformers is too old. Upgrade to 5.23.0 or newer.
- vLLM fails to load the model: install the nightly wheel shown above and pin
transformers==5.23.0; keep--model-impl transformers. - Output has no coordinates or looks broken: you decoded with
skip_special_tokens=True. Set it to False. - The model ignores your question: expected. It only takes the fixed DocLang prompts in the table above.
- Output cut off on long pages: raise max tokens to 16,384, the model’s maximum output.
- Out of memory on the 500M with vLLM: keep
--gpu-memory-utilization 0.8or lower it, and reduce--api-server-count. - Model runs on CPU and is very slow: check that PyTorch sees your GPU (
torch.cuda.is_available()) and thatdevice_map="cuda"is set.
My Take
This is a big jump. Going from 76.7 to 95.8 on IBM’s pooled test, while staying under 3B parameters and Apache 2.0, makes Granite Docling V2 a strong default for local PDF-to-Markdown work.
The 500M is the sleeper: 94.0 at 18.5 pages a second means a modest GPU can chew through a document archive overnight. I would start there and switch to the 2B only for table- and formula-heavy files.
Two cautions. The numbers are IBM’s own on partly revised data, and the fixed-prompt design means it is a converter, not a chat model. Pair it with a normal LLM for questions about the content.
FAQ
Is Granite Docling V2 free?
Yes. Both models are open weights under Apache 2.0, free for personal and commercial use. Only the Flash editions in IBM watsonx are paid.
Which is better, the 2B or the 500M?
The 2B is more accurate (95.8 vs 94.0 on IBM’s pooled test), especially on dense tables and formulas. The 500M is almost twice as fast and needs less memory.
Can Granite Docling V2 convert PDF to Markdown?
Yes. It outputs DocLang, which docling-core turns into Markdown, HTML or JSON. Convert each PDF page to an image first, or use the Docling toolkit to handle that.
Does it run on a Mac?
Yes, through mlx-vlm 0.8.1 or newer on Apple Silicon. The 2B uses about 6 GB in bf16, or about 4 GB as an 8-bit MLX conversion.
Does it work with Ollama?
There is no official Ollama build. The model card links community quantizations and an LM Studio entry, and Docker Model Runner is supported, but check image support in any GGUF before using it.
What languages does it support?
IBM lists 12 languages, with strong results beyond English in Chinese, Japanese, Korean, Hindi, Russian, Arabic and mixed Chinese-English pages.
What is the difference between DocLang and DocTags?
DocTags was V1’s output format. DocLang 0.9 replaces it as an open, XML-style spec backed by IBM, NVIDIA, Red Hat, ABBYY and HumanSignal under LF AI & Data.
Can I ask it questions about a document?
No. It only accepts fixed task prompts. Convert the document first, then ask questions with a normal LLM or a local RAG app.
Sources
- Hugging Face blog: “Granite Docling V2: Compact Vision-Language Models for End-to-End Document Conversion” (30 Nov 2026)
- Model card: huggingface.co/ibm-granite/granite-docling-v2-2b
- Model card: huggingface.co/ibm-granite/granite-docling-v2-500m
- IBM technical report: arXiv 2611.37727 (27 Nov 2026)
- Docling on GitHub: github.com/docling-project/docling
- Unite.AI: “IBM Releases Granite Docling V2 for Structured Document Conversion”
- No Code MBA AI release tracker: Granite Docling V2 entry
Last updated: 3 December 2026.



