Hybrid Backend Effort Levels#
MinerU's hybrid backend exposes two parsing effort levels — medium and high — that trade inference speed for extraction accuracy. The valid values are defined as HYBRID_ANALYZE_EFFORTS = {"medium", "high"} , with medium as the default .
What Each Level Does#
The effort level controls which VLM extraction path is invoked per page window :
| Level | VLM call | Image analysis | Notes |
|---|---|---|---|
medium | batch_extract_with_layout — VLM receives pre-computed pipeline layout as external hints, skipping its own layout step | Forced off | Faster; weaker generalization on non-standard layouts |
high | batch_two_step_extract — VLM performs its own full layout + content extraction in two passes | Respects image_analysis flag | Slower; better accuracy on complex/engineering documents |
Medium effort feeds pipeline layout detections into the VLM via _build_medium_vlm_layout_blocks, bypassing the VLM's independent layout analysis. Image and chart analysis is unconditionally disabled at medium effort by _resolve_effective_image_analysis, which substantially reduces peak memory for image-heavy documents .
High effort calls batch_two_step_extract (or the async variant aio_batch_two_step_extract), letting the VLM run its own full two-step layout + extraction pass without layout pre-seeding.
Both paths share the same post-processing: OCR det sidecars, inline formula merging, and title splitting via _apply_layout_title_split .
Accuracy Comparison#
| Backend | Relative accuracy | Notes |
|---|---|---|
| Hybrid (medium) | Mid | Default since v3.3; faster, can miss dense/complex layouts |
| Hybrid (high) | High | Recommended for most documents; better layout and OCR |
Medium effort suits speed-sensitive pipelines or memory-constrained deployments. High effort is recommended when document fidelity is the priority, particularly for engineering drawings, densely-ruled tables, or non-standard layouts .
CLI and API Usage#
The effort level is set via the --effort / -e flag on the hybrid backend. Validation is handled by validate_effort at the CLI layer and _validate_parse_effort inside hybrid_analyze.py.
mineru -p input.pdf -b hybrid-engine --effort high
The online SaaS API is locked to medium effort and does not expose the --effort parameter; self-hosted deployments may use either level freely .
Historical Note: "Flash Mode" / "Hybrid-Flash"#
Prior to the current design, an early proposal (PR #5090, closed without merge) introduced a separate hybrid-flash-engine backend alongside new constants BACKEND_HYBRID_FLASH_ENGINE and BACKEND_HYBRID_FLASH_HTTP_CLIENT . This "flash mode" was a discrete backend variant rather than a parameter on the existing hybrid backend.
That approach was superseded. The subsequent PR #5236 (merged 2026-07-06) consolidated terminology, replacing the flash backend concept with the --effort parameter on hybrid-engine . flash references no longer appear in public-facing options; legacy backend aliases are handled by normalize_backend.
Key Files#
| File | Role |
|---|---|
mineru/backend/hybrid/hybrid_analyze.py | Core dispatch logic; doc_analyze / aio_doc_analyze branch on effort |
mineru/cli/backend_options.py | DEFAULT_HYBRID_EFFORT, HYBRID_EFFORT_CHOICES, validate_effort |