# Repository Briefing: opendatalab/MinerU
> Source: https://repoforai.com/repo/opendatalab/MinerU (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/opendatalab/MinerU
- **Official Docs / Website**: https://opendatalab.github.io/MinerU/
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: See repository
- **Engineering Health**: A (84/100 · Maintenance 35/35 · Adoption 23/25 · Releases 20/20 · License 6/20)
- **Latest Release**: mineru-4.3.0-released (2026-12-01) — https://github.com/opendatalab/MinerU/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, Local AI, CLI, GPU
- **Momentum**: 84,696 ★ total (+46 24h / +326 7d) · 6,989 forks
- **Topics**: `ai4science`, `document-analysis`, `docx`, `extract-data`, `layout-analysis`, `ocr`, `parser`, `pdf`, `pdf-converter`, `pdf-extractor-llm`, `pdf-extractor-pretrain`, `pdf-extractor-rag`
- **When to Use**: Best for: Teams that need local ingestion of scanned or layout-heavy documents, structured Markdown or JSON, and source citations for RAG or agents. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Execution paths: `mineru-kit parse` converts files statelessly; `mineru` and `DoclibClient` work with a persistent local document library.
- Source citations: `doc:` locators identify a document, tier, page, and optionally a block for follow-up reads.
- Adaptive parsing: 4.3 routes low-confidence native PDF pages to a layout model and increases rendering resolution for small pages.
- Structured extraction: Markdown and JSON outputs cover OCR, tables, and formulas; 4.3 improves table-cell line joining and native bold and italic preservation.
- Runtime sizing: Basic ONNX runs on CPU with a listed 2 GB RAM minimum; standard and advanced have CPU-capable ONNX and llama.cpp paths with an 8 GB minimum.
- Service recovery: Router supervises worker replacement after task timeouts; the standalone API relies on the deployer to replace the service.
```

## Quick Start / Clone
```bash
pip install uv
uv venv .mineru --python 3.12

# Linux/macOS
source .mineru/bin/activate
# Windows (PowerShell)
.\.mineru\Scripts\Activate.ps1
```
