Newer Models, Same Advantage
This article presents the evidence and the mechanism behind that advantage. Three months ago, we published a paper on DharmaOCR and open-sourced one of the models . The objective was specific: optical character recognition engineered for Brazilian Portuguese.
Key Takeaways
- The training pipeline was built in two stages.
The first was a supervised fine-tuning step, drawing on a broad collection of Portuguese-language files from different sources, formats, and levels of complexity.
- The combined result was a model that achieved the highest extraction quality score with the lowest degeneration rate on a Portuguese-focused benchmark.
The fine-tuning stage built domain competency; the DPO stage ensured that competency held under the conditions where models tend to fail.
- That proliferation has not, however, changed the fundamental character of the technology.
Every OCR system built on a generative model is probabilistic.
- Training determines how that capacity is allocated.
This distinction is where specialization becomes a structural question rather than a design preference.
- DharmaOCR was trained to accept that constraint in reverse.
The training pipeline was built in two stages. The first was a supervised fine-tuning step, drawing on a broad collection of Portuguese-language files from different sources, formats, and levels of complexity. This stage aligned the model's weights to the specific vocabulary, syntax, and document structures of Brazilian Portuguese - concentrating representational capacity on the target language rather than distributing it across a broader multilingual space.
The second stage applied Direct Preference Optimization: rather than training only on correct transcriptions, the model learned from comparative preference data between competing outputs, teaching it to consistently select the better extraction at inference time. This stage addressed a different problem: not accuracy, but stability. By suppressing the failure modes that cause generative models to produce repetitive or incoherent output, DPO reduced inference time and cost, and materially improved the reliability of what the model delivered in production.
The combined result was a model that achieved the highest extraction quality score with the lowest degeneration rate on a Portuguese-focused benchmark. The fine-tuning stage built domain competency; the DPO stage ensured that competency held under the conditions where models tend to fail. --- OCR models have been moving quickly.
For more details please read the original article at Hugging Face.
Continue Learning
Comments
Sign in to join the conversation