Back to articles
Evaluation & Benchmarks

DharmaOCR Shows Why Newer OCR Models Do Not Always Win

3 min read

Introduction

A new Hugging Face Blog article from the Dharma-AI team revisits a familiar assumption in AI evaluation: newer models should be better. In OCR, the answer appears to be more complicated. The authors report that DharmaOCR, a model built specifically for Brazilian Portuguese, still outperformed two newer OCR systems, Mistral OCR4 and Unlimited-OCR, on a benchmark designed around Portuguese documents.

Key points

  • Specialization remains measurable: DharmaOCR was not designed as a general multilingual OCR system. Its goal was narrower: Brazilian Portuguese. On the reported benchmark, it scored 0.925, compared with 0.798 for Mistral OCR4 and 0.7587 for Unlimited-OCR.
  • The training strategy matters: The model used a two-stage process. First, supervised fine-tuning on Portuguese-language files aligned the model with local vocabulary, syntax, spelling patterns, and document structures. Second, Direct Preference Optimization taught the model to prefer better extractions among competing outputs.
  • Stability is part of quality: The authors argue that generative OCR systems are inherently probabilistic. The question is not whether errors exist, but how often they appear, what kind they are, and whether the model degrades into repetitive or incoherent output under production conditions.
  • Model capacity is allocated, not magically universal: Architecture and parameter count set a ceiling, but training determines where that capacity is spent. A multilingual model must distribute its representations across many languages, while a specialized model can concentrate more of its capacity on one linguistic space.

Why the gap appears

The article highlights ENEM essays, handwritten submissions from Brazil’s national high school examination, as an example of where the difference becomes visible. These documents include handwriting, local references, proper nouns, and culturally specific vocabulary. In the reported examples, Mistral OCR4 and Unlimited-OCR misread the name Chico Buarque, a widely recognized Brazilian musician and poet. Unlimited-OCR also produced a visibly distorted version of a Portuguese quotation embedded in the same document.

The authors present these failures not as random mistakes, but as diagnostic evidence. A model with limited exposure to Brazilian Portuguese is more likely to fail precisely on the expressions, names, and orthographic patterns that distinguish that domain from a broader multilingual corpus.

Why it matters

The broader lesson is not that DharmaOCR is universally better than newer OCR models. Rather, the article shows why benchmark design and deployment context matter. A broad multilingual OCR model may be more useful when the target documents are diverse. But for government, education, legal, or regional-language workflows, a specialized model can still offer better extraction quality and lower degeneration.

For teams choosing OCR systems, release date and general benchmark reputation are not enough. The practical question is whether the model was trained for the documents it will actually see. DharmaOCR’s reported results suggest that even in the era of multimodal generative models, domain specialization remains a strong engineering strategy.

Source: Hugging Face Blog

Comments

Checking sign-in status...

Loading comments...

Related articles

CCTest · Blog
Hindcast Replays Prediction Markets to Test Whether LLMs Can Really Forecast
Evaluation & Benchmarks
cctest.ai

Hindcast Replays Prediction Markets to Test Whether LLMs Can Really Forecast

The Hindcast paper proposes a time-aware evaluation setup for LLM forecasters, replaying resolved Polymarket questions as if models were standing at an earlier date. Its goal is to separate genuine forecasting from answer leakage through retrieval or training data.

Read more