mpdocbench / README.md
albertklorer's picture
Upload README.md with huggingface_hub
a04d21e verified
|
Raw History Blame Contribute Delete
3.05 kB
metadata
language:
  - en
  - zh
license: other
task_categories:
  - image-to-text
tags:
  - document-parsing
  - ocr
  - multi-page
  - rlvr
  - prime-environments
size_categories:
  - n<1K

MPDocBench-Parse for RLVR (images → gold Markdown)

A Hugging Face repackage of MPDocBench-Parse (Benchmarking Practical Multi-page Document Parsing, arXiv:2605.22100; USTC + Tongyi Lab, Alibaba), built for RL training/evaluation with Prime Intellect Environments (verifiers).

  • Input: images — the ordered page images of one document.
  • Output: output — the benchmark ground truth reconstructed into the single Markdown string the official evaluator expects a parser to produce: reading order across pages, # heading levels from the parent/son heading tree, HTML <table> tables, LaTeX display formulas (GT delimiters preserved: mostly $$...$$, some \[...\]), figures as ![](pageX_x1_y1_x2_y2.jpg) with 0–1000 boxes, and text/tables truncated across pages merged. Page furniture (running headers/footers, page numbers) is excluded, matching the evaluator. Reconstruction code: scripts/build_mpdocbench_dataset.py in the source repo; the equivalence target is Tongyi-Zhiwen/Qwen-Doc's dataset/end2end_dataset.py GT handling. Example gold files: gold_examples/.

Split

A single test split with all 420 documents. MPDocBench-Parse is a benchmark and has no official train split. Page images for the 11 pptSlides documents come from the gated NTT-hil-insight/SlideVQA dataset, per upstream's tools/download_data_from_slidevqa.py.

Columns

Exactly two: images (list of page images, in order) and output (the gold Markdown string).

Use with Prime Environments

from datasets import load_dataset
ds = load_dataset("albertklorer/mpdocbench")
print(ds["test"][0]["output"][:500])

The companion environment environments/mpdocbench_parse/ maps rows to a multimodal verifiers prompt (one image_url part per page) with answer=output and a composite reward approximating the benchmark's 8 tasks (text NED, table, formula, figure F1, heading hierarchy).

Validation of the gold reconstruction

Feeding output back as a "prediction" to the official upstream evaluator (15 documents, one per document type; CDM skipped — no LaTeX rendering stack): FigureF1 1.000, table TEDS 1.000, merged-table TEDS 1.000, merged-text edit distance 0.000, text edit distance (whole) 0.003, reading-order edit distance 0.021, HeadTEDS 0.975. The non-zero residuals are evaluator matching artifacts (e.g. multi-line GT titles must be joined onto one Markdown heading line), not missing content.

License / attribution

Upstream code is Apache-2.0. Upstream dataset terms: overall CC BY 4.0, with unauthorised portions under CC BY-NC-SA 4.0 (academic use only) and some sources link-only/not redistributed (paper App. D). Check those terms before redistributing this dataset or using it commercially. This card is not legal advice. Cite the MPDocBench-Parse paper when using this data.