davanstrien HF Staff commited on
Commit
826ecd8
·
verified ·
1 Parent(s): b7073e3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +63 -27
README.md CHANGED
@@ -2,54 +2,90 @@
2
  tags:
3
  - ocr
4
  - document-processing
5
- - unlimited-ocr
6
- - baidu
7
  - markdown
8
  - uv-script
9
  - generated
10
  ---
11
 
12
- # Document OCR using Unlimited-OCR
13
 
14
- This dataset contains OCR results for [davanstrien/encyclopaedia-britannica-1771](https://huggingface.co/datasets/davanstrien/encyclopaedia-britannica-1771)
15
- produced by [baidu/Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) with vLLM.
16
 
17
  ## Processing Details
18
 
19
  - **Source Dataset**: [davanstrien/encyclopaedia-britannica-1771](https://huggingface.co/datasets/davanstrien/encyclopaedia-britannica-1771)
20
- - **Model**: [baidu/Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR)
21
  - **Number of Samples**: 5
22
- - **Processing Time**: 2.3 min
23
- - **Processing Date**: 2026-07-07 23:47 UTC
 
 
 
 
24
  - **Output Column**: `markdown`
25
- - **Split**: `train`
 
 
 
 
26
 
27
- ## Output
28
 
29
- Grounding markup was stripped (`--strip-grounding`); the column holds clean text.
30
 
31
- Tables are returned as HTML and equations as LaTeX.
 
 
 
 
 
 
 
32
 
33
- ## Usage
34
 
35
- ```python
36
- from datasets import load_dataset
 
 
37
 
38
- ds = load_dataset("davanstrien/ocr-bench-smoke", split="train")
39
- print(ds[0]["markdown"])
40
- ```
41
 
42
- ## Reproduction
 
 
 
43
 
44
- Generated with the [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr) Unlimited-OCR
45
- vLLM recipe. Unlimited-OCR needs Baidu's dedicated vLLM image:
46
 
47
  ```bash
48
- hf jobs uv run --flavor l4x1 -s HF_TOKEN \
49
- --image vllm/vllm-openai:unlimited-ocr --python /usr/bin/python3 \
50
- -e PYTHONPATH=/usr/local/lib/python3.12/dist-packages \
51
- https://huggingface.co/datasets/uv-scripts/ocr/raw/main/unlimited-ocr-vllm.py \
52
- davanstrien/encyclopaedia-britannica-1771 <output-dataset>
 
 
 
 
 
 
53
  ```
54
 
55
- Generated with [UV Scripts](https://huggingface.co/uv-scripts)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  tags:
3
  - ocr
4
  - document-processing
5
+ - olmocr
 
6
  - markdown
7
  - uv-script
8
  - generated
9
  ---
10
 
11
+ # Document OCR using olmOCR-2-7B-1025-FP8
12
 
13
+ This dataset contains markdown-formatted OCR results from images in [davanstrien/encyclopaedia-britannica-1771](https://huggingface.co/datasets/davanstrien/encyclopaedia-britannica-1771) using olmOCR-2-7B.
 
14
 
15
  ## Processing Details
16
 
17
  - **Source Dataset**: [davanstrien/encyclopaedia-britannica-1771](https://huggingface.co/datasets/davanstrien/encyclopaedia-britannica-1771)
18
+ - **Model**: [allenai/olmOCR-2-7B-1025-FP8](https://huggingface.co/allenai/olmOCR-2-7B-1025-FP8)
19
  - **Number of Samples**: 5
20
+ - **Processing Time**: 0h 3m 18s
21
+ - **Processing Date**: 2026-07-08 06:41 UTC
22
+
23
+ ### Configuration
24
+
25
+ - **Image Column**: `image`
26
  - **Output Column**: `markdown`
27
+ - **Dataset Split**: `train`
28
+ - **Batch Size**: 16
29
+ - **Max Model Length**: 16,384 tokens
30
+ - **Max Output Tokens**: 8,192
31
+ - **GPU Memory Utilization**: 80.0%
32
 
33
+ ## Model Information
34
 
35
+ 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.
36
 
37
+ Key features:
38
+ - 📐 **LaTeX equations** - Mathematical formulas in LaTeX format
39
+ - 📊 **HTML tables** - Structured table extraction
40
+ - 📝 **Document structure** - Headers, lists, formatting preserved
41
+ - 🖼️ **Figure descriptions** - Charts and figures labeled with descriptions
42
+ - 🔄 **Rotation detection** - Metadata about document orientation
43
+ - 📑 **Natural reading order** - Handles multi-column and complex layouts
44
+ - 🎯 **High accuracy** - Scores 82.4 ± 1.1 on olmOCR-Bench
45
 
46
+ ## Output Format
47
 
48
+ Each row contains:
49
+ - Original image from source dataset
50
+ - `markdown`: Extracted document content in markdown format
51
+ - `olmocr_metadata`: JSON with document metadata (language, rotation, table/diagram flags)
52
 
53
+ ## Columns
 
 
54
 
55
+ - `image`: Original document image
56
+ - `markdown`: Extracted text and structure in markdown
57
+ - `olmocr_metadata`: Document metadata (primary_language, is_rotation_valid, rotation_correction, is_table, is_diagram)
58
+ - `inference_info`: Processing metadata (model, script version, timestamp)
59
 
60
+ ## Reproduction
 
61
 
62
  ```bash
63
+ # Using HF Jobs (recommended)
64
+ hf jobs uv run --flavor l4x1 \
65
+ -s HF_TOKEN \
66
+ https://huggingface.co/datasets/uv-scripts/ocr/raw/main/olmocr2-vllm.py \
67
+ davanstrien/encyclopaedia-britannica-1771 \
68
+ your-username/output-dataset
69
+
70
+ # Local with GPU
71
+ uv run https://huggingface.co/datasets/uv-scripts/ocr/raw/main/olmocr2-vllm.py \
72
+ davanstrien/encyclopaedia-britannica-1771 \
73
+ your-username/output-dataset
74
  ```
75
 
76
+ ## Citation
77
+
78
+ ```bibtex
79
+ @misc{olmocr,
80
+ title={{olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models}},
81
+ 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},
82
+ year={2025},
83
+ eprint={2502.18443},
84
+ archivePrefix={arXiv},
85
+ primaryClass={cs.CL},
86
+ url={https://arxiv.org/abs/2502.18443},
87
+ }
88
+ ```
89
+
90
+ ---
91
+ *Generated with [uv-scripts/ocr](https://huggingface.co/datasets/uv-scripts/ocr)*