davanstrien HF Staff commited on
Commit
7165fc4
Β·
1 Parent(s): a7e4157

Add NuMarkdown to README with HF Jobs example

Browse files
Files changed (1) hide show
  1. README.md +32 -0
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())") \