<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/newer-models-same-advantage-uuobzxkno" -->

---
title: Newer Models, Same Advantage | daily.dev
description: DharmaOCR, a specialized OCR model trained exclusively on Brazilian Portuguese, outperforms newer and better-resourced generalist models including Mistral OCR4...
canonical: https://daily.dev/posts/newer-models-same-advantage-uuobzxkno
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Newer Models, Same Advantage | daily.dev
og:description: DharmaOCR, a specialized OCR model trained exclusively on Brazilian Portuguese, outperforms newer and better-resourced generalist models including Mistral OCR4...
og:url: https://daily.dev/posts/newer-models-same-advantage-uuobzxkno
og:image: https://api.daily.dev/og/posts/uUObZXkNo.png
og:image:alt: Newer Models, Same Advantage
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Newer Models, Same Advantage

**[Hugging Face](https://daily.dev/sources/huggingface)** · 12 min read · 37 upvotes · 2 comments

## Summary

DharmaOCR, a specialized OCR model trained exclusively on Brazilian Portuguese, outperforms newer and better-resourced generalist models including Mistral OCR4 and Unlimited-OCR on a Portuguese-focused benchmark. DharmaOCR scored 0.925 versus 0.798 and 0.7587 for the competitors. The post explains the two-stage training pipeline: supervised fine-tuning for domain alignment followed by Direct Preference Optimization (DPO) to reduce text degeneration on visually complex documents. The core argument is that domain specialization provides a structural advantage over generalist models regardless of architectural improvements, because finite compute and parameters directed at a single domain outperform the same resources spread across many languages. Concrete failure examples show multilingual models misreading culturally specific Brazilian Portuguese proper nouns and producing incoherent degenerated output on small-font documents, while DharmaOCR handles both correctly.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://huggingface.co/blog/Dharma-AI/newer-models-same-advantages>

## Questions this post answers

### Does a domain-specialized OCR model still beat newer general-purpose OCR models on Portuguese text extraction?

Yes, a specialized Brazilian Portuguese OCR model called DharmaOCR scored 0.925 on a Portuguese-focused benchmark, compared to 0.798 for Mistral OCR4 and 0.7587 for Unlimited-OCR, both released after DharmaOCR. The gap is attributed to concentrated domain training rather than architecture size, with generalist models misreading culturally specific names and vocabulary.

_Developers comparing OCR tools for non-English pipelines can track specialization benchmarks like these on daily.dev._

### How does Direct Preference Optimization reduce text degeneration in OCR models?

Direct Preference Optimization trains a model to discriminate between competing full outputs based on overall coherence rather than token-by-token accuracy, unlike supervised fine-tuning which can let early errors compound into repetitive or incoherent text under visual difficulty like small fonts or degraded scans. Applying DPO after supervised fine-tuning lowered degeneration rates while improving extraction accuracy on the same documents.

_Teams building production OCR pipelines can follow training approaches like this on daily.dev to avoid unusable output._

## Community discussion

Top comments from developers on daily.dev.

**@kartiknvj** · 7 upvotes

> The two-stage pipeline here, SFT for domain alignment then DPO to cut text degeneration, matches what I have seen where preference optimization does more for output stability than raw accuracy on hard documents. Domain specialization beating generalist OCR on a focused benchmark tracks with the intuition that finite parameters aimed at one distribution win. How did you build the DPO preference pairs for the degenerated cases, hand-labeled or model-scored?

**@ajaychoudhary80** · 2 upvotes

> Domain expertise often matters more than model size for real-world accuracy.

## Similar posts on daily.dev

- [Direct Preference Optimization Beyond Chatbots](https://daily.dev/posts/direct-preference-optimization-beyond-chatbots-lana8ik70) · Hugging Face · 0 upvotes · 0 comments
- [Specialization Beats Scale: A Strategic Variable Most AI Procurement Decisions Overlook](https://daily.dev/posts/specialization-beats-scale-a-strategic-variable-most-ai-procurement-decisions-overlook-thmp6rw6z) · Hugging Face · 3 upvotes · 0 comments
- [OCR Showdown — Evaluating Three OCR Models](https://daily.dev/posts/ocr-showdown-evaluating-three-ocr-models-ch9qm0xde) · Medium · 0 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#deep-learning](https://daily.dev/tags/deep-learning)

[View this post on daily.dev](https://daily.dev/posts/newer-models-same-advantage-uuobzxkno)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Newer Models, Same Advantage","url":"https://daily.dev/posts/newer-models-same-advantage-uuobzxkno","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/newer-models-same-advantage-uuobzxkno"},"datePublished":"2026-07-16T11:52:23.070Z","dateModified":"2026-09-13T21:05:27.499Z","description":"DharmaOCR, a specialized OCR model trained exclusively on Brazilian Portuguese, outperforms newer and better-resourced generalist models including Mistral OCR4...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1ff67d35b3c3320209d9469fd04280e3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1ff67d35b3c3320209d9469fd04280e3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hugging Face","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hugging Face","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f1f55c67d81a4330acf5b90b26b0c8e1","url":"https://daily.dev/sources/huggingface"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/newer-models-same-advantage-uuobzxkno","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":37},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"machine-learning,deep-learning","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hugging Face","item":"https://daily.dev/sources/huggingface"},{"@type":"ListItem","position":3,"name":"Newer Models, Same Advantage"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/newer-models-same-advantage-uuobzxkno","comment":[{"@type":"Comment","text":"The two-stage pipeline here, SFT for domain alignment then DPO to cut text degeneration, matches what I have seen where preference optimization does more for output stability than raw accuracy on hard documents. Domain specialization beating generalist OCR on a focused benchmark tracks with the intuition that finite parameters aimed at one distribution win. How did you build the DPO preference pairs for the degenerated cases, hand-labeled or model-scored?","datePublished":"2026-07-16T13:41:47.379Z","url":"https://daily.dev/posts/uUObZXkNo#c-m4Dj4eKXt","author":{"@type":"Person","name":"kartik-nvjk","url":"https://daily.dev/kartiknvj","image":"https://media.daily.dev/image/upload/s--3gGgsVCw--/f_auto/v1781456774/avatars/avatar_TvTVeiMdkRCqWUDullFmy?_a=BAMAMiWQ0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":7}},{"@type":"Comment","text":"Domain expertise often matters more than model size for real-world accuracy.","datePublished":"2026-07-18T04:22:20.793Z","url":"https://daily.dev/posts/uUObZXkNo#c-NuHdimN3m","author":{"@type":"Person","name":"Ajay Choudhary","url":"https://daily.dev/ajaychoudhary80","image":"https://media.daily.dev/image/upload/s--WkX8wDW2--/f_auto/v1780989706/avatars/avatar_QNZlI2SgVnNSx5PSRpCVx?_a=BAMAMiWQ0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/newer-models-same-advantage-uuobzxkno#faq","mainEntity":[{"@type":"Question","name":"Does a domain-specialized OCR model still beat newer general-purpose OCR models on Portuguese text extraction?","acceptedAnswer":{"@type":"Answer","text":"Yes, a specialized Brazilian Portuguese OCR model called DharmaOCR scored 0.925 on a Portuguese-focused benchmark, compared to 0.798 for Mistral OCR4 and 0.7587 for Unlimited-OCR, both released after DharmaOCR. The gap is attributed to concentrated domain training rather than architecture size, with generalist models misreading culturally specific names and vocabulary. Developers comparing OCR tools for non-English pipelines can track specialization benchmarks like these on daily.dev."}},{"@type":"Question","name":"How does Direct Preference Optimization reduce text degeneration in OCR models?","acceptedAnswer":{"@type":"Answer","text":"Direct Preference Optimization trains a model to discriminate between competing full outputs based on overall coherence rather than token-by-token accuracy, unlike supervised fine-tuning which can let early errors compound into repetitive or incoherent text under visual difficulty like small fonts or degraded scans. Applying DPO after supervised fine-tuning lowered degeneration rates while improving extraction accuracy on the same documents. Teams building production OCR pipelines can follow training approaches like this on daily.dev to avoid unusable output."}}]}
```

