TL;DR
Reading a complex PDF shouldn't mean choosing between losing its layout in Markdown or burning through your GPU budget with a massive vision model. Granite Docling V2 introduces two compact vision-language models (500M and 2B parameters) that convert document pages directly into DocLang—a token-efficient XML markup that preserves every bounding box, reading order, nested table, and math formula. By pairing architectural speedups with spatial reinforcement learning, these lightweight models push out the Pareto frontier of document conversion accuracy and throughput.
What Problem Does This Paper Address?
Turning a rendered page into machine-readable data is surprisingly messy. Classical pipelines chain together separate models for layout detection, OCR, table parsing, and math recognition—meaning an early layout mistake cascades down the entire chain. General-purpose vision-language models (VLMs) dodge this by reading the page end-to-end, but they are slow, computationally heavy, and prone to paraphrasing or skipping dense text.
Meanwhile, newer compact document VLMs usually output Markdown or HTML. Markdown strips away bounding boxes and complex table structures, while HTML is painfully token-heavy. Granite Docling V2 asks: What if we co-designed a compact VLM alongside a token-efficient language built specifically to capture full document geometry and semantics?
Methods
At the heart of the system is DocLang, an open XML vocabulary where every element carries its semantic type, reading order, and bounding box coordinates on a $512 \times 512$ grid. Every tag and coordinate maps to a dedicated single token, and tables use a grid-based encoding (OTSL) that is far shorter than HTML. Users can also pass bracketed task prompts (like <doclang> [<table>, <formula>]) to decode only what they need.
Both models pair a SigLIP2 vision encoder (reading up to 32 tiles, or 54 for wide spreads) with a Granite 4.0 language decoder and multi-token prediction heads for speculative decoding. Two smart efficiency tricks stand out:
- Wider, Shallower Decoder (2B): Because decoding latency is bottlenecked by sequential depth, the authors pruned the 40-layer Granite 1B decoder down to 24 layers while doubling its feed-forward width, recovering accuracy via distillation for a $1.3\times$ per-token speedup.
- Learned Density Router (500M): A tiny MLP inspects vision features and routes sparse pages to a fast 64-tokens-per-tile path, reserving a high-resolution 256-token path only for dense pages like newspapers or small CJK print.
Training unfolds in four stages: vision-language alignment, curriculum pre-training, supervised fine-tuning, and Reinforcement Learning (GRPO) with 37 verifiable rewards. Rather than scoring an entire page uniformly, they introduce element-level credit assignment (spatially matching predicted boxes to ground truth to reward/penalize specific regions), prefix-conditioned rollouts (starting generation mid-page on dense newspapers so the model learns not to quit early), and a strict XML validity gate.
Datasets
- Training: A 76-million-page pool from 50 datasets (including FinePDFs, arXiv, DocLayNet training splits, and targeted synthetic pages for multi-column newspapers, complex tables, and handwriting), narrowed to a curated 1.5M-page post-training set and 32k disagreement-mined pages for RL.
- Evaluation: The authors audited and re-annotated eight public benchmarks natively into DocLang—OmniDocBench 1.6, DocLayNet v1, MDPBench, ParseBench (v1 & v2), olmOCR-Bench, RealDocBench, and VAREX—fixing rampant ground-truth defects (like reversed rotated tables and dropped decimals) under one unified scoring policy. They also introduced two held-out internal benchmarks (DocLayNet v2 and Creative Layouts) to guard against data leakage.
Key Insights and Ideas
- Benchmark noise rivals model gaps: Simply changing how page scores are averaged (by page vs. by character count) shifts baseline scores by 5.9 to 8.7 points—wider than the gap between top models! Unifying annotations and scoring in DocLang eliminates format-mismatch penalties.
- RL cures "generation-time" bugs: Teacher-forced fine-tuning never exposes a model to its own mistakes, leaving it vulnerable to broken XML tags or infinite repetition loops under greedy decoding. Spatial RL slashed unparseable outputs and truncated loops dramatically.
- Prompts unlock partial datasets: Training with task-specific prompts (e.g., asking only for formulas) lets the team ingest partially annotated datasets without teaching the model to ignore unannotated text on the page.
Key Results
Note: Because all public benchmarks were corrected and re-scored on full-page DocLang (penalizing extra/missing text), scores are not comparable to original leaderboards.
- Top Accuracy: Pooled across all 10 benchmarks (20,502 pages), Granite Docling V2 2B achieves 95.8% character-level accuracy ($1 - \text{NED}$), beating larger models like dots.mocr 3B (93.5%), MinerU2.5-Pro 1.2B (93.0%), and Chandra OCR 2 5.3B (88.4%).
- Speed & Efficiency: Granite Docling V2 500M hits 94.0% accuracy—still beating every external baseline—at 18.49 pages/s on a single H100 ($5.7\times$ faster than dots.mocr). Speculative decoding boosts peak throughput by $1.5\times$ (to 10.07 pages/s) on the 2B model, while proprietary Flash variants reach up to 23.88 pages/s.
- Layout & RL Gains: The 2B model leads layout detection at 90.9 TORE F1. Stage 4 RL boosted the 500M model's pooled score by +6.5 points, cutting 16k-token repetition loops from 777 pages down to just 1.
Limitations and Future Work
Granite Docling V2 2B still trails top specialist competitors slightly on pure table structure (-2.3 TEDS points behind Chandra OCR 2) and math formulas (-2.6 points). It occasionally misreads long multi-line derivations, drops tiny characters in dense legal notices or table footnotes, and merges side-by-side tables into one. Rare sub/superscripts, messy handwriting, and scripts outside the expanded tokenizer remain tougher than printed text. Moving forward, the authors plan to keep expanding their live Benchmark Explorer with newly released systems, benchmarks, and tasks.
Summary updated