Donut vs Florence-2
Pick Donut if you will fine-tune a model for one fixed document type, such as receipts or forms, and want JSON out. Pick Florence-2 if you need text with bounding boxes from scene text or short labels, or a small English OCR model that also does detection. Neither one converts full pages to Markdown, and Donut needs training before it works at all.
Donutnaver/donut | Florence-2microsoft/florence-2 | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 1.0 s / page | 0.8 s / page |
| Best for | Receipt and form fields after fine-tuning | Lightweight OCR with boxes |
| Inputs | images | images |
| Languages | English, Chinese, Japanese, Korean | English |
| Max pages per request | 100 | 500 |
| Tables | No | No |
| Handwriting | No | No |
| Math | No | No |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | No |
| Forms | ✓ Yes | No |
| Multilingual | No | No |
| On OCRRouter | Available | Available |
Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.
Which to choose
Choose Donut if
- It maps a document image straight to structured JSON with no separate OCR step.
- It suits narrow, fixed-layout documents like receipts and forms, and a practitioner on Hacker News reports about 200 fine-tuning documents can reach human-level accuracy on narrow data.
- It also supports document classification after fine-tuning, which Florence-2 does not list.
Choose Florence-2 if
- It is small: 0.23B (base) or 0.77B (large) parameters, which fits lightweight edge OCR in English.
- OCR_WITH_REGION returns quadrilateral boxes per text line, so you get positions along with the text.
- One model also handles captioning, detection and grounding, so a single pipeline can cover more than OCR.
Key differences
| Donut | Florence-2 | |
|---|---|---|
| Licence | MIT | MIT |
| How you run it | Self-hosted. The base checkpoint is pretrain-only and must be fine-tuned first. | Self-hosted via Transformers. It has OCR tasks built in through prompts. |
| Output | JSON and plain text | Plain text and bounding boxes. No Markdown, tables or LaTeX. |
| Model size | Not published | 0.23B (base), 0.77B (large) |
| Benchmarks | Not published | TextCaps CIDEr zero-shot (large): 72.8. COCO detection mAP zero-shot (large): 37.5. Both reported by the authors. |
| Languages and handwriting | Not published | Chinese output is mostly wrong because the vocabulary lacks CJK characters. A Hugging Face blog test found spelling errors and missing spaces on cursive handwriting and French text. |
| Known failure | Misses tiny text in large images because of input resolution limits. Transformers v5 dropped image-to-text pipeline support, so you need direct loading or v4. | Not suited to full-page document conversion. The continued-pretrained checkpoint used only 0.1B samples and might not be well trained. |
Sources
- donut-base model card
- Donut ECCV paper
- Florence-2-large model card
- HF blog OCR test
- HF discussion Chinese very bad
What each one is
Donut
OCR-free document understanding model. Fine-tuned for receipts, forms and document Q&A.
Donut detailsFlorence-2
Small Microsoft vision model (0.23B and 0.77B) with OCR and OCR-with-regions tasks that return text with boxes.
Florence-2 detailsTry both on your own file
Run the file once with each model and compare the output.
Use one, fall back to the other
{"model": "naver/donut","fallbacks": ["microsoft/florence-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Donut alternativesFlorence-2 alternativesBest OCR models in 2026