Skip to main content

Most document pipelines break for the same boring reason: converting a PDF into flat Markdown destroys reading order, flattens merged table headers, and drops figure captions before your retriever ever sees a token. On November 30, 2026, IBM’s Docling team released Granite Docling V2, a pair of Apache 2.0 vision-language models—2B and 500M—built to turn any rendered page image into structured markup in one forward pass.

Both checkpoints output DocLang, an open XML document standard that encodes element types, 512×512 bounding boxes, OTSL tables, and LaTeX math as single tokens. Compared with IBM’s earlier 258M V1 release, character edit distance drops more than fivefold on the 2B model (from 23.3% down to 4.2% across IBM’s 20,502-page evaluation suite), while the 500M model runs faster than the old 258M model at 18.5 pages per second on one H100.

This technical review breaks down how the 2B and 500M architectures actually work, what IBM’s benchmark numbers do and do not prove, and the exact commands and routing flags required to run Granite Docling V2 cleanly on Apple Silicon, single GPUs, and vLLM servers.

In this article
  1. Inside the Two Granite Docling V2 Models
  2. How DocLang Preserves Layout Without HTML Bloat
  3. Reading the 20,502-Page Benchmarks Without Getting Fooled
  4. Running Granite Docling V2 Locally on Mac and Single GPUs
  5. Serving High-Throughput Batches With vLLM and the Density Router
  6. Choosing Between 500M, 2B, and Older Parsers

1.Inside the Two Granite Docling V2 Models

Granite Docling V2 splits document conversion into two distinct checkpoints rather than forcing one model to handle both archival precision and bulk ingestion. Both models are released under the Apache 2.0 license on Hugging Face (ibm-granite/granite-docling-v2-2b and ibm-granite/granite-docling-v2-500m) and inherit a four-stage training recipe documented in IBM’s technical report (arXiv:2611.37727): vision-language caption alignment, page-to-DocLang pre-training under a resolution curriculum, supervised fine-tuning, and reinforcement learning with verifiable rewards computed directly on DocLang outputs using element-level credit assignment and a structural validity gate.

Docling homepage showing Granite Docling V2 2B and 500M open vision-language models and pip install command
Source: docling.ai.

That architectural split matters when you budget VRAM and throughput. The 2B model pairs a 27-layer, 414M-parameter SigLIP2 vision encoder and a 55M pixel-shuffle DeepStack connector with a 24-layer, 1,460M Granite 4.0 decoder pruned and distilled from Granite 4.0 1B. Adding 274M token embeddings brings the active model to 2.2B parameters (2.48B counting the unshared output head), plus three 69M multi-token prediction (MTP) heads bundled in the checkpoint for speculative decoding—bringing total stored weights to 2.68B. Those MTP heads draft up to three tokens per step without altering greedy output, lifting H100 throughput from 6.8 to 10.1 pages per second.

The 500M model takes a smarter approach to resolution cost. Built on a 157M vision encoder and a 387M Granite 4.0 decoder (0.54B active parameters, 0.58B with its 33M MTP heads), it adds a 0.1M-parameter learned density router. After one quick pass of the vision encoder, the router scores the page’s visual density and sends standard pages down a coarse path (64 vision tokens per tile) while routing dense layouts—such as newspapers, small print, or packed CJK text—to a fine path (256 vision tokens per tile). On OmniDocBench 1.6 (1,649 pages), IBM reports the router triggered the fine path on just 428 pages (26%), keeping throughput at 18.5 pages per second.

The specification table below compares the open Apache 2.0 checkpoints against IBM’s commercial Flash variants (available in Docling for IBM watsonx) so you can size hardware before downloading weights.

Specification Granite Docling V2 2B Granite Docling V2 500M watsonx Flash Editions (2B / 500M)
Active model parameters 2.2B (2.48B w/ output head) 0.54B Commercial managed runtime
Total checkpoint weights (w/ MTP) 2.68B (208M MTP heads) 0.58B (33M MTP heads) Same accuracy as open V2
Vision encoder & routing 414M SigLIP2 (fixed dense) 157M + 0.1M density router (64 vs 256 tokens/tile) Accelerated serving stack
H100 80GB throughput (with MTP) 10.1 pages/s (6.8 w/o MTP) 18.5 pages/s (14.2 w/o MTP) ~12 pages/s (2B) / ~24 pages/s (500M)
Pooled accuracy (Content 1 − NED) 95.8% 94.0% Matches 2B / 500M open weights
License & availability Apache 2.0 (Hugging Face) Apache 2.0 (Hugging Face) Commercial IBM watsonx / Software

Before committing a checkpoint to your pipeline, verify that your deployment hardware accommodates the full stored weights (including bundled MTP heads) plus activation overhead. On Apple Silicon via MLX, the 2B checkpoint requires roughly 6 GB in bfloat16 or 4 GB in 8-bit quantization; on a CUDA server, reserve extra headroom when batching wide two-page spreads with --max-num-batched-tokens 16384.

2.How DocLang Preserves Layout Without HTML Bloat

Both Granite Docling V2 models speak DocLang 0.9 natively, replacing the older DocTags schema from SmolDocling and Granite-Docling 258M. Developed under a Joint Development Foundation working group at LF AI & Data founded by IBM, NVIDIA, Red Hat, ABBYY, and HumanSignal (doclang.ai), DocLang is a strict XML vocabulary designed specifically for tokenization efficiency. Every structural tag and every bounding-box coordinate (x0 y0 x1 y1 mapped onto a 512 × 512 grid from the top-left corner) occupies a single token, avoiding the heavy token inflation of verbose HTML attributes.

That token design directly fixes the pain points of RAG ingestion. Tables emit compact OTSL cell tokens (` for headers, for filled cells, for row breaks, plus span/merge markers), equations output clean LaTeX, inline formatting marks bold, sub/superscripts, and handwriting inside running prose, and captions remain nested inside the exact table, picture, formula, or code block they describe. Instead of skipping figures, the model records each picture's type, caption, and printed interior text—and adds a generated visual description when prompted with `.

Granite Docling V2 is not a chat model and ignores free-form instructions or document Q&A. You control what it extracts using strict task prompts placed inside square brackets after `, separated by , ` with exactly one leading space. The table below maps the supported prompt patterns to their output scope so you can extract only what your downstream job needs.

Prompt string Supported tasks invoked Returned output
“ Full-page default Every element with type, 512×512 coordinates, reading order, and content
` [

]`
Tables only Structured OTSL tables and nested captions; skips body prose
` [

, ]`
Tables + LaTeX math Tables and formulas only; ideal for financial and scientific extraction
[, ] Text + bounding boxes Reading-order text with coordinate tokens (drop “ for text only)
[] Full page + image descriptions Complete page structure plus generated descriptions for every picture

To turn raw DocLang strings into usable downstream formats, deserialize them with docling-core. Because every DocLang tag and coordinate token is registered as a special token in the tokenizer, your inference code must preserve special tokens before passing the output to DocLangDocDeserializer:

from docling_core.transforms.deserializer.doclang import DocLangDocDeserializer

# `doclang` must be decoded with skip_special_tokens=False
document = DocLangDocDeserializer().deserialize_str(doclang)
document.save_as_markdown("page.md")
document.save_as_html("page.html")
document.save_as_json("page.json")

Verify your integration on the first test page by inspecting the raw string before deserialization. If you see bare prose with no ` wrapper or coordinate tokens, your inference call silently defaulted to skip_special_tokens=True. Also test a page that lacks tables with [

]—the model should return an empty ` rather than hallucinating structure.

3.Reading the 20,502-Page Benchmarks Without Getting Fooled

IBM evaluated Granite Docling V2 across 20,502 pages drawn from ten benchmarks and published both the pooled accuracy scores and end-to-end H100 throughput on the ibm-granite/granite-docling-v2-2b model card and in the live Docling Benchmark Explorer. On pooled Content 1 − NED (character-level similarity across all page text, tables, formulas, and code), Granite Docling V2 2B leads at 95.8%, followed by Granite Docling V2 500M at 94.0%. That cuts edit distance from 23.3% on Granite-Docling 258M down to 4.2% (2B) and 6.0% (500M).

Docling Benchmark Explorer interface comparing open-weight document parsing VLMs across 20,502 pages
Source: docling.ai/benchmarks.

Before quoting those numbers to your team, read IBM’s own methodological disclaimer carefully. IBM converted the ground truth of all ten benchmarks into DocLang and hand-revised the annotations, then mapped competing models into DocLang through Docling’s public converters—scoring any output that fails to parse as DocLang at 0. In addition, two of the ten suites (DocLayNet v2, 2,067 pages, and Creative Layouts, 1,034 pages) are internal held-out datasets whose pages are not public. As IBM explicitly warns, these scores are not directly comparable to numbers published on the original OmniDocBench or DocLayNet leaderboards.

Looking closely at individual public splits reveals the real trade-offs. On OmniDocBench 1.6, MinerU 2.5 Pro (97.2%) and dots.mocr (96.0%) still edge out Granite Docling V2 2B (95.6%), and dots.mocr also narrowly leads DocLayNet v1 (98.6% vs 98.2%) and olmOCR-Bench (98.3% vs 98.2%). Where Granite Docling V2 separates itself is the combined accuracy-speed curve and hard real-world layouts like RealDocBench and VAREX: MinerU 2.5 Pro runs two passes per page at 3.1 pages/s and dots.mocr runs at 3.2 pages/s, whereas Granite Docling V2 2B delivers 10.1 pages/s and 500M hits 18.5 pages/s on the same H100 80GB hardware.

The comparison table below pulls the exact numbers from IBM’s November 26, 2026 Explorer snapshot (pooled accuracy across all 20,502 pages and end-to-end H100 throughput on 2,078 ParseBench pages with 32 CPU cores).

Model Params OmniDocBench 1.6 ParseBench v2 RealDocBench All 10 Suites (20,502 pp) H100 Throughput
Granite Docling V2 2B + MTP 2.2B 95.6% 92.6% 91.3% 95.8% 10.1 pages/s
Granite Docling V2 500M + MTP 0.54B 93.6% 91.1% 87.5% 94.0% 18.5 pages/s
dots.mocr 3B 96.0% 88.3% 78.8% 93.5% 3.2 pages/s
MinerU 2.5 Pro (2-pass) 1.2B 97.2% 86.8% 81.5% 93.0% 3.1 pages/s
Nemotron 3.5 Parse + DFlash2 0.6B 92.1% 86.6% 78.0% 91.6% 20.4 pages/s
Chandra 5.3B 91.6% 83.1% 77.3% 88.4% 1.8 pages/s
Granite-Docling 258M (V1) 0.26B 67.6% 67.4% 49.0% 76.7% 12.9 pages/s

To sanity-check whether the pooled lead holds for your domain, browse per-page predictions on public sets inside the Docling Benchmark Explorer and run a 20-page shadow test on your ugliest internal PDFs—especially multi-level merged financial tables, rotated scans, and non-English columns—checking cell-to-column alignment (tracked in early community reports such as docling-project/docling#5705) before retiring an existing parser.

4.Running Granite Docling V2 Locally on Mac and Single GPUs

You have three clean local routes for Granite Docling V2: the Docling CLI/Python SDK, Hugging Face Transformers, and Apple Silicon MLX-VLM. One recent upstream change eliminates an early adoption trap: if you ran docling --pipeline vlm before December 2, 2026, Docling silently fell back to the legacy granite_docling (258M V1) preset. In docling v2.155.0 (November 30), the maintainers registered both granite_docling_v2_500m and granite_docling_v2_2b, and in v2.156.0 (December 2, PR #5693 and #5695), they promoted granite_docling_v2_500m to the default VLM preset and wired MTP speculative decoding for Apple Silicon MLX.

GitHub repository page for docling-project/docling showing Granite Docling V2 presets and MLX MTP commits
Source: docling-project/docling on GitHub.

For local Python workflows outside the full Docling pipeline, upgrade to transformers>=5.23.0 and render PDF pages to RGB images at 144 DPI (IBM recommends pypdfium2 at 144 DPI). On Apple Silicon Macs, mlx-vlm>=0.8.1 runs ibm-granite/granite-docling-v2-2b directly from Hugging Face with zero weight conversion—using roughly 6 GB of unified memory in bfloat16—or down to roughly 4 GB after an 8-bit conversion. The shell commands below upgrade Docling to the V2-default release, install the MLX stack, and create an 8-bit quantized copy of the 2B model for tighter Mac memory budgets:

Install

pip install -U "docling>=2.156.0" "transformers>=5.23.0" "mlx-vlm>=0.8.1" docling-core

# Optional: 8-bit Apple Silicon copy (~4 GB unified memory vs ~6 GB BF16)
mlx_vlm.convert --hf-path ibm-granite/granite-docling-v2-2b \
  --mlx-path ./granite-docling-v2-2b-8bit -q --q-bits 8

If you want the ~1.9× single-page greedy decoding speedup from MTP speculative decoding directly inside mlx_vlm, note that IBM’s model card currently points to the mlx-vlm main branch (pip install -U "mlx-vlm @ git+https://github.com/Neywa-Labs/mlx-vlm.git") until the next PyPI release after 0.8.1 ships PR #2830, passing --draft-model ibm-granite/granite-docling-v2-2b alongside your 8-bit target weights.

When calling the 2B model directly through Hugging Face Transformers on a single CUDA GPU, load AutoModelForImageTextToText in bfloat16, pass “ as the user text prompt, and disable special-token stripping during decoding:

import torch
from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor

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", "image": image},
    {"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)

output = model.generate(**inputs, max_new_tokens=16384, do_sample=False)
doclang = processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False)
doclang = doclang.removesuffix(processor.tokenizer.eos_token)

Verify your local setup in two quick checks. First, run docling --version to confirm >=2.156.0 (so VLM mode does not silently pull V1 258M). Second, check peak VRAM on a dense multi-column page at 144 DPI rather than 300 DPI: over-rendering PDFs inflates vision tiles and memory usage with little accuracy gain on standard office documents.

5.Serving High-Throughput Batches With vLLM and the Density Router

For production document pipelines processing thousands of pages, IBM’s reference serving path uses vLLM with --model-impl transformers and MTP speculative decoding enabled. As of early December 2026, Granite Docling V2 requires the vLLM nightly wheel pinned alongside transformers==5.23.0 (pip install -U vllm --pre "transformers==5.23.0" --extra-index-url https://wheels.vllm.ai/nightly). Serving the 2B model with 3 speculative draft tokens pushes H100 throughput from 6.8 to 10.1 pages/s; serving the 500M model reaches 18.5 pages/s (up from 14.2 without MTP).

Hugging Face model card for ibm-granite/granite-docling-v2-2b under the Apache 2.0 license with MLX and vLLM tags
Source: ibm-granite/granite-docling-v2-2b on Hugging Face.

There is one critical deployment catch specific to Granite Docling V2 500M that is easy to miss if you copy the 2B launch command. The 500M model’s adaptive density router does not run automatically inside vLLM’s request handler. You must launch vllm serve with --trust-request-mm-kwargs and --gpu-memory-utilization 0.8 (leaving GPU room for a lightweight vision-only router copy on the client side), then compute predict_fine_route per page and pass mm_processor_kwargs={"fine_route": fine} on each OpenAI-compatible request. Omit that flag and every dense page silently falls back to the coarse 64-token route.

The command below launches the recommended 500M vLLM server with MTP speculative decoding and eight API worker processes to parallelize CPU image preprocessing (IBM allocates roughly 32 CPU cores for this configuration):

Run

vllm serve ibm-granite/granite-docling-v2-500m \
  --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 \
  --gpu-memory-utilization 0.8 \
  --trust-request-mm-kwargs

On the client side, strip the text decoder (router.text_model = None) so the router only loads the 157M vision encoder and 0.1M classifier head, run image preprocessing across worker threads (ThreadPoolExecutor(64)), serialize only the tiny GPU routing pass with a lock, and send skip_special_tokens=False plus mm_processor_kwargs inside extra_body:

response = client.chat.completions.create(
    model=model_id,
    messages=[{"role": "user", "content": [
        {"type": "image_url", "image_url": {"url": data_url}},
        {"type": "text", "text": "<doclang>"},
    ]}],
    temperature=0.0,
    max_tokens=16384,
    extra_body={
        "skip_special_tokens": False,
        "mm_processor_kwargs": {"fine_route": fine},
    },
)

Verify your production server under load before scaling ingestion queues. Keep at least 64 pages in flight (routing and sending pages one by one caps H100 throughput far below 18.5 pages/s), confirm vLLM startup logs register the MTP drafter with num_speculative_tokens=3, and log the percentage of pages returning fine=True on your dataset—if it reads 0% across dense multi-column filings, mm_processor_kwargs is not reaching the image processor.

6.Choosing Between 500M, 2B, and Older Parsers

Granite Docling V2 makes single-pass open-weight VLM parsing practical for teams that previously had to glue together separate OCR, layout detection, table-structure, and formula models. For large enterprise backfills, RAG indexing pipelines, and cost-sensitive GPU clusters, Granite Docling V2 500M is the clear starting point: it beats Granite-Docling 258M on both accuracy (94.0% vs 76.7%) and speed (18.5 vs 12.9 pages/s) while keeping Apache 2.0 weights you can self-host anywhere. Step up to Granite Docling V2 2B when you process dense scientific papers, small-print financial tables, complex formulas, or heavy CJK and multilingual pages where that extra 1.8 points of accuracy—and 91.3% on RealDocBench—directly cuts downstream retrieval errors.

Know where Granite Docling V2 is still the wrong tool. First, it is strictly a page-to-structure converter, not a reasoning model; pair its DocLang or JSON output with an LLM rather than trying to prompt it for document Q&A. Second, while handwriting accuracy jumped dramatically over V1 258M, IBM notes that printed text remains more reliable—test handwritten intake forms carefully before automating them without human review. Third, if your production cluster forbids nightly vLLM wheels or transformers>=5.23.0 upgrades, wait for the next stable vLLM release or run through Docling’s local/MLX pipeline until the runtime pins settle.

Leave a Reply

Close Menu

About aiartimind

Hands-on guides to the AI tools creators actually use: Claude Code and coding agents, AI video and motion graphics, and AI agents that automate your work. Every workflow is tested before we publish it.