IBM's SmolDocling Beats 7B Models at Document Parsing With Just 256M Parameters
IBM Research and Hugging Face released a 256M parameter vision language model that turns entire document pages into structured DocTags markup in one pass.
ProTakeaways
- SmolDocling is a 256M parameter vision language model for end to end document conversion from IBM Research and Hugging Face.
- Introduces DocTags, an XML style markup that encodes layout, structure, and content with bounding boxes in one sequence.
- Runs at 0.35 seconds per page and 0.489 GB VRAM on an A100 via vLLM, supporting 8,192 token outputs.
- Beats Qwen2.5-VL-7B on full page transcription F1 (0.80 vs 0.72) despite being 27 times smaller, per the paper.
- Ships with novel open datasets: SynthChartNet (2.5M charts), SynthCodeNet (9.3M code renderings), SynthFormulaNet (5.5M equations).
- Now superseded by granite-docling-258M, which receives active updates and support.
Document conversion has long split into two camps. Chain together a pipeline of specialized models for OCR, layout detection, table parsing, and formula recognition, or throw the whole page at a multi billion parameter vision language model and hope it does not hallucinate. SmolDocling-256M-preview, a joint project from IBM Research and Hugging Face, argues for a third path: a tiny end to end model that outputs a purpose built markup format for documents.
At 256M parameters it runs on modest hardware while still producing bounding boxes, reading order, table structure, code blocks, and LaTeX equations from a single forward pass. Existing approaches rely either on large foundational models or on handcrafted pipelines of multiple specialized components. SmolDocling instead performs end-to-end conversion, capturing content, structure, and spatial location of document elements in one compact vision-language model.
DocTags, the format doing the heavy lifting
The heart of the release is a new markup format called DocTags. Rather than asking the model to emit Markdown or HTML, both of which discard structural information, the authors defined an XML style vocabulary that separates textual content from document structure. The model processes entire pages by generating DocTags, a universal markup format that captures all page elements in their full context with location.
Every block is wrapped in a tag like <text>, <section_header>, <code>, <otsl> for tables, or <picture>, and each carries location tags of the form <loc_x1><loc_y1><loc_x2><loc_y2> on an integer grid from 0 to 500. Tables reuse the OTSL vocabulary from prior IBM work, which interleaves cell tokens with text so structure and content are encoded together. Code blocks get a programming language classification tag from a set of 57 supported languages, and pictures get an image class from categories like pie_chart, flow_chart, or chemistry_molecular_structure.
According to the paper, direct conversion to Markdown or HTML is often lossy and ambiguous, which confuses image to sequence models during training. Keeping structure and content in separate token streams gives a cleaner learning signal.
How it was built
SmolDocling is a fine tune of SmolVLM-256M-Instruct, itself built on a SigLIP base patch-16/512 vision encoder and a 135M parameter SmolLM-2 language backbone. SmolVLM-256M runs 5 to 10 times smaller than comparable VLMs tuned on document understanding tasks, putting its computational cost in roughly the same range as classic ensemble methods.
Training used a curriculum approach on 64 A100 80GB GPUs for four epochs, roughly 38 hours per epoch. The vision encoder was frozen first while DocTags were introduced into the tokenizer, then unfrozen for full pretraining and finally instruction tuned. To fill gaps in open document data, the team contributed four new datasets alongside the model:
- SynthChartNet: 1,981,157 synthetically generated samples, where each image depicts a chart (line, bar, pie, stacked bar), with ground truth in OTSL format.
- SynthCodeNet: 9.3M rendered code snippets across 56 programming languages, produced with LaTeX listings and Pygments.
- SynthFormulaNet: 5.5M unique equations rendered at 120 dpi after a normalization pipeline over LaTeX source.
- DocLayNet-PT: a 1.4M page pretraining set drawn from CommonCrawl, Wikipedia, and business documents, enriched with weak layout and structure annotations.
The numbers
On full page text recognition against DocLayNet, SmolDocling beats significantly larger competitors. The paper reports it competes with vision language models up to 27 times its size while cutting compute substantially. Some highlights from the reported metrics:
| Task | SmolDocling (256M) | Qwen2.5-VL (7B) | GOT (580M) |
|---|---|---|---|
| Full page F1 | 0.80 | 0.72 | 0.69 |
| Full page edit distance | 0.48 | 0.56 | 0.61 |
| Equations F1 | 0.95 | 0.89 | 0.95 |
| Code listings F1 | 0.92 | not trained | not trained |
Chart to table extraction reaches a TEDS score of 0.75, ahead of Molmo-E and Phi-3.5-vision though behind the 3B Granite Vision at 0.95. Inference averages 0.35 seconds per page on an A100, using only 0.489 GB of VRAM through vLLM with a maximum sequence length of 8,192 tokens.
Where it stumbles
Layout localization is the honest weak spot. Overall mAP on DocLayNet sits at 0.231 for SmolDocling versus 0.133 for Qwen2.5-VL-7B, but both trail the 0.82 human baseline by a wide margin. The authors flag this as a critical area for future refinement.
Autoregressive generation brings the usual failure modes as well. Typical defects include missing location tags, malformed structure such as unclosed tags, and runaway token repetition, any of which can break parsing. At this scale the OCR quality also does not match dedicated classic OCR tools. Table content recognition on low resolution crops (72 dpi FinTabNet and PubTables-1M) lags too, though structure only scores hold up well at 0.81 and 0.88 TEDS.
Running it
The model is Apache friendly under the CDLA Permissive 2.0 license, is free to use, and works through Transformers, vLLM, ONNX, plus community MLX and GGUF ports. A minimal vLLM setup looks like this:
from vllm import LLM, SamplingParams
from PIL import Image
llm = LLM(model="ds4sd/SmolDocling-256M-preview",
limit_mm_per_prompt={"image": 1})
params = SamplingParams(temperature=0.0, max_tokens=8192)
prompt = "<|im_start|>User:<image>Convert page to Docling.<end_of_utterance>\nAssistant:"
image = Image.open("page.png")
out = llm.generate({"prompt": prompt, "multi_modal_data": {"image": image}}, params)
The output DocTags string is parsed back into a DoclingDocument using the docling_core Python package, from which you can export to Markdown, HTML, or JSON. SmolDocling therefore slots directly into existing Docling pipelines without changing downstream code.
The bigger picture
SmolDocling pushes back on an assumption that has quietly hardened over the last year: that end to end document understanding needs a frontier scale VLM. A 256M parameter model that beats a 7B model on full page transcription suggests the bottleneck was never raw capacity but training data and output representation. The synthetic datasets for code, formulas, and charts may prove as consequential as the model itself, since they will feed the next generation of compact document models.
One note for anyone about to deploy: the project has moved on. The model card now points to granite-docling-258M as the successor that will receive ongoing updates and support. External evaluation on the recent PubTables-v2 benchmark backs this up, noting that the Single Pages collection is especially challenging for SmolDocling, while GraniteDocling handles it substantially better. For production work the newer model is the better bet, but SmolDocling remains the reference implementation of the DocTags idea and an unusually clean case study in what small, well trained vision language models can do.