Newer Models, Same Advantage
13:49 · July 16, 2026 · Hugging Face Blog

Summary
The article examines DharmaOCR, a specialized optical character recognition model developed for Brazilian Portuguese. It contrasts the model’s results with those of more recent generalist systems such as Mistral OCR4 and Unlimited-OCR. The comparison centers on a Portuguese-only benchmark where DharmaOCR recorded an extraction quality of 0.925, while the later models scored 0.798 and 0.7587 respectively. The authors attribute the performance difference to a deliberate design choice: concentrating all available parameters on the vocabulary, morphology, and orthographic patterns of a single language rather than distributing capacity across multiple languages.
The training process consists of two sequential stages. Supervised fine-tuning first aligns the model to Portuguese-language documents drawn from varied sources and formats, directing representational capacity toward domain-specific features. Direct Preference Optimization follows, exposing the model to paired outputs so that it learns to favor coherent, complete transcriptions over those that diverge into repetition or semantic drift. The second stage reduces the incidence of text degeneration—where generative models continue producing tokens from internal patterns once visual input becomes ambiguous—without altering the accuracy gains achieved in the first stage.
Empirical examples illustrate where multilingual models lose ground. On Brazilian high-school examination essays containing proper names and culturally specific phrasing, the newer systems rendered “Chico Buarque” as “Chico Barque” or “chico bique” and produced incoherent continuations of surrounding text. DharmaOCR transcribed the same passages correctly. Under conditions of small fonts or degraded scans, the generalist models generated output with no recoverable relation to the source, rendering downstream processing unusable. The specialized model maintained coherence on the same inputs.
The authors conclude that architectural and training advances raise the performance ceiling for all models, yet the underlying allocation of finite parameters remains decisive. A system that directs every parameter at one linguistic domain extracts more usable capacity from those parameters than a system that spreads the same resources across many domains. This structural relationship, they argue, persists even as newer generalist architectures appear.
Why it matters
While the specific focus is on Brazilian Portuguese, the underlying methodology of using SFT and DPO to build highly specialized, stable OCR models is highly actionable for Dutch ML engineers. It provides a blueprint for developing domain-specific or Dutch-language models that can outperform larger, generalist alternatives in production environments.



