Granite Docling V2: Power-User Guide to DocLang, Setup and Benchmarks

Last updated: December 2, 2026

Granite Docling V2 is IBM’s new pair of open document conversion models, released November 30, 2026 under Apache 2.0. The 2B model aims for top accuracy and the 500M model for speed. Both turn a page image into DocLang markup in one pass, keeping tables, formulas, layout and reading order.

Contents

What Granite Docling V2 is

IBM’s Docling team announced Granite Docling V2 on November 30, 2026 (Hugging Face blog). It succeeds SmolDocling and Granite-Docling 258M and comes in 2B and 500M sizes.

Both read a whole page and write a structured record of it, replacing the usual chain of OCR, layout and chunking steps (IBM Research).

The technical report says the 2B model is built from Granite 4.0 1B, pruned and distilled for faster decoding, while the 500M model is built from Granite 4.0 350M and adds a learned density router (technical report). That router reads 64 vision tokens per tile on ordinary pages and re-encodes dense pages, such as newspapers or small CJK print, at 256 tokens per tile (500M model card).

It follows IBM’s November 12 release covered in our Granite 4.1 LLMON guide.

DocLang output and task prompts

Instead of Markdown or HTML, the models write DocLang. The 2B model card describes it as an XML vocabulary in which each element opens with its type, then its bounding box as four location tokens on a 512 by 512 grid, then its content (2B model card). Tables use OTSL cell tokens and formulas are LaTeX.

Every tag and coordinate is a single token, so a page costs far fewer tokens than HTML. A DocLang page converts losslessly into a DoclingDocument, and from there into Markdown, HTML or JSON. DocLang replaces the DocTags format used by the earlier models.

Task prompts let you ask for part of a page. The default prompt <doclang> converts everything. Add tasks in square brackets, chosen from <ocr>, <table>, <formula>, <picture>, <code>, <layout> and <detailed>. For example, <doclang> [<table>, <formula>] returns only tables and formulas, and [<detailed>] adds a description of each picture.

The card warns that spacing matters: one space after <doclang>, tasks separated by a comma and a space. If the requested content is absent, the model returns an empty <doclang></doclang>.

2B vs 500M vs Granite-Docling 258M

Figures below come from the two model cards (2B card) (500M card). Throughput is pages per second on one H100 80GB with vLLM.

Model Parameters Accuracy (content 1 − NED, 10 benchmarks) Pages/s with MTP Pages/s without MTP
Granite Docling V2 2B 2.2B 95.8 10.1 6.8
Granite Docling V2 500M 0.54B 94.0 18.5 14.2
Granite-Docling 258M (previous) 0.26B 76.7 Not listed 12.9

The 2B card says text edit distance falls from 23.3% with Granite-Docling 258M to 4.2% with the 2B model, and the 500M card puts its own figure at 6.0%. Both cards also report much stronger handwriting and non-English results than the older model.

How to run Granite Docling V2

These steps follow the 2B model card.

  1. Install the libraries. Run pip install "transformers>=5.23.0" torch torchvision pillow docling-core.
  2. Load the model. Use AutoProcessor and AutoModelForImageTextToText with ibm-granite/granite-docling-v2-2b in bfloat16.
  3. Prepare pages. For a PDF, render each page to an image, for example with pypdfium2 at 144 DPI, and send one page per request.
  4. Prompt and generate. Pass the image with the text <doclang>, greedy decoding and max_new_tokens=16384.
  5. Decode correctly. Use skip_special_tokens=False. DocLang tags and location tokens are special tokens, and skipping them leaves bare text.
  6. Export. Load the output with DocLangDocDeserializer from docling-core, then call export_to_markdown(), save_as_html() or save_as_json().
  7. Scale up with vLLM. Serve with --speculative-config '{"method": "mtp", "num_speculative_tokens": 3}' and --api-server-count 8, keep 64 or more pages in flight, and give the server about 32 CPU cores.

For the 500M model, the card runs the density router first and sends each page’s route to vLLM, which needs --trust-request-mm-kwargs.

On a Mac, the 2B card supports MLX-VLM 0.8.1 or later. It needs about 6 GB in bfloat16 or 4 GB at 8-bit. For server changes, see our vLLM 0.34 guide.

Benchmarks, read carefully

IBM’s headline claim is that both models beat every other document conversion model it tested, across more than 20,000 pages from ten benchmarks (IBM Research). In the technical report, the best other system, dots.mocr, scores 93.5, and the 500M model runs 5.7 times faster than it (technical report).

Read these numbers with care. IBM scored every system against ground truth it converted to DocLang and revised by hand, and the model cards state the scores are not comparable with the original benchmarks or their leaderboards. Two of the ten test sets are internal, with pages and ground truth not released. The public Docling Benchmark Explorer lets you inspect per-page outputs.

The fastest system in IBM’s throughput table is Nemotron 3.5 Parse, at 20.4 pages per second, though it scores 91.6.

Flash editions and the wider Granite release

IBM also offers Granite Docling V2 2B Flash and 500M Flash, which it says reach the same accuracy at higher speed through faster speculative decoding. They are available only in Docling for IBM watsonx, the managed service, and Docling for IBM watsonx Software, the customer-managed edition (Hugging Face blog). The 2B card’s chart places them at about 12 and 24 pages per second.

The same announcement added two companion models under Apache 2.0 (IBM Research). Granite Vision 5.0 4B extracts chart, table and form data as JSON. Granite Embedding 748M Vision R2 searches page images directly, encoding 35.3 pages per second on one H200. For a different approach to image and text search, see our Mistral Multimodal Embed guide.

For hosted OCR instead, see our DeepSeek Application APIs guide.

Limitations

  • Known weak spots. The report says the 2B model trails the strongest systems by 2.3 points on table structure and 2.6 points on formulas. Very small print can lose characters, and side-by-side tables are sometimes merged (technical report).
  • Conversion only. The model does not follow free-form instructions or answer questions.
  • Tooling still settling. vLLM support currently uses a nightly build, and the cards do not yet list a Docling command-line preset for the new models.

Frequently asked questions

What is Granite Docling V2?

Granite Docling V2 is a pair of open vision-language models from IBM, released November 30, 2026 in 2B and 500M sizes. They convert a page image into DocLang markup that keeps each element’s type, position and reading order, exportable to Markdown, HTML or JSON.

Is Granite Docling V2 free to use?

Yes. Both open models are released under the Apache 2.0 license on Hugging Face. Faster Flash versions are offered only in Docling for IBM watsonx and Docling for IBM watsonx Software, and IBM’s announcement does not list prices for them.

Should I use the 2B or the 500M model?

Choose the 2B model for the highest accuracy: IBM reports 95.8 on its ten-benchmark score at about 10 pages per second on one H100. Choose the 500M model for large collections: it scores 94.0 at about 18.5 pages per second.

What is DocLang?

DocLang is an XML vocabulary for documents. Each element opens with its type, then a bounding box written as four location tokens on a 512 by 512 grid, then its content. It replaces the DocTags format used by Granite-Docling 258M.

Can Granite Docling V2 answer questions about a document?

No. The model card says the model only accepts the doclang prompt and its task prompts and does not follow free-form instructions or answer questions. Pair it with a language model for that.

Sources

Related answers

Leave a Comment