stckmn commited on
Commit
f101361
Β·
verified Β·
1 Parent(s): 60602fa

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +89 -29
README.md CHANGED
@@ -1,31 +1,91 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: page_num
7
- dtype: int64
8
- - name: source_file
9
- dtype: string
10
- - name: source_path
11
- dtype: string
12
- - name: total_pages
13
- dtype: int64
14
- - name: markdown
15
- dtype: string
16
- - name: markdown_metadata
17
- dtype: string
18
- - name: inference_info
19
- dtype: string
20
- splits:
21
- - name: train
22
- num_bytes: 235660575
23
- num_examples: 21
24
- download_size: 16690706
25
- dataset_size: 235660575
26
- configs:
27
- - config_name: default
28
- data_files:
29
- - split: train
30
- path: data/train-*
31
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
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 [stckmn/ocr-input-Directive017-1761355294](https://huggingface.co/datasets/stckmn/ocr-input-Directive017-1761355294) using olmOCR-2-7B.
14
+
15
+ ## Processing Details
16
+
17
+ - **Source Dataset**: [stckmn/ocr-input-Directive017-1761355294](https://huggingface.co/datasets/stckmn/ocr-input-Directive017-1761355294)
18
+ - **Model**: [allenai/olmOCR-2-7B-1025-FP8](https://huggingface.co/allenai/olmOCR-2-7B-1025-FP8)
19
+ - **Number of Samples**: 21
20
+ - **Processing Time**: 0h 1m 54s
21
+ - **Processing Date**: 2025-10-25 01:24 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
+ stckmn/ocr-input-Directive017-1761355294 \
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
+ stckmn/ocr-input-Directive017-1761355294 \
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)*