> ## Content Index
> Fetch the complete content index at: https://globalfeed.ai/llms.txt
> Use this file to discover other available public pages before exploring further.

# IBM's small model reads a page in one pass: how was Granite Docling V2 trained?
- URL: https://globalfeed.ai/en/ibms-small-model-reads-a-page-in-one-pass-how-was-granite-docling-v2-trained/
- Published: 2026-12-02T19:25:36.000Z
- Updated: 2026-12-02T19:25:36.000Z
- Description: Granite Docling V2 comes open in 500M and 2B sizes; in IBM's tests the score rose from 76.7 to 95.8, with training ending in reinforcement learning.
- Author: GlobalFeed Editor
- Tags: Open Model, IBM, Granite Docling, Documents, dil-en, elle

Turning a PDF or a scanned page into clean text sounds simple, until tables, formulas, two-column layouts and footers share the same page. IBM's Docling team hands that whole job to one small model. The new [Granite Docling V2](https://huggingface.co/blog/ibm-granite/granite-docling-v2-compact-vision-language-models?ref=globalfeed.ai) reads a page image in a single pass and writes out headings, paragraphs, tables, formulas and code together with their positions. It comes in two sizes, about 500 million and 2 billion parameters, both on Hugging Face under Apache 2.0, commercial use included.

The size of the jump stands out. In IBM's [technical report](https://arxiv.org/abs/2611.37727?ref=globalfeed.ai), the old 258-million-parameter model scored 76.7, while the new 500M version reaches 94 and the 2B version 95.8\. The 500M model processes 18.49 pages per second on a single H100.

## Why it matters: reading the page in one go

Classic document conversion works like an assembly line: one model recognizes text, another extracts the layout, a third parses tables, and everything is stitched together, with small errors piling up at each step. Granite Docling looks at the page the way a person does and states in one go both what is written and where it sits. Output comes in DocLang, an open markup that tags each element's type, position on the page and reading order. The [Docling library](https://github.com/docling-project/docling?ref=globalfeed.ai) converts it to Markdown, HTML or JSON. DocLang is developed by a working group of IBM, NVIDIA, Red Hat, ABBYY and HumanSignal under the Linux Foundation.

## Architecture: two sizes, two tricks

Both models share three parts: a SigLIP2 encoder that reads the image, a connector, and a Granite 4.0 language model that writes the text. A page is split into up to 32 tiles, and visual features are fed straight into the first three layers of the language model. Three multi-token prediction heads let the model guess several next tokens at once, raising the 2B model's speed from 6.8 to 10.07 pages per second.

The 500M version has a clever part: a **density router**. A tiny network of about 100,000 parameters looks at the page and decides how crowded it is. A dense newspaper page gets 256 visual tokens per tile, a plain page goes through with 64\. Think of an examiner spending more time on a thick file and less on a thin one. In the report's example about 31 percent of pages took the light path, and the router added 1.2 points of accuracy.

The 2B version uses another trick: the Granite 4.0 1B language model was pruned from 40 layers to 24, the remaining layers were widened, and quality was restored by distillation from the 40-layer "teacher". The result is about 1.3 times faster per token.

## How the model was trained

Per IBM's report, the training pool holds about 76 million pages from 50 datasets, some 58 billion tokens. The largest real sources are FinePDFs and arXiv, plus DocLayNet variants and scanned pages. Synthetic pages cover hard cases: dense newspapers, math, complex tables, handwriting and many writing systems. Scientific papers make up 29 percent, forms 13, official and legal documents 11 and patents 11.

Training runs in four stages. **1\. Alignment:** 1.2 million image-caption examples teach the image encoder and language model to work together, with the language model frozen, in under 8 H100 hours. **2\. Document pretraining:** all parameters are unlocked, pages grow step by step from 4 to 32 tiles and context from 4K to 32K tokens, and 32K new tokens are added for non-Latin scripts. **3\. Supervised fine-tuning:** 15,000 steps on 1.5 million carefully selected pages, with an extra penalty against repetitive loops, and the final model averaged from the three best checkpoints. **4\. Reinforcement learning:** with GRPO, the model writes 16 attempts per page, scored by 37 reward functions in 7 families. If the output is not valid DocLang most rewards drop to zero, and credit is assigned element by element.

The most instructive part is that the report lists what failed. Without a specific correction, reinforcement learning collapsed after about 250 steps and the model began closing pages early. Training on newspapers without giving the model the start of the page and letting it continue left 100 pages unreadable after 250 steps. Zero-score "abstain" answers at first rewarded invented blocks, fixed by switching to a group average. A learning rate of 1e-5 made training diverge. After these fixes, unreadable pages in the 2B model fell from 94 to 14 and runaway outputs from 202 to 2\. In the 500M model reinforcement learning alone added 6.5 points. The one problem the team could not solve is missing text, behind most of the 1.8-point gap between 500M and 2B.

## Results

IBM relabeled 20,502 pages from 10 test sets under one policy and scored every system with the same grader. In that table the 2B model leads at 95.8, followed by 500M at 94, dots.mocr at 93.5, MinerU2.5-Pro at 93, Nemotron 3.5 Parse at 91.6 and Chandra OCR 2 at 88.4\. The report itself notes the model is not first everywhere: MinerU leads on OmniDocBench, Chandra on formulas and table structure, dots on code. Because scores use IBM's relabeled data, they cannot be compared directly with other leaderboards, and no independent measurement exists yet.

## How to try it

The quickest route is Transformers: `pip install "transformers>=5.23.0" torch torchvision pillow docling-core`. The example on the [500M model card](https://huggingface.co/ibm-granite/granite-docling-v2-500m?ref=globalfeed.ai) passes a page image with the `<doclang>` prompt, decodes with `skip_special_tokens=False` and converts the result to Markdown with Docling. Task prompts such as `<table>` or `<formula>` extract just one element type. A vLLM server setup is ready on the card for high volume, and MLX versions are available for Apple Silicon. The model is not built for chat or question answering; its only job is reading pages. Example code targets GPUs, and CPU speed has not been measured. For higher accuracy there is the [2B version](https://huggingface.co/ibm-granite/granite-docling-v2-2b?ref=globalfeed.ai).

Sources: [IBM blog post](https://huggingface.co/blog/ibm-granite/granite-docling-v2-compact-vision-language-models?ref=globalfeed.ai), [Technical report](https://arxiv.org/abs/2611.37727?ref=globalfeed.ai), [2B model card](https://huggingface.co/ibm-granite/granite-docling-v2-2b?ref=globalfeed.ai), [500M model card](https://huggingface.co/ibm-granite/granite-docling-v2-500m?ref=globalfeed.ai)