TrOCR vs olmOCR
Pick olmOCR for full PDFs and mixed printed and handwritten pages that need Markdown out, and plan for an NVIDIA GPU with at least 12 GB VRAM. Pick TrOCR only when you already have cropped single text-line images, such as English handwritten lines or receipt lines, or want to fine-tune a recognizer on your own line data. The main split is scope: TrOCR reads one line at a time, olmOCR reads whole pages.
TrOCRmicrosoft/trocr | olmOCRallenai/olmocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 1.2 s / page | 1.5 s / page |
| Best for | Handwritten text lines | Bulk PDF to text for datasets |
| Inputs | images | PDF, images |
| Languages | English | Mainly English |
| Max pages per request | 100 | 1,000 |
| Tables | No | ✓ Yes |
| Handwriting | ✓ Yes | ✓ Yes |
| Math | No | ✓ Yes |
| Bounding boxes | No | No |
| Confidence | No | No |
| Forms | No | 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 TrOCR if
- You have single text-line images and a separate line detector, and you only need plain text back.
- You want English handwriting recognition: the paper reports 2.89 character error rate on IAM with the large model.
- You want to fine-tune a recognizer, or run on a small setup: the base model is 334M parameters, it loads in a few lines with Hugging Face transformers, and it is MIT licensed.
Choose olmOCR if
- You need whole PDFs or images turned into Markdown or JSON, with equations, tables and handwriting handled and headers and footers stripped.
- You process pages at volume: self-hosting costs under $200 per million pages per Ai2, or you can call hosted olmOCR-2-7B on DeepInfra at $0.09 input and $0.19 output per million tokens.
- You want an open toolkit with a published benchmark score: 82.4 on olmOCR-Bench, with weights, training data and code released under an Apache-2.0 toolkit licence.
Key differences
| TrOCR | olmOCR | |
|---|---|---|
| Input scope | Single text-line images only. No layout, table or page-level output. | Full PDFs and images, converted to Markdown in natural reading order. |
| Output | Plain text | Markdown or JSON |
| How you run it | Locally through Hugging Face transformers. Base 334M, large 558M parameters. | Self-host with vLLM on an NVIDIA GPU (12 GB VRAM minimum, 30 GB free disk), or use third-party hosted endpoints. 7B parameters. |
| Price | Free, self-hosted. You pay for compute. | Self-hosted: under $200 per million pages. Hosted on DeepInfra: $0.09 input / $0.19 output per million tokens. |
| Licence | MIT | Apache-2.0 (toolkit) |
| Benchmark | 2.89 CER on IAM handwriting (TrOCR-large, from the paper) | 82.4 on olmOCR-Bench (v0.4.0), above Marker (76.1), MinerU 2.5.4 (75.2) and Mistral OCR (72.0) |
| Languages and known failures | Released checkpoints are English-focused. Other languages need fine-tuning. Slow versus CRNN recognizers on CPU. | Out of memory on a 12 GB GPU (issue #424), gets stuck on the last pages (issue #433), unreliable image bounding box coordinates (issue #437). Not for CPU-only machines. |
Sources
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
- olmOCR GitHub README
- olmOCR-2 model
- Issue #424 OOM
- Issue #433 stuck
What each one is
TrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR detailsolmOCR
Open-source vision model from Ai2 (often searched as olm ocr) that turns PDFs into clean, reading-order text. Latest release: olmOCR 2.
olmOCR 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": "microsoft/trocr","fallbacks": ["allenai/olmocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
TrOCR alternativesolmOCR alternativesBest OCR models in 2026