Open-source document parsing tools for cleaner RAG pipelines

PatSnap has two tools it built for handling patent documents at large scale. Hiro-Smart-Doc is a FastAPI pipeline that takes PDFs, Office files, and images, finds the layout of each page, then outputs content in the right reading order as Markdown. It uses RT-DETR to detect 25 kinds of page regions, including layouts with multiple columns.

Tables are exported as HTML, formulas as LaTeX, and normal text as Markdown. The layer uses Hiro-MOSS-OCR, a 0.3B OCR model trained from the ground up on more than 50 million technical documents. The model scores 93.63 on v1.5 and is reported to process 58 queries per second on one RTX 4090 with vLLM.

Both tools are available under the .

Key points

  • The tools turn PDFs, Office files, and images into structured Markdown for RAG use.
  • Page regions are detected before text is read, which helps preserve the correct reading order.
  • Tables are kept as HTML, formulas as LaTeX, and normal text as Markdown.
  • Hiro-MOSS-OCR is a 0.3B OCR model trained on over 50 million technical documents.
  • The reported speed is 58 queries per second on a single RTX 4090 using vLLM.
Read original