opendatalab/MinerU
Local document parser and library for structured RAG ingestion and page-level citations
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
MinerU is a Python document parser with two execution paths. mineru-kit parse performs stateless file conversion, while mineru and DoclibClient use a persistent local document library. In the SDK flow, ensure_parse submits work asynchronously, get_parse reports task status, and read_content retrieves material by locator. The library also supports search, watched folders, and result invalidation.
The base runtime includes ONNX and llama.cpp. The torch extra adds PyTorch, and full offers additional engine choices including vLLM, LMDeploy, and MLX, depending on the platform. This is a document ingestion and reading layer, not a vector database or RAG framework: feed its Markdown or JSON to downstream systems and keep its locators to connect extracted content back to the source.
Key Capabilities & Differentiators
MinerU extracts text, tables, and formulas from documents with complex layouts and applies OCR to scans. It supports all four quality tiers (flash, basic, standard, and advanced) for PDFs and images. Office formats, OpenDocument, HTML/MHTML, CSV/TSV, EPUB, and OFD use local flash parsing. EPUB follows OPF spine order and preserves internal links; plain-text formats are read directly rather than parsed.
In 4.3, native PDF flash parsing uses a per-page pseudo-confidence score to decide when to fall back to a layout model. About 7% of pages took that path in the reported sample; this is not a general throughput estimate. The release also increases rendering resolution for small PDF pages and improves table structure and recovery of wrapped cell text while preserving native bold and italic styling.
Trade-offs & Limitations
Compared with a plain PDF text extractor, MinerU adds OCR, layout-aware extraction, and source locators, but also brings model provisioning and more runtime choices. Compared with a hosted parsing service, the local path keeps processing on infrastructure you control, while leaving capacity planning, upgrades, and recovery to your team. Even flash can invoke a layout model in 4.3, so benchmark representative documents rather than treating it as a fixed-cost text extraction path.
Choose the CLI deliberately: the document-library parse defaults to the first 10 PDF pages and exposes continuation locators, whereas stateless mineru-kit parse defaults to the whole file. That distinction matters for both bounded agent reads and complete batch exports. Higher tiers add model and memory overhead, and they are not available for Office input. Review LICENSE.md before commercial deployment or redistribution; the package declares a project-specific license reference, not a standard SPDX license identifier.
Hardware & Deployment Guide
MinerU requires Python 3.11 through 3.14 and supports CPU inference on Windows, Linux, and macOS. Download and verify models for the chosen basic or standard startup tier before enabling the managed local parse server, then check readiness with mineru server status --json. A Docker directory is present, but current non-NVIDIA Docker guidance is pending an update. On Windows, CUDA acceleration through PyTorch extras requires CUDA and a CUDA-enabled PyTorch build. The optional remote API is a separate path; validate model availability and backend startup before relying on disconnected operation.
Release 4.2.2 expanded health checks and fault propagation for local VLM engines. Release 4.2.3 added --task-timeout, which defaults to 3,600 seconds and runs from slot acquisition through artifact packaging; it does not bound queue time. Router supervises timed-out worker and model subprocess cleanup and restarts service. A standalone API instead stops accepting new work and expects the deployment to replace it. Release 4.3 added WebUI startup concurrency configuration and bidirectional source/result scrolling.
mineru-kit parse converts files statelessly; mineru and DoclibClient work with a persistent local document library.doc: locators identify a document, tier, page, and optionally a block for follow-up reads.Teams that need local ingestion of scanned or layout-heavy documents, structured Markdown or JSON, and source citations for RAG or agents.
You only need text from clean PDFs, want a turnkey vector database or chat-with-docs product, or cannot operate and validate local model runtimes.
Quick Start & Installation
pip install uv uv venv .mineru --python 3.12 # Linux/macOS source .mineru/bin/activate # Windows (PowerShell) .\.mineru\Scripts\Activate.ps1
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| MinerU ★ | 84.7k | +326 | Python | — | Local document parser and library for structured RAG ingestion and page-level ci |
| marker | 41.2k | +103 | Python | Apache-2.0 | Hybrid OCR and layout parsing for document ingestion in RAG pipelines |
| docling | 71.4k | +285 | Python | MIT | Local-first document parser for structure-aware RAG ingestion |
| PyMuPDF | 11.2k | +38 | Python | AGPL-3.0 | MuPDF-backed Python engine for layout-aware document ingestion and page groundin |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/opendatalab/MinerU.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about MinerU
How should I integrate MinerU into an existing RAG pipeline?
mineru-kit parse for stateless conversion or DoclibClient for a persistent local library. With the local server running, call ensure_parse, poll the returned task IDs with get_parse, then use read_content with a page or block locator. Retain those locators alongside downstream chunks so retrieved passages can be traced back to the source. Add embeddings and vector retrieval separately if needed.Do I need a GPU, and how much memory should I budget?
Can I self-host MinerU for commercial use?
LicenseRef-MinerU-Open-Source-License and ships LICENSE.md. The identifier alone does not establish what commercial deployment or redistribution is permitted. Review the license text and applicable dependency and model terms for your specific use. For data residency, check that processing stays on the local path and does not use the optional remote API.When is MinerU a better choice than a plain PDF text extractor?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy