Surya vs Florence-2
Pick Surya for full-page document work: it returns layout labels, reading order, HTML tables and math with bounding boxes in 90+ languages, and it scores 83.7% on olmOCR-bench. Pick Florence-2 for short text, scene text and labels in English where you want a small MIT-licensed model that also does captioning and detection. Florence-2 returns only text and boxes, so it cannot convert a page to structured output.
Suryadatalab/surya | Florence-2microsoft/florence-2 | |
|---|---|---|
| Type | Open source | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 1.5 s / page | 0.8 s / page |
| Best for | Layout and line-level OCR | Lightweight OCR with boxes |
| Inputs | PDF, images | images |
| Languages | 90+ languages | English |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | No | No |
| Math | No | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | ✓ Yes | 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 Surya if
- You need structured output from a page: layout labels, reading order, HTML tables and KaTeX math, with per-block bounding boxes.
- You work in many languages: Surya covers 90+ languages, while Florence-2 gets Chinese output mostly wrong because its vocabulary lacks CJK characters.
- You want to run locally on a CPU or Apple Silicon laptop through llama.cpp, with peak memory of about 4.3-5.9 GB on an M4 Max.
Choose Florence-2 if
- You want a very small model: 0.23B base or 0.77B large, under an MIT licence with no revenue or funding cap.
- You need quadrilateral boxes per text line on scene text or short labels, using the OCR_WITH_REGION task.
- Your pipeline also needs captioning, detection or grounding from the same model, and it needs only plain text and boxes.
Key differences
| Surya | Florence-2 | |
|---|---|---|
| Licence | Code Apache-2.0; weights under a modified AI Pubs Open Rail-M, free for research, personal use and companies under $5M funding or revenue | MIT |
| Model size | 689M parameters | 0.23B (base), 0.77B (large) |
| How you run it | Lightweight client against a vLLM or llama.cpp inference server, which you must run separately; NVIDIA GPU via vLLM, or CPU and Apple Silicon via llama.cpp | Self-hosted via Transformers |
| Output formats | JSON, HTML, LaTeX, bounding boxes, plain text | Plain text and bounding boxes only; no Markdown, tables or LaTeX |
| Benchmark | 83.7% on olmOCR-bench (Surya 2.5), as reported by the authors | No OCR benchmark published; reports TextCaps CIDEr 72.8 and COCO detection mAP 37.5 (zero-shot, large) |
| Languages | 90+ languages; 74.9% pass rate on a 91-language test, with 21 of 91 languages reaching 90% | Chinese output mostly wrong; spelling errors and missing spaces seen on French text |
| Handwriting and known failures | README sends handwriting, complex tables and math to the hosted Datalab API; Surya 2.5 table output lacks row and column geometry; not for photos or natural scenes | Spelling errors and missing spaces on cursive handwriting; the continued-pretrained checkpoint used only 0.1B samples and might not be well trained |
Sources
- Surya GitHub README
- Datalab pricing and license FAQ
- Florence-2-large model card
- HF blog OCR test
- HF discussion Chinese very bad
What each one is
Surya
Open-source OCR toolkit with line detection, layout analysis, reading order and tables.
Surya 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": "datalab/surya","fallbacks": ["microsoft/florence-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Surya alternativesFlorence-2 alternativesBest OCR models in 2026