Xiaohongshu's dots.ocr Beats Gemini 2.5 Pro on Documents With a Tiny 1.7B Model
A 1.7B vision-language model from Xiaohongshu's hi lab collapses document parsing pipelines into a single prompt-driven model with SOTA benchmarks.
ProTakeaways
- dots.ocr is a 1.7B VLM that unifies layout detection, OCR, tables and formulas in one model.
- SOTA on OmniDocBench overall edit distance (0.125 EN, 0.160 ZH), beating Gemini 2.5 Pro and doubao-1.5.
- Leads olmOCR-bench at 79.1 and dots.ocr-bench across 100 languages with 0.177 overall edit.
- Task switching is prompt-based: parse-all, detection-only, plain OCR, or grounded OCR by bbox.
- MIT license, runs on vLLM 0.11+, SGLang, Transformers, and Docker.
- Limits: struggles on dense tables/formulas, embedded pictures unparsed, not tuned for high-throughput PDF batches.
Document parsing has long been a duct-taped affair: one model for layout detection, another for text recognition, a third for tables, plus post-processing to stitch reading order back together. dots.ocr, released by Xiaohongshu's hi lab team, replaces that pipeline with a single vision-language model small enough to run on one GPU.
The multilingual parser rides on a 1.7B-parameter language decoder and has quickly become one of the most-downloaded OCR models on Hugging Face, with over 260,000 pulls. The pitch is simple: point it at a PDF page, change the prompt, and get back layout boxes, Markdown text, LaTeX formulas, HTML tables, or grounded OCR from a specific region.
One model, one prompt, four jobs
Traditional document pipelines chain detection CNNs, table transformers, formula models, and reading-order heuristics, each with its own failure modes and error propagation. dots.ocr collapses those stages into a single vision-language model, switching between tasks through prompt changes alone. The GitHub repo exposes a handful of preset modes:
prompt_layout_all_enfor full parse with bounding boxes plus textprompt_layout_only_enfor detection only, no OCRprompt_ocrfor plain text extractionprompt_grounding_ocrfor OCR inside a caller-supplied bbox
Output comes back as a single JSON object where each element carries a bbox in [x1, y1, x2, y2] form, a category from an eleven-class taxonomy (Caption, Footnote, Formula, List-item, Page-footer, Page-header, Picture, Section-header, Table, Text, Title), and its content. Formulas come out as LaTeX, tables as HTML, everything else as Markdown, and elements arrive sorted in human reading order.
Benchmarks against the frontier
On OmniDocBench, the standard end-to-end document parsing benchmark, dots.ocr posts the best overall edit distance in both English (0.125) and Chinese (0.160), edging out doubao-1.5-thinking-vision-pro and Gemini 2.5 Pro despite being a fraction of their size. Its TableTEDS score of 88.6 on English tables leads the field, and reading order edit distance of 0.040 EN / 0.067 ZH is the tightest of any model tested.

The multilingual gap is the most striking result. On the in-house dots.ocr-bench covering 1,493 PDF images across 100 languages, dots.ocr scores 0.177 overall edit distance versus 0.251 for Gemini 2.5 Pro and 0.291 for doubao-1.5. On olmOCR-bench it lands at 79.1 overall, ahead of MonkeyOCR-pro-3B and olmOCR v0.1.75. Layout detection holds up too: dots.ocr-detection posts F1@IoU=.50:.05:.95 of 0.845, beating the specialist DocLayout-YOLO at 0.733.
Architecture choices worth noting
The design bet is that a compact 1.7B decoder can subsume work that used to require detection CNNs, table transformers, and formula models stitched together. The authors train layout detection, text recognition, and relational understanding jointly, arguing that fragmented multi-stage pipelines suffer from error propagation and miss the synergies of shared representations.
The upshot for deployment: fewer moving parts and no reading-order heuristics to maintain. The team credits Qwen2.5-VL and Apple's aimv2 vision encoder as foundations, plus MonkeyOCR for the evaluation methodology.
Deployment
The model ships with an MIT license and runs on vLLM, SGLang, Transformers, or Docker Model Runner. Since vLLM 0.11.0, dots.ocr has been officially integrated with verified performance, so the stock vllm/vllm-openai:v0.11.0 Docker image works for serving.
A minimal vLLM launch looks like this:
vllm serve rednote-hilab/dots.ocr \
--trust-remote-code \
--async-scheduling \
--gpu-memory-utilization 0.95
From there, a single Python call parses an image or a multi-page PDF, with a --num_threads flag for parallelism on longer documents. Outputs land as a structured JSON file, a Markdown rendering, an optional header/footer-stripped Markdown for benchmark compatibility, and a visualization image with the detected boxes overlaid.
Where it still struggles
The model card is refreshingly candid about failure modes:
- High-complexity tables and dense formulas are still imperfect, and pictures embedded in documents are not parsed at all yet.
- The model performs optimally on images under 11,289,600 pixels, so very high-DPI scans need downsampling.
- Continuous special characters such as ellipses and underscores can send the decoder into infinite repetition. Falling back to
prompt_layout_only_en,prompt_ocr, orprompt_grounding_ocrtends to break the loop. - Despite the small parameter count, throughput on large PDF batches is not yet optimized.
Why it matters
For teams building RAG pipelines, document-intelligence products, or training-data extractors, the interesting shift is that a 1.7B open-weights model now competes with closed frontier VLMs on the kind of messy multilingual PDFs that break most extractors. Running locally means no per-page API costs and no data leaving the network, and swapping tasks by prompt lets the model slot into existing pipelines without maintaining separate detection, table, and OCR services.
The team is already pointing toward a broader roadmap: parsing pictures embedded in documents, a general-purpose perception VLM that folds captioning and general detection into the same framework, and better throughput for large PDF workloads. If that direction pans out, the multi-model document parsing stack may collapse into a single prompt.