Newer Models, Same Advantage
DharmaOCR, a Brazilian Portuguese OCR model trained with supervised fine-tuning followed by Direct Preference Optimization, scored 0.925 on a Portuguese-only benchmark, ahead of the newer Mistral OCR4 (0.798) and Unlimited-OCR (0.7587). The gap shows up as misread Brazilian proper nouns and vocabulary in handwritten ENEM essays, and as text degeneration on small-font documents, where generalist models produce output unrelated to the page. SFT focuses the model's parameters on the target language. DPO trains on preferences between complete outputs, which reduces the token-by-token drift that causes repetitive or incoherent transcriptions. The authors argue that specialization will keep an edge even as general models improve.
Related posts
- Direct Preference Optimization Beyond Chatbots
Hugging Face hardMasterAdding a DPO stage after supervised fine-tuning reduced text degeneration (repetition loops) in every one of five vision-language model families tested on Brazilian Portuguese structured OCR. The average reduction was 59.4% and the best was 87.6%, with Nanonets-OCR2-3B falling from 1.61% to 0.20%. The key design choice was to keep the SFT model's own degenerate outputs as the rejected examples in preference pairs, rather than filtering them out. An LLM judge scored multiple candidate responses per document across 23,726 documents to pick chosen and rejected outputs. The authors argue that token-level SFT loss cannot penalize completion-level failures like loops, while DPO can, and they outline when the approach should transfer to other structured generation tasks: the failure mode must be a distinct, recognizable class of output.
- Supercharge your OCR Pipelines with Open Models
Hugging Face mediumAdeptVision-language-model-based OCR has moved well beyond plain transcription. Current open-weight models such as OlmOCR-2, Chandra, dots.ocr, DeepSeek-OCR, PaddleOCR-VL, Granite-Docling and Nanonets-OCR2 handle handwriting, tables, charts, formulas and layout grounding, and output DocTags, HTML, Markdown or JSON. Choose the output format by use case: layout-preserving formats for digital reconstruction, Markdown with image captions for LLM input, and JSON for programmatic use. Since performance varies widely by domain, evaluate candidates on your own representative documents alongside OmniDocBench, OlmOCR-Bench and CC-OCR. Open models are cheap to run, around $178 per million pages for OlmOCR-2 on an H100, and serve easily with vLLM behind an OpenAI-compatible client.
- PP-OCRv6 on Hugging Face: 50-Language OCR from 1.5M to 34.5M Parameters
Hugging Face mediumAdeptPP-OCRv6 is PaddleOCR's new OCR model family in three tiers (tiny 1.5M, small 7.7M, medium 34.5M parameters), with the small and medium tiers covering 50 languages including Chinese, English, Japanese and 46 Latin-script languages. On PaddleOCR's in-house multi-scenario benchmarks the medium model reaches 86.2% detection Hmean and 83.2% recognition accuracy, +4.6 and +5.1 points over PP-OCRv5_server. Architecture changes include a shared PPLCNetV4 backbone, a RepLKFPN large-kernel feature pyramid for detection and an EncoderWithLightSVTR recognizer. Models ship as safetensors, Paddle and ONNX formats, selectable in PaddleOCR via engine="transformers", "onnxruntime" or Paddle Inference.
- Accelerating Document AI
Hugging Face easyNoviceOpen-source multimodal models now make it practical to build custom Document AI systems for OCR, document classification, layout analysis, parsing, table extraction and document question answering. Models such as LayoutLMv3 and Donut combine text and visual layout. On RVL-CDIP they reach about 95% accuracy, against 89% for text-only BERT, and on FUNSD LayoutLM raises F1 from 60% to 90%. Practical advice: check model licenses early, since LayoutLMv2/v3 checkpoints are non-commercial. Start with a few hundred annotated documents and fine-tune pretrained models rather than pre-training your own. Weigh OCR-free, high-resolution models against their memory cost, and verify that OCR bounding boxes align with the model processor.
- Speculative Decoding for 2x Faster Whisper Inference
Hugging Face mediumAdeptSpeculative decoding speeds up Whisper transcription by about 2x while producing mathematically identical outputs. A fast assistant model drafts candidate tokens and the main model verifies them in a single forward pass. With Distil-Whisper (full encoder, 2 decoder layers) as assistant to Whisper large-v2, a 73-sample LibriSpeech benchmark dropped from 73s to 33s at the same 3.5% WER, with only about 8% extra VRAM from sharing the encoder. For multilingual use, a multilingual checkpoint such as Whisper tiny can serve as assistant, since the only hard constraint is an identical tokenizer. Note that large-v3's expanded vocabulary makes it incompatible with older checkpoints.