davanstrien HF Staff commited on
Commit
ba04356
·
verified ·
1 Parent(s): 022297e

Sync from GitHub via hub-sync

Browse files
Files changed (5) hide show
  1. LANGUAGES.md +1 -1
  2. README.md +2 -2
  3. SERVING.md +1 -1
  4. dots-mocr.py +10 -10
  5. models.json +1 -1
LANGUAGES.md CHANGED
@@ -26,7 +26,7 @@ _Sorted by strength of evidence, then coverage:_
26
  | [LightOnOCR-2-1B](https://huggingface.co/lightonai/LightOnOCR-2-1B) | 11 (9 European + zh/ja) | Declared, not benchmarked. [v1](https://huggingface.co/lightonai/LightOnOCR-1B-1025) is explicitly European/Latin-script only (9) |
27
  | [GLM-OCR](https://huggingface.co/zai-org/GLM-OCR) | 8 (zh en fr es ru de ja ko) | Declared in card metadata only; no per-language evidence in the card body |
28
  | [HunyuanOCR-1.5](https://huggingface.co/tencent/HunyuanOCR) | "Multilingual" | Nothing enumerated, but explicitly targets **low-resource + ancient-script OCR** as a design goal (new in 1.5; the pinned 1.0 revision doesn't claim this) |
29
- | [dots.mocr](https://huggingface.co/rednote-hilab/dots.mocr) · [DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR) / [-2](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) · [Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) · [NuExtract3](https://huggingface.co/numind/NuExtract3) | "Multilingual", unspecified | A tag or one-liner only — no count, list, or benchmark |
30
  | [olmOCR-2](https://huggingface.co/allenai/olmOCR-2-7B-1025-FP8) · [Nanonets-OCR-s](https://huggingface.co/nanonets/Nanonets-OCR-s) · [SmolDocling](https://huggingface.co/ds4sd/SmolDocling-256M-preview) · [LFM2.5-VL-Extract](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B-Extract) | English only | Stated on the card |
31
  | [Falcon-OCR](https://huggingface.co/tiiuae/Falcon-OCR) · [OvisOCR2](https://huggingface.co/ATH-MaaS/OvisOCR2) · [Xiaomi-OCR-0](https://huggingface.co/xiaomi-research/Xiaomi-OCR-0) · [LightOnOCR-3](https://huggingface.co/collections/lightonai/lightonocr-3) · [FireRed-OCR](https://huggingface.co/FireRedTeam/FireRed-OCR) · [ABot-OCR](https://huggingface.co/acvlab/ABot-OCR) · [RolmOCR](https://huggingface.co/reducto/RolmOCR) · [NuMarkdown-8B](https://huggingface.co/numind/NuMarkdown-8B-Thinking) · [lift](https://huggingface.co/datalab-to/lift) | Not stated | No language information on the card at all |
32
 
 
26
  | [LightOnOCR-2-1B](https://huggingface.co/lightonai/LightOnOCR-2-1B) | 11 (9 European + zh/ja) | Declared, not benchmarked. [v1](https://huggingface.co/lightonai/LightOnOCR-1B-1025) is explicitly European/Latin-script only (9) |
27
  | [GLM-OCR](https://huggingface.co/zai-org/GLM-OCR) | 8 (zh en fr es ru de ja ko) | Declared in card metadata only; no per-language evidence in the card body |
28
  | [HunyuanOCR-1.5](https://huggingface.co/tencent/HunyuanOCR) | "Multilingual" | Nothing enumerated, but explicitly targets **low-resource + ancient-script OCR** as a design goal (new in 1.5; the pinned 1.0 revision doesn't claim this) |
29
+ | [dots.mocr](https://huggingface.co/dots-studio/dots.mocr) · [DeepSeek-OCR](https://huggingface.co/deepseek-ai/DeepSeek-OCR) / [-2](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) · [Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) · [NuExtract3](https://huggingface.co/numind/NuExtract3) | "Multilingual", unspecified | A tag or one-liner only — no count, list, or benchmark |
30
  | [olmOCR-2](https://huggingface.co/allenai/olmOCR-2-7B-1025-FP8) · [Nanonets-OCR-s](https://huggingface.co/nanonets/Nanonets-OCR-s) · [SmolDocling](https://huggingface.co/ds4sd/SmolDocling-256M-preview) · [LFM2.5-VL-Extract](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B-Extract) | English only | Stated on the card |
31
  | [Falcon-OCR](https://huggingface.co/tiiuae/Falcon-OCR) · [OvisOCR2](https://huggingface.co/ATH-MaaS/OvisOCR2) · [Xiaomi-OCR-0](https://huggingface.co/xiaomi-research/Xiaomi-OCR-0) · [LightOnOCR-3](https://huggingface.co/collections/lightonai/lightonocr-3) · [FireRed-OCR](https://huggingface.co/FireRedTeam/FireRed-OCR) · [ABot-OCR](https://huggingface.co/acvlab/ABot-OCR) · [RolmOCR](https://huggingface.co/reducto/RolmOCR) · [NuMarkdown-8B](https://huggingface.co/numind/NuMarkdown-8B-Thinking) · [lift](https://huggingface.co/datalab-to/lift) | Not stated | No language information on the card at all |
32
 
README.md CHANGED
@@ -92,7 +92,7 @@ These are the maintained recipes. Each one has a tested `[tool.hf-jobs]` header,
92
  | [`hunyuan-ocr-1.5.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/hunyuan-ocr-1.5.py) | [HunyuanOCR-1.5](https://huggingface.co/tencent/HunyuanOCR) | 1B | 12 task types, including spotting, charts and translation | [Hunyuan Community](https://huggingface.co/tencent/HunyuanOCR/blob/main/LICENSE) (excludes EU, UK, South Korea) | `a10g-small` |
93
  | [`minicpm-ocr.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/minicpm-ocr.py) | [MiniCPM-OCR 1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) | 1.3B | OpenBMB's full pipeline: layout regions, per-region prompts, Markdown with HTML tables; Hub dataset or Bucket in/out; runs on a public [`cr.hf.co`](https://huggingface.co/containers/davanstrien/minicpm-ocr) image (experimental) | Apache-2.0 | `a10g-large` |
94
  | [`dots-ocr.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/dots-ocr.py) | [dots.ocr](https://huggingface.co/rednote-hilab/dots.ocr) | 1.7B | 100+ languages; layout modes | MIT | `a10g-small` |
95
- | [`dots-mocr.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/dots-mocr.py) | [dots.mocr](https://huggingface.co/rednote-hilab/dots.mocr) | 3B | Eight prompt modes, including SVG from charts | MIT | `a10g-small` |
96
  | [`deepseek-ocr2-vllm.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/deepseek-ocr2-vllm.py) | [DeepSeek-OCR-2](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) | 3B | Newer DeepSeek-OCR | Apache-2.0 | `a10g-small` |
97
  | [`unlimited-ocr2.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/unlimited-ocr2.py) | [Unlimited-OCR-2](https://huggingface.co/baidu/Unlimited-OCR-2) | 3.3B | Whole documents: 16 pages per request, paragraphs continue across page breaks; reads page folders or Buckets; resumable | MIT | `rtx-pro-6000` |
98
  | [`unlimited-ocr-vllm.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/unlimited-ocr-vllm.py) | [Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) | 3.3B | Markdown with layout boxes (`--strip-grounding` for clean text) | MIT | `a10g-small` |
@@ -176,7 +176,7 @@ Most dataset recipes also record the model and settings in an `inference_info` c
176
  | `lighton-ocr3.py` | `--model lightonai/LightOnOCR-3-4B\|lightonai/LightOnOCR-3-0.8B`, `--mode plain\|grounding`, `--blocks-column`, `--longest-edge` |
177
  | `hunyuan-ocr-1.5.py` | `--task-type` (12 types, default `doc_parse`), `--custom-prompt` |
178
  | `dots-ocr.py` | `--prompt-mode ocr\|layout-all\|layout-only` |
179
- | `dots-mocr.py` | `--prompt-mode` (8 modes). For SVG: `--model rednote-hilab/dots.mocr-svg --prompt-mode svg` |
180
  | `deepseek-ocr-vllm.py` | `--prompt-mode document\|image\|free\|figure\|describe` |
181
  | `deepseek-ocr2-vllm.py` | `--prompt-mode document\|free` |
182
  | `unlimited-ocr-vllm.py` | `--strip-grounding`, `--grounding-column` |
 
92
  | [`hunyuan-ocr-1.5.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/hunyuan-ocr-1.5.py) | [HunyuanOCR-1.5](https://huggingface.co/tencent/HunyuanOCR) | 1B | 12 task types, including spotting, charts and translation | [Hunyuan Community](https://huggingface.co/tencent/HunyuanOCR/blob/main/LICENSE) (excludes EU, UK, South Korea) | `a10g-small` |
93
  | [`minicpm-ocr.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/minicpm-ocr.py) | [MiniCPM-OCR 1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) | 1.3B | OpenBMB's full pipeline: layout regions, per-region prompts, Markdown with HTML tables; Hub dataset or Bucket in/out; runs on a public [`cr.hf.co`](https://huggingface.co/containers/davanstrien/minicpm-ocr) image (experimental) | Apache-2.0 | `a10g-large` |
94
  | [`dots-ocr.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/dots-ocr.py) | [dots.ocr](https://huggingface.co/rednote-hilab/dots.ocr) | 1.7B | 100+ languages; layout modes | MIT | `a10g-small` |
95
+ | [`dots-mocr.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/dots-mocr.py) | [dots.mocr](https://huggingface.co/dots-studio/dots.mocr) | 3B | Eight prompt modes, including SVG from charts | MIT | `a10g-small` |
96
  | [`deepseek-ocr2-vllm.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/deepseek-ocr2-vllm.py) | [DeepSeek-OCR-2](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) | 3B | Newer DeepSeek-OCR | Apache-2.0 | `a10g-small` |
97
  | [`unlimited-ocr2.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/unlimited-ocr2.py) | [Unlimited-OCR-2](https://huggingface.co/baidu/Unlimited-OCR-2) | 3.3B | Whole documents: 16 pages per request, paragraphs continue across page breaks; reads page folders or Buckets; resumable | MIT | `rtx-pro-6000` |
98
  | [`unlimited-ocr-vllm.py`](https://huggingface.co/datasets/uv-scripts/ocr/blob/main/unlimited-ocr-vllm.py) | [Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) | 3.3B | Markdown with layout boxes (`--strip-grounding` for clean text) | MIT | `a10g-small` |
 
176
  | `lighton-ocr3.py` | `--model lightonai/LightOnOCR-3-4B\|lightonai/LightOnOCR-3-0.8B`, `--mode plain\|grounding`, `--blocks-column`, `--longest-edge` |
177
  | `hunyuan-ocr-1.5.py` | `--task-type` (12 types, default `doc_parse`), `--custom-prompt` |
178
  | `dots-ocr.py` | `--prompt-mode ocr\|layout-all\|layout-only` |
179
+ | `dots-mocr.py` | `--prompt-mode` (8 modes). For SVG: `--model dots-studio/dots.mocr-svg --prompt-mode svg` |
180
  | `deepseek-ocr-vllm.py` | `--prompt-mode document\|image\|free\|figure\|describe` |
181
  | `deepseek-ocr2-vllm.py` | `--prompt-mode document\|free` |
182
  | `unlimited-ocr-vllm.py` | `--strip-grounding`, `--grounding-column` |
SERVING.md CHANGED
@@ -87,7 +87,7 @@ card/docs (verbatim commands live in the linked sources):
87
  |---|---|---|
88
  | lightonai/LightOnOCR-1B / 2-1B | ✅ vLLM | Card ships the serve command + client; ≥0.11.1 for v1; images longest-dim 1540px |
89
  | nanonets/OCR-s / OCR2-3B | ✅ vLLM | Bare `vllm serve` + client in card; **pin v0.10.2 for OCR2** (see above) |
90
- | rednote-hilab/dots.mocr | ✅ vLLM ≥0.11 | Direct from Hub id on `vllm/vllm-openai:v0.11.0`+ |
91
  | rednote-hilab/dots.ocr | ✅ (GitHub) | HF card shows a legacy pre-0.11 hack; GitHub README: integrated upstream since 0.11 |
92
  | tencent/HunyuanOCR | ✅ vLLM 0.18.1 | serve.sh in repo; nightly adds DFlash speculative decoding |
93
  | zai-org/GLM-OCR | ✅ vLLM + SGLang + Ollama | Only card here with an SGLang serve example; needs vLLM nightly |
 
87
  |---|---|---|
88
  | lightonai/LightOnOCR-1B / 2-1B | ✅ vLLM | Card ships the serve command + client; ≥0.11.1 for v1; images longest-dim 1540px |
89
  | nanonets/OCR-s / OCR2-3B | ✅ vLLM | Bare `vllm serve` + client in card; **pin v0.10.2 for OCR2** (see above) |
90
+ | dots-studio/dots.mocr | ✅ vLLM ≥0.11 | Direct from Hub id on `vllm/vllm-openai:v0.11.0`+ |
91
  | rednote-hilab/dots.ocr | ✅ (GitHub) | HF card shows a legacy pre-0.11 hack; GitHub README: integrated upstream since 0.11 |
92
  | tencent/HunyuanOCR | ✅ vLLM 0.18.1 | serve.sh in repo; nightly adds DFlash speculative decoding |
93
  | zai-org/GLM-OCR | ✅ vLLM + SGLang + Ollama | Only card here with an SGLang serve example; needs vLLM nightly |
dots-mocr.py CHANGED
@@ -33,10 +33,10 @@ Features:
33
  - Layout-aware text extraction
34
  - Web screen parsing
35
  - Scene text spotting
36
- - SVG code generation (use --prompt-mode svg, or --model rednote-hilab/dots.mocr-svg for best results)
37
 
38
- Model: rednote-hilab/dots.mocr
39
- SVG variant: rednote-hilab/dots.mocr-svg
40
  vLLM: Officially integrated since v0.11.0
41
  GitHub: https://github.com/rednote-hilab/dots.mocr
42
  Paper: https://arxiv.org/abs/2603.13032
@@ -114,7 +114,7 @@ PROMPT_TEMPLATES = {
114
  "scene-spotting": """Detect and recognize the text in the image.""",
115
  "grounding-ocr": """Extract text from the given bounding box on the image (format: [x1, y1, x2, y2]).\nBounding Box:\n""",
116
  # SVG code generation — {width} and {height} are replaced with actual image dimensions.
117
- # For best results, use --model rednote-hilab/dots.mocr-svg
118
  # Uses higher temperature (0.9) and top_p (1.0) per official recommendation.
119
  "svg": """Please generate the SVG code based on the image. viewBox="0 0 {width} {height}" """,
120
  "general": """ """,
@@ -306,7 +306,7 @@ def main(
306
  output_dataset: str,
307
  image_column: str = "image",
308
  batch_size: int = 16,
309
- model: str = "rednote-hilab/dots.mocr",
310
  max_model_len: int = 24000,
311
  max_tokens: int = 24000,
312
  gpu_memory_utilization: float = 0.9,
@@ -581,7 +581,7 @@ if __name__ == "__main__":
581
  print(" uv run --with vllm==0.30.0 dots-mocr.py input-dataset output-dataset")
582
  print("\n2. SVG generation:")
583
  print(
584
- " uv run --with vllm==0.30.0 dots-mocr.py charts svg-output --prompt-mode svg --model rednote-hilab/dots.mocr-svg"
585
  )
586
  print("\n3. Web screen parsing:")
587
  print(" uv run --with vllm==0.30.0 dots-mocr.py screenshots parsed --prompt-mode web-parsing")
@@ -614,7 +614,7 @@ Prompt Modes (official dots.mocr prompts):
614
 
615
  SVG Code Generation:
616
  Use --prompt-mode svg for SVG output. For best results, combine with
617
- --model rednote-hilab/dots.mocr-svg (the SVG-optimized variant).
618
  SVG mode automatically uses temperature=0.9, top_p=1.0 unless overridden.
619
 
620
  Examples:
@@ -622,7 +622,7 @@ Examples:
622
  uv run --with vllm==0.30.0 dots-mocr.py my-docs analyzed-docs
623
 
624
  # SVG generation with optimized variant
625
- uv run --with vllm==0.30.0 dots-mocr.py charts svg-out --prompt-mode svg --model rednote-hilab/dots.mocr-svg
626
 
627
  # Web screen parsing
628
  uv run --with vllm==0.30.0 dots-mocr.py screenshots parsed --prompt-mode web-parsing
@@ -650,8 +650,8 @@ Examples:
650
  )
651
  parser.add_argument(
652
  "--model",
653
- default="rednote-hilab/dots.mocr",
654
- help="Model to use (default: rednote-hilab/dots.mocr, or rednote-hilab/dots.mocr-svg for SVG)",
655
  )
656
  parser.add_argument(
657
  "--max-model-len",
 
33
  - Layout-aware text extraction
34
  - Web screen parsing
35
  - Scene text spotting
36
+ - SVG code generation (use --prompt-mode svg, or --model dots-studio/dots.mocr-svg for best results)
37
 
38
+ Model: dots-studio/dots.mocr
39
+ SVG variant: dots-studio/dots.mocr-svg
40
  vLLM: Officially integrated since v0.11.0
41
  GitHub: https://github.com/rednote-hilab/dots.mocr
42
  Paper: https://arxiv.org/abs/2603.13032
 
114
  "scene-spotting": """Detect and recognize the text in the image.""",
115
  "grounding-ocr": """Extract text from the given bounding box on the image (format: [x1, y1, x2, y2]).\nBounding Box:\n""",
116
  # SVG code generation — {width} and {height} are replaced with actual image dimensions.
117
+ # For best results, use --model dots-studio/dots.mocr-svg
118
  # Uses higher temperature (0.9) and top_p (1.0) per official recommendation.
119
  "svg": """Please generate the SVG code based on the image. viewBox="0 0 {width} {height}" """,
120
  "general": """ """,
 
306
  output_dataset: str,
307
  image_column: str = "image",
308
  batch_size: int = 16,
309
+ model: str = "dots-studio/dots.mocr",
310
  max_model_len: int = 24000,
311
  max_tokens: int = 24000,
312
  gpu_memory_utilization: float = 0.9,
 
581
  print(" uv run --with vllm==0.30.0 dots-mocr.py input-dataset output-dataset")
582
  print("\n2. SVG generation:")
583
  print(
584
+ " uv run --with vllm==0.30.0 dots-mocr.py charts svg-output --prompt-mode svg --model dots-studio/dots.mocr-svg"
585
  )
586
  print("\n3. Web screen parsing:")
587
  print(" uv run --with vllm==0.30.0 dots-mocr.py screenshots parsed --prompt-mode web-parsing")
 
614
 
615
  SVG Code Generation:
616
  Use --prompt-mode svg for SVG output. For best results, combine with
617
+ --model dots-studio/dots.mocr-svg (the SVG-optimized variant).
618
  SVG mode automatically uses temperature=0.9, top_p=1.0 unless overridden.
619
 
620
  Examples:
 
622
  uv run --with vllm==0.30.0 dots-mocr.py my-docs analyzed-docs
623
 
624
  # SVG generation with optimized variant
625
+ uv run --with vllm==0.30.0 dots-mocr.py charts svg-out --prompt-mode svg --model dots-studio/dots.mocr-svg
626
 
627
  # Web screen parsing
628
  uv run --with vllm==0.30.0 dots-mocr.py screenshots parsed --prompt-mode web-parsing
 
650
  )
651
  parser.add_argument(
652
  "--model",
653
+ default="dots-studio/dots.mocr",
654
+ help="Model to use (default: dots-studio/dots.mocr, or dots-studio/dots.mocr-svg for SVG)",
655
  )
656
  parser.add_argument(
657
  "--max-model-len",
models.json CHANGED
@@ -582,7 +582,7 @@
582
  "support_note": "Nanonets-OCR-s; use nanonets-ocr2.py."
583
  },
584
  "dots-mocr.py": {
585
- "model_id": "rednote-hilab/dots.mocr",
586
  "params": "3B",
587
  "backend": "vllm",
588
  "task": "ocr | 8 prompt modes incl. SVG, layout + bbox",
 
582
  "support_note": "Nanonets-OCR-s; use nanonets-ocr2.py."
583
  },
584
  "dots-mocr.py": {
585
+ "model_id": "dots-studio/dots.mocr",
586
  "params": "3B",
587
  "backend": "vllm",
588
  "task": "ocr | 8 prompt modes incl. SVG, layout + bbox",