Commit
Β·
7165fc4
1
Parent(s):
a7e4157
Add NuMarkdown to README with HF Jobs example
Browse files
README.md
CHANGED
@@ -50,6 +50,27 @@ State-of-the-art document OCR using [nanonets/Nanonets-OCR-s](https://huggingfac
|
|
50 |
- πΌοΈ **Images** - Captions and descriptions included
|
51 |
- βοΈ **Forms** - Checkboxes rendered as β/β
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
## π New Features
|
55 |
|
@@ -113,6 +134,17 @@ hf jobs uv run \
|
|
113 |
--max-model-len 16384 \
|
114 |
--batch-size 128
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
# Private dataset with custom settings
|
117 |
hf jobs uv run --flavor l40sx1 \
|
118 |
-s HF_TOKEN=$(python3 -c "from huggingface_hub import get_token; print(get_token())") \
|
|
|
50 |
- πΌοΈ **Images** - Captions and descriptions included
|
51 |
- βοΈ **Forms** - Checkboxes rendered as β/β
|
52 |
|
53 |
+
### SmolDocling (`smoldocling-ocr.py`)
|
54 |
+
|
55 |
+
Ultra-compact document understanding using [ds4sd/SmolDocling-256M-preview](https://huggingface.co/ds4sd/SmolDocling-256M-preview) with only 256M parameters:
|
56 |
+
|
57 |
+
- π·οΈ **DocTags format** - Efficient XML-like representation
|
58 |
+
- π» **Code blocks** - Preserves indentation and syntax
|
59 |
+
- π’ **Formulas** - Mathematical expressions with layout
|
60 |
+
- π **Tables & charts** - Structured data extraction
|
61 |
+
- π **Layout preservation** - Bounding boxes and spatial info
|
62 |
+
- β‘ **Ultra-fast** - Tiny model size for quick inference
|
63 |
+
|
64 |
+
### NuMarkdown (`numarkdown-ocr.py`)
|
65 |
+
|
66 |
+
Advanced reasoning-based OCR using [numind/NuMarkdown-8B-Thinking](https://huggingface.co/numind/NuMarkdown-8B-Thinking) that analyzes documents before converting to markdown:
|
67 |
+
|
68 |
+
- π§ **Reasoning Process** - Thinks through document layout before generation
|
69 |
+
- π **Complex Tables** - Superior table extraction and formatting
|
70 |
+
- π **Mathematical Formulas** - Accurate LaTeX/math notation preservation
|
71 |
+
- π **Multi-column Layouts** - Handles complex document structures
|
72 |
+
- β¨ **Thinking Traces** - Optional inclusion of reasoning process with `--include-thinking`
|
73 |
+
|
74 |
|
75 |
## π New Features
|
76 |
|
|
|
134 |
--max-model-len 16384 \
|
135 |
--batch-size 128
|
136 |
|
137 |
+
# NuMarkdown with reasoning traces for complex documents
|
138 |
+
hf jobs uv run \
|
139 |
+
--image vllm/vllm-openai:latest \
|
140 |
+
--flavor l4x4 \
|
141 |
+
-s HF_TOKEN=$(python3 -c "from huggingface_hub import get_token; print(get_token())") \
|
142 |
+
https://huggingface.co/datasets/uv-scripts/ocr/raw/main/numarkdown-ocr.py \
|
143 |
+
your-input-dataset your-output-dataset \
|
144 |
+
--max-samples 50 \
|
145 |
+
--include-thinking \
|
146 |
+
--shuffle
|
147 |
+
|
148 |
# Private dataset with custom settings
|
149 |
hf jobs uv run --flavor l40sx1 \
|
150 |
-s HF_TOKEN=$(python3 -c "from huggingface_hub import get_token; print(get_token())") \
|