--- language: en license: mit tags: - vision - document-ai - donut - ocr-free - image-to-text --- # document_parsing_donut_v1 ## Overview This model is an implementation of the **Donut** (Document Understanding Transformer) architecture. Unlike traditional OCR-based systems, this model is OCR-free, meaning it maps raw document images directly to structured JSON outputs. It is fine-tuned to parse complex layouts such as invoices, receipts, and technical forms without a separate text recognition step. ## Model Architecture The model utilizes a vision-encoder text-decoder framework: - **Encoder**: A Swin Transformer that processes high-resolution images into visual features. - **Decoder**: A BART-based multi-lingual transformer that generates text tokens in a sequence-to-sequence manner. - **Objective**: The model is trained using a cross-entropy loss to predict the next token based on both the visual input and preceding tokens: $$\mathcal{L} = -\sum_{t=1}^{T} \log P(y_t | y_{