---
title: "Finetuning olmOCR to be a faithful OCR-Engine"
description: "TNG fine-tuned olmOCR-7B-0225-preview so it no longer drops headers and footers."
url: "https://swe.quest/articles/finetuning-olmocr-to-be-a-faithful-ocr-engine-2ef05ae56aeb87d1"
canonical: "https://huggingface.co/blog/tngtech/finetuning-olmocr-to-be-a-faithful-ocr-engine"
source: "Hugging Face"
published: "2025-04-22"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["model-training","computer-vision","llms"]
---

# Finetuning olmOCR to be a faithful OCR-Engine

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2025-04-22, 5 min read, Case study. Original: [https://huggingface.co/blog/tngtech/finetuning-olmocr-to-be-a-faithful-ocr-engine](https://huggingface.co/blog/tngtech/finetuning-olmocr-to-be-a-faithful-ocr-engine)

## Summary

TNG fine-tuned olmOCR-7B-0225-preview so it no longer drops headers and footers. The original model omits them by design because its training data targets LLM pretraining text, which makes it unreliable for business documents like invoices. The team used Qwen2.5-VL-72B-Instruct to generate an 8,000-document dataset capturing all page content, then trained with the open-source olmOCR pipeline on an 8xH100 node: 2.5 epochs, default hyperparameters, about 6 hours, with roughly two GPUs likely enough. Qualitative comparisons show the fine-tune extracts header and footer data while still parsing simple tables and multi-column layouts, though output quality can vary noticeably with sampling temperature.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- vision language models ([easy posts on Computer vision](https://swe.quest/tags/computer-vision.md?difficulty=easy))
- model fine-tuning basics ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))

## Keywords

olmOCR, Qwen2.5-VL-72B-Instruct, olmOCR-mix-0225, document anchoring, MLflow, H100

## Related posts

- [Supercharge your OCR Pipelines with Open Models](https://swe.quest/articles/supercharge-your-ocr-pipelines-with-open-models-6c91417d0009054a.md): Hugging Face · 2025-10-21 · Medium · 16 min read · Computer vision, Inference & serving, Evaluation, RAG & retrieval
  Vision-language-model-based OCR has moved well beyond plain transcription.
- [Welcome the NVIDIA Llama Nemotron Nano VLM to Hugging Face Hub](https://swe.quest/articles/welcome-the-nvidia-llama-nemotron-nano-vlm-to-hugging-face-hub-87d3387fe2e7973a.md): Hugging Face · 2025-06-27 · Easy · 7 min read · Computer vision, LLMs, Model training
  Llama Nemotron Nano VL is an 8B vision language model for document processing, built on Llama-3.1-8B-Instruct with a C-RADIOv2-VLM-H vision transformer.
- [Accelerating Document AI](https://swe.quest/articles/accelerating-document-ai-a399320437d1b8e7.md): Hugging Face · 2022-11-21 · Easy · 13 min read · Computer vision, Machine learning, Model training
  Open-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.
- [SOTA OCR with Core ML and dots.ocr](https://swe.quest/articles/sota-ocr-with-core-ml-and-dots-ocr-f35c7240fd943002.md): Hugging Face · 2025-10-02 · Medium · 8 min read · Inference & serving, Machine learning, Computer vision, Mobile, Swift
  Converting the dots.ocr vision encoder, a 1.2B NaViT-style model paired with a Qwen2.5-1.5B backbone, from PyTorch to Core ML is done by simplifying the model to single-image inference, then fixing conversion errors one by one.
- [PP-OCRv6 on Hugging Face: 50-Language OCR from 1.5M to 34.5M Parameters](https://swe.quest/articles/pp-ocrv6-on-hugging-face-50-language-ocr-from-1-5m-to-34-5m-parameters-e9f0018c08d667cd.md): Hugging Face · 2026-06-22 · Medium · 5 min read · Computer vision, Inference & serving, Python
  PP-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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
