ocr-bench-moh / README.md
davanstrien's picture
davanstrien HF Staff
Add rednote-hilab/dots.ocr OCR results (50 samples) [dots-ocr]
261f176 verified
|
Raw
History Blame
3.54 kB
metadata
tags:
  - ocr
  - document-processing
  - olmocr
  - markdown
  - uv-script
  - generated
dataset_info:
  config_name: dots-ocr
  features:
    - name: image
      dtype: image
    - name: b_number
      dtype: string
    - name: page_index
      dtype: int64
    - name: source_row
      dtype: int64
    - name: markdown
      dtype: string
    - name: inference_info
      dtype: string
  splits:
    - name: train
      num_bytes: 20438420
      num_examples: 50
  download_size: 20339706
  dataset_size: 20438420
configs:
  - config_name: dots-ocr
    data_files:
      - split: train
        path: dots-ocr/train-*

Document OCR using olmOCR-2-7B-1025-FP8

This dataset contains markdown-formatted OCR results from images in davanstrien/moh-bench-sample using olmOCR-2-7B.

Processing Details

Configuration

  • Image Column: image
  • Output Column: markdown
  • Dataset Split: train
  • Batch Size: 16
  • Max Model Length: 16,384 tokens
  • Max Output Tokens: 8,192
  • GPU Memory Utilization: 80.0%

Model Information

olmOCR-2-7B is a high-quality document OCR model based on Qwen2.5-VL-7B-Instruct, fine-tuned on olmOCR-mix-1025 dataset and optimized with GRPO reinforcement learning.

Key features:

  • 📐 LaTeX equations - Mathematical formulas in LaTeX format
  • 📊 HTML tables - Structured table extraction
  • 📝 Document structure - Headers, lists, formatting preserved
  • 🖼️ Figure descriptions - Charts and figures labeled with descriptions
  • 🔄 Rotation detection - Metadata about document orientation
  • 📑 Natural reading order - Handles multi-column and complex layouts
  • 🎯 High accuracy - Scores 82.4 ± 1.1 on olmOCR-Bench

Output Format

Each row contains:

  • Original image from source dataset
  • markdown: Extracted document content in markdown format
  • olmocr_metadata: JSON with document metadata (language, rotation, table/diagram flags)

Columns

  • image: Original document image
  • markdown: Extracted text and structure in markdown
  • olmocr_metadata: Document metadata (primary_language, is_rotation_valid, rotation_correction, is_table, is_diagram)
  • inference_info: Processing metadata (model, script version, timestamp)

Reproduction

# Using HF Jobs (recommended)
hf jobs uv run --flavor l4x1 \
  -s HF_TOKEN \
  https://huggingface.co/datasets/uv-scripts/ocr/raw/main/olmocr2-vllm.py \
  davanstrien/moh-bench-sample \
  your-username/output-dataset

# Local with GPU
uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/olmocr2-vllm.py \
  davanstrien/moh-bench-sample \
  your-username/output-dataset

Citation

@misc{olmocr,
      title={{olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models}},
      author={Jake Poznanski and Jon Borchardt and Jason Dunkelberger and Regan Huff and Daniel Lin and Aman Rangapur and Christopher Wilhelm and Kyle Lo and Luca Soldaini},
      year={2025},
      eprint={2502.18443},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2502.18443},
}

Generated with uv-scripts/ocr