Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 16 min read How-to mediumAdept

Supercharge your OCR Pipelines with Open Models

Vision-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.

Related posts

  • Finetuning olmOCR to be a faithful OCR-Engine

    Hugging Face mediumAdept

    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.

  • Welcome the NVIDIA Llama Nemotron Nano VLM to Hugging Face Hub

    Hugging Face easyNovice

    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. It uses dynamic high-resolution tiling to handle dense layouts and arbitrary aspect ratios, and is reported to lead on OCRBench v2 for text recognition, table extraction, element parsing and bounding-box grounding. Training has two stages: MLP-connector pre-training on ~1.5M samples for vision-language alignment, then end-to-end SFT on OCR-heavy data drawn from NeMo Retriever Parse sets (NVPDFTex, Common Crawl PDFs, Wikipedia renders) plus DocLayNet, FinTabNet and PubTables-1M, with affine and photometric augmentation. The model outputs tables in LaTeX, HTML or markdown and can be post-trained further with NeMo and Megatron scripts.

  • Accelerating Document AI

    Hugging Face easyNovice

    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. 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.

  • Dharma Field Extractor: Any Document In, Structured Fields in JSON Out

    Hugging Face easyNovice

    Dharma-AI's Field Extractor is a 2B-parameter vision-language model, a LoRA adapter on DharmaOCR-LITE v1.1 trained on 43,384 field-annotated examples, that turns document images into typed JSON, either open-ended or filling a caller-supplied schema with nulls for missing fields. On a 546-document, 1,638-case benchmark scored by field-level F1 × Levenshtein similarity × valid-JSON rate, it reached 0.834, ahead of four frontier LLM configurations ranging from Claude Opus 5 (0.816) to GPT-5.6 Luna (0.741). Self-hosted on a single L40S, it cost an estimated 6–147× less per extraction than the API list prices. Held-out SROIE and FUNSD examples show correct handling of unlabeled addresses, blank fields and checkbox booleans.

  • Introducing Idefics2: A Powerful 8B Vision-Language Model for the community

    Hugging Face easyNovice

    Idefics2 is an 8B-parameter open (Apache 2.0) vision-language model that takes interleaved images and text and generates text, with strong OCR and document understanding. It scores at the top of its size class on VQA benchmarks and rivals LLaVA-NeXT-34B and MM1-30B-chat while using as few as 64 visual tokens per image. Compared with Idefics1, it handles images at native resolution and aspect ratio (NaViT-style, up to 980x980, with optional SPHINX-style sub-image splitting). It also drops gated cross-attention in favor of a SigLIP encoder, Perceiver pooling and an MLP projection concatenated with Mistral-7B text embeddings. The release includes The Cauldron, a 50-dataset instruction-tuning collection, plus Transformers inference code and a fine-tuning colab.

The quest for software engineering knowledge.

Look:
Layout: