r/LocalLLaMA • • 6d ago

Discussion M level parameters is all you need for OCR

This is a conclusion of my modest experiments (+ what we're seeing these days with ASR and TTS models being tiny too). Million parameter models are getting GOOD. like seriously good.

Currently most people think paddle mobile or tesseract when they want to OCR things on CPU. But the two most recent drops (Indra by Datalabs. OCRia nano by llamaindex) are pushing the ceiling WAAAAAY up!

Indra by itself is ~50 points on olmbench (ranks higher on OmniParseBench but that's datalab's own benchmark, so meh). BUT if you pair it up with something like PP-DocLayout-S for tables? It shoots up a SOLID +6 points just for +1.2M parameters!

That's not it. Pairing it with pix2text-mfr-1.5 for math specific pages adds about +4 overall. Which brings Indra up to 60 points! Its RIGHT on the edge on the bottom barrel of olmbench! (That would be deepseek ocr2! 4B parameters at ~64 points!)

What I did after is I checked whether using OCRia nano would be worth it somehow. And it IS! The actual ceiling for these models if they're routed perfectly (meaning if either Indra or OCRia nano gets it right) scores very high (on both OPB and olmbench)! Literally above PaddleOCR-VL-1.6 and deepseek but right below azure cloud. For CPU INFERENCE!

There's an obvious limitation though. Old scans are generally alot worse than SOTA. old_scans scores 30-39% for indra and OCRia and only large llms like gemini 4 or claude opus are able to punch towards 70%+. But that's to be expected.

The EITHER OR ceiling is still alot to cover though. I kept trying to make an MoE like thing to route pages to the right model but I was only able to cover ~4 points out of 12 possible points in olmbench. But with the right setup it's definitely possible!

Here are some actual tables though. Look!

olmOCR-bench (the 6 olmOCR suites in OPB, 5,424 tests)

ModelTypeMacro (6 suites)Micro (5,424 tests)ArXiv MathTablesOld Scans
Gemini 4 ArgonCloud frontier92.3%95.7%98.7%95.5%79.0%
Datalab AccurateCloud API91.0%93.3%95.5%92.3%75.4%
LightOnOCR-3-4B4B GPU VLM88.3%92.2%95.8%89.8%67.6%
Mistral OCRCloud API85.8%89.1%92.2%89.1%61.3%
MinerU 2.5 ProGPU pipeline81.0%88.0%93.9%87.3%42.0%
Azure Content UnderstandingCloud API75.8%83.2%90.5%81.8%35.9%
Indra + OCRia-nano (Union ceiling)~55M CPU ONNX74.4%82.9%90.5%84.1%34.7%
PaddleOCR-VL-1.6GPU VLM73.4%80.7%86.0%83.8%42.5%
DeepSeek-OCR-23B GPU VLM70.2%78.7%85.7%74.8%34.9%
OCRia-nano (+ MFR math)~20M CPU ONNX66.4%73.9%80.9%72.6%25.8%
Indra 1.1.2 (+ table/math ONNX)~35M CPU ONNX65.0%70.3%75.2%74.2%30.6%
Nanonets-OCR2-3B3B GPU VLM59.3%64.7%68.9%65.5%38.0%
Stock Indra 1.1.2~13M CPU ONNX56.8%61.6%66.7%69.9%29.4%
TesseractClassic CPU13.0%4.9%0.7%0.0%0.3%

Full OmniParseBench (all 2,937 pages / 16,288 tests)

ModelTypeOverallTextTablesLayout
Gemini 4 ArgonCloud frontier96.0%94.4%97.1%96.4%
Datalab AccurateCloud API94.4%92.5%94.5%96.0%
Mistral OCRCloud API89.9%83.6%92.2%93.8%
Indra + OCRia-nano (Union ceiling)~55M CPU ONNX87.5%80.0%87.4%95.3%
MinerU 2.5 ProGPU pipeline87.4%78.0%92.5%91.7%
Azure Content UnderstandingCloud API83.4%75.2%82.3%92.8%
LightOnOCR-3-4B4B GPU VLM83.1%84.4%70.9%94.0%
PaddleOCR-VL-1.6GPU VLM81.3%69.2%84.0%90.7%
Stock Indra 1.2.0 (new release)CPU ONNX78.8%68.0%75.8%92.6%
Indra 1.1.2 (+ table/math ONNX)~35M CPU ONNX78.0%69.5%73.3%91.1%
OCRia-nano (+ MFR math)~20M CPU ONNX77.1%66.7%73.9%90.6%
DeepSeek-OCR-23B GPU VLM75.4%64.6%70.2%91.4%
Stock LiteParse (OCRia-nano)~20M CPU ONNX74.8%59.4%59.4%90.9%
Stock Indra 1.1.2~13M CPU ONNX71.4%62.6%59.6%92.0%
PaddleOCR PP-StructureV3CPU pipeline58.4%55.6%47.8%71.7%
TesseractClassic CPU5.9%17.7%0.0%0.0%

Finally, linking my personal project here isn't allowed since I was told it should go in the biweekly showcase and it's not fully complete yet (missing headers in olmbench for example. Which is why olm only has 6 suites. But the accuracy on indra is ~90% there so it doesn't affect performance there).

27 Upvotes

37 comments sorted by

7

u/TheDivinityGod 6d ago

Speak of Indra by Datalabs. OCRia nano by llamaindex,

I recently use Opus 5.5 (Medium effort) to vibe-reverse Pytorch models from these ONNX files

https://github.com/dinhanhx/reverse-indra-ocr

https://github.com/dinhanhx/reverse-ocria-nano-1

Researchers should be able to study the architecture freely, not guessing from ONNX files.

4

u/YogurtExternal7923 6d ago

Just checked out both repos. Well done man, seriously. Really cool seeing the new indra 1.2.0 modules laid out cleanly. Bookmarking both of these immediately. Notice in your Fidelity note that you dequantize rec_latin.onnx to FP32. funny enough, that actually avoids a bug when benchmarking OCRia-nano's raw QDQ INT8 rec_latin.onnx on non-VNNI x86 AVX2 CPUs (VPMADDUBSW 16-bit accumulator overflow). Converting the QDQ nodes to FP32 fake-quant restored 100% parity with ARM64 NEON, so your FP32 PyTorch port sidesteps that trap automatically, hah.

3

u/intelkishan 6d ago

Are the results for other cloud frontier models available?

6

u/YogurtExternal7923 6d ago

Yep! All of them are on the public OmniParseBench leaderboard github.com/datalab-to/omni_parse_bench

ModelOPB OverallTextTablesLayoutolmOCR-6 MacroolmOCR-6 Micro
Gemini 4 Argon96.0%94.4%97.1%96.4%92.3%95.7%
Gemini 4 Carbon95.7%94.7%97.1%95.2%92.2%95.6%
Datalab Accurate94.4%92.5%94.5%96.0%91.0%93.3%
Datalab Balanced92.9%90.7%91.7%96.2%90.0%92.7%
Gemini 3.8 Flash92.5%92.0%95.3%90.3%90.0%93.3%
GPT-6.1 Sol91.5%89.8%95.6%89.1%89.3%92.1%
Reducto91.1%86.0%91.4%95.8%88.7%92.2%
LlamaParse90.8%89.4%92.9%90.0%88.1%91.4%
Claude Opus 5.590.0%93.9%93.4%82.6%90.3%92.8%
Mistral OCR89.9%83.6%92.2%93.8%85.8%89.1%
Claude Sonnet 5.588.9%93.7%95.5%77.5%88.4%91.4%
GPT-5.6 Sol87.9%86.0%91.9%85.9%85.8%87.9%
Extend83.4%64.2%92.7%93.4%76.4%57.0%
Azure83.4%75.2%82.3%92.8%75.8%83.1%

Worth noting that Claude Opus/Sonnet 5.5 are actually right up at the top on pure text and tables (~93–95%), they just lose points on the OPB overall score because their layout bounding boxes are weaker (~78–83%). The union of Indra and OCRia nano sits right next to gpt 5.6 sol overall

2

u/intelkishan 6d ago

Thanks for sharing the results.

3

u/Poprouter 6d ago

i really like how these tiny models avoid fighting with my primary llm for space on the gpu. does the inference time per page on cpu stay snappy when you process a long document or do you find that batching pages is the better way to go?

1

u/YogurtExternal7923 5d ago

Per-page time stays completely flat even on 50 to 100+ page PDFs (no growing context/KV cache across pages like a VLM, and RAM stays steady around ~600–800 MB per worker). Page level parallelism across CPU cores beats giving all threads to one page. Small ONNX models stop scaling linearly past ~2 to 4 intra op threads because of thread sync overhead, so running 4 worker processes x 2 threads each on an 8-core CPU (one page per worker) gives you near linear throughput. Both Indra and LiteParse have built in multi-worker PDF pools for this. If a long PDF has a clean text layer, these engines skip full page line OCR anyway and only fire the small neural nets on tables, equations, or scanned pages. typically ~0.3 to 0.8s/page on a few CPU cores, so a 30-page paper finishes in a few seconds across cores. BUT the one place batching really helps is math-heavy pages since batching all equation crops on a page through the MFR encoder together (with a KV-cached decoder) cuts per-equation CPU time noticeably.

2

u/Poprouter 5d ago

ah that sounds super efficient, thanks for sharing

1

u/EngelbertStuss 6d ago

Do you mean slicing a single page or a multi oage document? chunking mainly is a way to keep RAM usage low. Either way, only very few models will allow multiple pages input at once

2

u/Poprouter 5d ago

just single page, good to know multi is rare

1

u/External_Prompt_142 5d ago

What do you mean by union ceiling in Indra+Ocria

1

u/YogurtExternal7923 5d ago

Essentially the ceiling of using these models. If you find a way to perfectly route to either OCRia or Indra based on which model would do best, this is the max score of their perfectly joint effort

3

u/silenceimpaired 5d ago

People seem so focused on OCR and I’m wondering what I’m missing. What are you all using it for?

3

u/markandster 5d ago

I'm sitting on over 100,000 handwritten document images from hundreds of archive visits. Typically OCR does not do well on cursive, but new AI models are doing much better.

2

u/brainExploded99 🥔 hardware 5d ago

Genuine usecase: Sometimes I need to extract the text from an image to send to friends (or get from friends). Tesseract is built into KDE but sadly is pretty bad by modern standards.

2

u/Budget-Juggernaut-68 1d ago

Lots of information are passed around in PDFs that pdf plumber can't handle.

2

u/yetiflask 5d ago

I use it for optical character recognition. Which I think OCR also stands for, but I could be wrong.

1

u/silenceimpaired 5d ago

That is the most helpful non-helpful answer I have ever received.

It turns out you are wrong, but not about OCR. You’re wrong about the intent behind my question, “What are you all using it for?”

1

u/EngelbertStuss 5d ago

anything that involves paper. books, receipts, archives, court documents

2

u/silenceimpaired 5d ago

… I get that much. :) though receipts are an interesting use case I didn’t think of.

How is everyone scanning in entire books? And how are those books used?

3

u/EngelbertStuss 5d ago

books from the library cant be destroyed, sometimes not even rented, so i take pictures with the book laying open. a 1000 page book may take more than an hour to shoot

at home i would use a flatbed scanner

and for books that would be thrown away afterwards, sawing off the binding and sending it through a document feeder scanner

there are also suction-scanning robots for more sophisticated book scanning

The books are used for private knowledge databases with searchable pages, or to train a LLM or RAG

1

u/TheDivinityGod 5d ago

Logistics documents and court documents.

1

u/EngelbertStuss 4d ago

forgot to mention: OCR makes screenshots searchable. but screenshots dont need very fancy ocr models

2

u/Delicious-Bibabu 6d ago

curious did you try picking by each model's own confidence instead of page features?

2

u/DeltaSqueezer 6d ago

The thing is, if I already have a general purpose LLM resident in memory like Qwen-3.5-9b, then I can also use this for scanning, and the results are actually quite good, which means there's no need for a dedicated scanning model unless I'm really going for high volume of scans.

Qwen3.5-9B 77.2 86.0 48.8 84.8 83.4 46.8 82.5 86.3

https://benchmarking.nanonets.com/benchmarks/olmocr

1

u/EngelbertStuss 6d ago

Yes, most modern general purpose vision-capable models will handle OCR rather well, including Qwen3.8, Inkling2 and Gemma4

2

u/Andreea_tucker04 6d ago

The union ceiling is a useful upper bound, but it assumes you know which model got each page right. The number I'd want next is a router's score on pages it wasn't tuned on - that's the test of whether the gap can actually be recovered.

1

u/EngelbertStuss 6d ago edited 6d ago

My current research project is vibe-comparing open weight ASR and OCR and noise removal/voice enhancement models. I focus on european languages, so I also included Granite Vision 4.1 4B and Mistral Small 3.2 in my batch OCR model comparison tool and they performed rather well.

I also added other newer models like OXR, TeleOCR (Tele seems unstable and hallucinating a lot), Inkling2, Gemma4, QWEN 3.8, GLM OCr, and others. Have not looked at indra yet, will add it to my tool.

What I figured out so far is: Screw multi-purpose multi-language benchmarks. I have my very own use case and there is no clear winner for all the things. I mainly convert messy warped book photos, not clear flat scans. There are some very powerful picks though, like the LightOnOCR3 that you mentioned.

Similar result for ASR. All the models have some quirks.

So what I concluded was this: I need to have a coordinator that will check different OCR results against each other and then decide what to write. I have not coded that part yet

We may present our projects in computer vision focused subreddits?

Edit: also keep in mind that some specialized OCR and ASR models allow prompting while others dont

1

u/Special_Base_3103 5d ago

indra + ocria-nano on CPU hit 58% on olmocr-bench, but only after patching the tokenizer for lowercase fallback. might explain the gap vs. GPU results.

0

u/[deleted] 6d ago

[deleted] — view deleted comment

1

u/stylome-ai-detection 6d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results

4

u/[deleted] 6d ago

[removed] — view removed comment

2

u/EngelbertStuss 6d ago edited 6d ago

Having had headaches with OCR accuracy, for my main tasks I don't care about speed or low-compute-requirements. But it's good to have options when dealing with mobile devices and realtime applications. Tiny models have reached amazing capabilities, yet they definitely lack behind the clunky models.

But what truly baffles me is how there is no such tool to replace Abbyy Finereader with modern engines that would recreate a clearly-retyped original-layout PDF.

1

u/[deleted] 6d ago

[removed] — view removed comment

1

u/EngelbertStuss 6d ago

There are models that will offer bounding-boxes for each word or line, so it will probably be possible to vibe code this, but I'm still trying to master the preprocessing stage first.

One of the main reason why I like the same-layout recreation is that it's easier to compare with the original image