Skip to main content

Document Parsing / OCR

Turn PDFs, scans and DOCX into Markdown an LLM can actually read — MinerU starts at 4GB of VRAM

Built by OpenDataLab at Shanghai AI Laboratory, 78k+ stars on GitHub. The pipeline backend runs in 4GB; hybrid-engine needs 8GB and pushes OmniDocBench v1.6 to 95.39. On NexGPU that starts at $0.188/GPU-hour.

MinerU handles the ugliest stage of any RAG pipeline: turning messy PDFs, scans, DOCX, PPTX and XLSX into Markdown and JSON with a sane reading order. It strips headers, footers, footnotes and page numbers, reassembles multi-column layouts the way a human eye would read them, converts formulas to LaTeX, tables to HTML, and pulls images out along with their captions. OCR covers 109 languages, so scanned and damaged PDFs are in scope too.

The current stable line is 3.4.5. Release 3.4 swapped the OCR model for PP-OCRv6, lifting OCR-related metrics on OmniDocBench v1.6 by roughly 11% and roughly doubling OCR throughput; 3.4.5 then fixed two long-standing traps — DOCX tables being silently dropped when a cell contained non-text special characters, and surrogate-pair restoration during PDF text extraction. The hybrid-engine introduced in 3.3 is now the default backend, with --effort medium and high tiers. 4.0.0a6 ships on GitHub as a pre-release while doclib is being rearchitected; keep it out of production.

MinerU's real appeal is how cheap SOTA turns out to be. The VLM weights, MinerU2.5-Pro-2605-1.2B, are just 1.2B parameters on a Qwen2-VL architecture in bf16 — yet they score 95.69 overall on OmniDocBench v1.6, with 93.62 Table TEDS and a 0.036 text edit distance, beating both specialised OCR models and far larger frontier VLMs. The published throughput baseline is 2.12 fps from vllm-async-engine on a single A100. Rent one A100 PCIE 80GB on NexGPU and a 100,000-page corpus comes in around $11.

01 —

Versions and backends: know which one you're actually running

MinerU is not a single model — it's one CLI over two inference routes. The VRAM differs by 2x and the score by nearly 9 points.

VersionParametersVRAMContextNotes
MinerU 3.4.5 (current stable)hybrid-engine is the default backendpipeline 4GB / hybrid and vlm 8GB / http-client 2GBPDF, DOCX, PPTX, XLSX, imagesOCR upgraded to PP-OCRv6: +11% on OmniDocBench v1.6 OCR metrics and roughly 2x OCR speed. Fixes DOCX tables silently dropped on special characters. This is what most people should install.
MinerU2.5-Pro-2605-1.2B (current VLM weights)1.2B, Qwen2-VL architecture, bf16 safetensorsweights fit in 8GB; plan for 16GB+ if you keep vLLM resident with KV cacheTwo stages: global layout analysis on a downsampled image, then fine-grained recognition on native-resolution crops95.69 overall on OmniDocBench v1.6, 93.62 Table TEDS, 0.036 text edit distance. Apache 2.0. Shipped with the hybrid and vlm backends since 3.3.
MinerU2.5-2509-1.2B (previous VLM weights)1.2Bbf16 ~8GBSame two-stage layout-then-crop inference85.61 overall on OmniDocBench. The widely quoted 2.12 fps vllm-async-engine figure on a single A100 comes from this generation. Note the licence: AGPL-3.0 here, versus Apache 2.0 on the Pro card — check which weights you actually pulled before shipping commercially.
pipeline backend (PP-DocLayoutV2 + MFD/MFR + PP-OCRv6 + TabCls/TabRec + OriCls + ReadingOrder)A chain of small models, not one large one4GB minimum; runs on pure CPU109-language OCR; the -l language flag only applies to this backend86.47 on OmniDocBench v1.6. Best compatibility, lowest VRAM, ideal for high-volume ordinary layouts — and the only backend that emits span.pdf for debugging.
hybrid-engine, --effort medium / highMixed scheduling of pipeline and VLM8GB minimumThe medium tier does not perform image content analysis95.26 at medium, 95.39 at high; pure vlm-engine sits at 95.30. Medium is usually enough — switch to high when you need figure captions and chart content understood.
MinerU 4.0.0a6 (pre-release)doclib rearchitecture in progressSame as the 3.4 lineGitHub Releases onlyInterfaces are still moving (model-download completion markers, doclib visual blocks exposed through locators). Spin up a separate per-second-billed box to try it; don't point production traffic at it.

02 —

Which GPU to rent for MinerU

MinerU requires Volta or newer. VRAM isn't the bottleneck — throughput is — so the selection logic is: enough memory, then the cheapest compute density you can get.

  • Bulk-converting ordinary-layout PDFs to Markdown with the pipeline backend (cheapest per page)

    RTX 3090 24GB$0.193/GPU-hr

    Pipeline only needs 4GB, and the 3090 is the cheapest Ampere card on our list — the remaining 20GB goes straight into concurrency and batch size, driving per-page cost through the floor.

  • Single-card online service running MinerU2.5-Pro-2605-1.2B via hybrid-engine or vlm-engine

    RTX 4090 24GB$0.540/GPU-hr

    8GB is the official floor, but under vLLM continuous batching a 1.2B VLM is really eating bandwidth and KV cache. Ada compute plus 24GB is the sweet spot for a single-card parsing service.

  • Matching the published 2.12 fps baseline for large-scale document ingestion

    A100 PCIE 80GB$0.824/GPU-hr

    The official vllm-async-engine throughput number was measured on exactly one A100, so you can copy the settings instead of re-tuning. 80GB lets you push gpu-memory-utilization high and run many streams at once.

  • Multi-GPU cluster behind mineru-router for million-page pipelines

    A100 SXM4 80GB$1.088/GPU-hr

    SXM4 interconnect suits many resident instances, and a single node takes up to 14 GPUs. Pair it with mineru-router --local-gpus auto and wall-clock time drops roughly linearly with card count.

03 —

Getting MinerU running on NexGPU

Boot to first Markdown is usually a matter of minutes — most of it is pulling weights, not building an environment.

  1. 01

    Launch a GPU instance and install MinerU

    At console.nexgpu.net pick a PyTorch or vLLM prebuilt image; CUDA drivers and CJK fonts are already configured across our 2,000+ images. Use Python 3.10-3.13 (Windows caps at 3.12 because of the Ray dependency). mineru[all] pulls dependencies for both routes at once; if you only need pipeline, mineru[pipeline] saves disk.

    pip install --upgrade pip uv && uv pip install -U "mineru[all]"
  2. 02

    Pull the weights and parse your first PDF

    Point the model source at ModelScope from mainland-China regions, or at local to reuse a directory you already have — the resolved path is written back into mineru.json in your home directory. Budget 20GB of SSD for weights plus dependencies. Beyond the .md you get content_list.json, content_list_v2.json, middle.json, model.json and layout.pdf; when reading order goes wrong, layout.pdf is where you look, and the pipeline backend adds span.pdf on top.

    export MINERU_MODEL_SOURCE=modelscope && mineru-models-download && mineru -p paper.pdf -o ./out -b hybrid-engine --effort high
  3. 03

    Expose it as a service: FastAPI, WebUI or an OpenAI-compatible endpoint

    mineru-api is the FastAPI service; --enable-vlm-preload true warms the VLM at startup so the first request doesn't time out. mineru-gradio gives you a browser UI. To let other agent frameworks call it over the OpenAI protocol, run mineru-openai-server and have thin clients connect with -b vlm-http-client — the client side needs just 2GB of VRAM and no local torch at all.

    mineru-api --host 0.0.0.0 --port 8000 --enable-vlm-preload true
  4. 04

    Scale out and cut wall-clock time

    A NexGPU node takes up to 14 GPUs. mineru-router with --local-gpus auto brings up every local GPU and distributes work across instances; --upstream-url aggregates mineru-api services across several machines behind one entry point. Stop the instance when the job finishes and compute billing stops immediately — keep the weights on disk at $0.414/GB-month or destroy the volume, your call.

    mineru-router --host 0.0.0.0 --port 8002 --local-gpus auto

What 100,000 pages actually costs

Work it out from the published baseline. MinerU2.5 hits 2.12 fps with vllm-async-engine on a single A100, i.e. 2.12 x 3600 = about 7,632 pages/hour. 100,000 / 7,632 = about 13.1 hours. NexGPU's A100 PCIE 80GB is $0.824/GPU-hr, so 13.1 x 0.824 = about $10.80. Storage at 40GB (20GB of weights plus 20GB of output) costs $0.414/GB-month, which prorates to roughly $0.30 over 13.1 hours; pulling 20GB of results back out at $0.0081/GB adds about $0.16. Total: roughly $11.30, or a shade over $0.0001 per page. If 13 hours is too long, scale sideways — four A100 SXM4 80GB cut wall-clock to about 3.3 hours for 4 x $1.088 x 3.3 = about $14.40, buying back ten hours for three dollars. And if your documents are well-behaved enough for the pipeline backend, an RTX 3090 24GB at $0.193/GPU-hr drops per-page cost another notch. Billing is metered per second and priced per hour, with no minimum, no setup fee and no quota request.

04 —

FAQ

How much VRAM does self-hosting MinerU actually need?

The official floors are explicit: 4GB for the pipeline backend, 8GB for hybrid-engine and vlm-engine, and 2GB for a thin http-client. You also want 16GB of system RAM minimum (32GB+ recommended), 20GB of disk on an SSD, and a Volta-or-newer GPU. In practice a single RTX 3090 24GB feeds even the heaviest hybrid-engine setup — and on NexGPU that's $0.193/GPU-hour, less than what many people pay in electricity for the card under their desk.

Can MinerU run on CPU only? Then why rent a GPU?

Yes — the pipeline backend explicitly supports pure CPU, while hybrid-engine and vlm-engine require a GPU. But CPU inference on complex layouts and scans is punishingly slow, and it caps you out of the 95-point quality tier. Do the math: a Tesla T4 16GB is $0.298/GPU-hr and an RTX 3090 24GB just $0.193/GPU-hr, billed per second and stopped the moment you're done. Grinding overnight on CPU to save that is a bad trade — on NexGPU you boot into a prebuilt image with CUDA already configured and start parsing.

Should I use the pipeline backend or the MinerU2.5 VLM backend?

Depends how hard your documents are. On OmniDocBench v1.6 pipeline scores 86.47, hybrid-engine 95.26 at medium and 95.39 at high, pure vlm-engine 95.30 — nearly nine points, concentrated in complex tables, long formulas, borderless tables and rotated tables. Clean digital reports and contracts: pipeline is faster and cheaper. Papers, financial filings, scanned yearbooks: go hybrid. Not sure? Run both — spin up a 3090 and a 4090 side by side on NexGPU, parse the same sample set, and the two-hour bake-off costs under $1.50.

MinerU won't install properly on Blackwell cards like the RTX 5090 — what now?

Known issue. On Volta / Turing / Ampere / Ada (V100, 20/30/40 series, T4) you install the CUDA-matched PyTorch build and you're done. RTX 50-series is Blackwell, and the official FAQ calls for the lmdeploy 0.11.1 + cu128 wheel matching your Python version — otherwise you silently fall back to CPU inference and everything crawls. NexGPU carries RTX 5090 32GB at $0.723/GPU-hr, plus a full rack of Ampere and Ada cards; if you'd rather not wrestle with Blackwell wheels, take an RTX 4090 24GB at $0.540/GPU-hr on a prebuilt PyTorch image and spend the saved hours parsing instead.

My output has blank or garbled CJK text, or it crashes with libGL.so.1 not found.

Two classic environment problems, both answered in the official FAQ. Disappearing text on Linux is almost always missing CJK fonts — install fonts-noto-core and fonts-noto-cjk, then run fc-cache -fv. On WSL2 / Ubuntu 22.04, ImportError: libGL.so.1 is fixed with apt-get install libgl1-mesa-glx. This is exactly why we suggest starting from a NexGPU prebuilt image: fonts, CUDA and drivers are already in place, so you boot into work rather than into environment repair.

Can I use MinerU commercially under its licence?

The project itself ships under the MinerU Open Source License, based on Apache 2.0 with additional conditions (earlier versions were AGPLv3; that changed). The weights are a separate question: MinerU2.5-Pro-2605-1.2B is Apache 2.0, while the previous MinerU2.5-2509-1.2B model card lists AGPL-3.0 — confirm which weights you're actually loading before you ship. The compliance call is yours; our job is to remove the infrastructure obstacle. NexGPU spans 51 countries and regions with 1,175 verified rentable nodes, so you can place the instance in a region that satisfies your data requirements.

Start building on NexGPU

Enterprise R&D team or solo developer — either way, your first job can be running in minutes.

Sign up to browse live network pricing. No payment method required.