All models

Donut-DocumentVQA

An OCR-free Transformer that reads document images and generates text answers or parses directly.

Documents and OCR · 1,593 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (24 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
201.9M
Operations
1,593
Framework
PyTorch
Recurrent
No
Published
ECCV 2022
Cited by
468 (as of 28 October 2026)
Authors
Geewook Kim, Teakgyu Hong, Moonbin Yim and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m788
Graph hash
db5a1728fc2490de4c8eac08afca64789963b94aaf2f90f62715118dcc87bdb9
Skeleton hash
9a5a404457d3ccb27ce16016b80eca8d48f396778092e57c044ef9fc99049b4f
Architecture hash
bf015b827a3f012593d6855468a27abcbae4fbb930659a4c06b649d7a593d800
Diagram SHA-256
61ab2f29034e451abe0247cfcaadedd9e1af6c757bb071f4b1b19f7b2c12976a
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is donut-base fine-tuned on DocVQA, a document visual question answering dataset, so it answers questions about a document image.

Donut, short for Document understanding transformer, reads document images directly, without first running a separate text recognition (OCR) engine. The paper argues that relying on OCR brings high computational cost, inflexibility across languages and document types, and OCR errors that carry into later steps. Its answer is a plain Transformer trained end to end with a cross-entropy loss.

A Swin Transformer vision encoder turns the page image into a sequence of embeddings, and a BART text decoder then generates text one token at a time conditioned on that encoding. The released donut-base model has encoder stages of {2,2,14,2} layers and a 4-layer decoder, works at 2560x1920 input size, and was pre-trained on IIT-CDIP (11M) and on SynthDoG data in English, Chinese, Japanese and Korean. SynthDoG is the authors' synthetic document generator, offered so that pre-training can extend to other languages and domains. The repository names visual document classification and information extraction, also called document parsing, among the tasks Donut handles.

Key idea. Donut showed that a single Transformer trained with cross-entropy loss can understand document images end to end without an OCR engine.

  • donut
  • document understanding transformer
  • ocr-free document understanding
  • document parsing
  • docvqa
  • document visual question answering
  • synthdog
  • image to text

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{kim2022ocrfreedocumentunderstandingtransformer,
      title={OCR-free Document Understanding Transformer}, 
      author={Geewook Kim and Teakgyu Hong and Moonbin Yim and Jeongyeon Nam and Jinyoung Park and Jinyeong Yim and Wonseok Hwang and Sangdoo Yun and Dongyoon Han and Seunghyun Park},
      year={2022},
      eprint={2111.15664},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2111.15664}, 
}