You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Research use only. Every row keeps the licence of its source; some sources are non-commercial or research-only. Do not redistribute.

Log in or Sign Up to review the conditions and access this dataset content.

Peppercorn Dataset

Vietnamese + English training data for a small document VLM. The data covers seven tasks: page parsing (Markdown plus layout boxes), tables, formulas, charts, key information extraction (KIE) and VQA.

Parsing pages 1,495,135: VI 816,724 · EN 678,411
Task rows 8,368,061: train 8,259,714 · dev 50,235 · bench 58,112
Augmented views 568,134: scan-style 510,145 · photo 57,989
Images ~6.9M: page images 2.07M (pages + views) · task images 4,879,988 (VI 543,982 · EN 4,336,936)
Size ~1.1 TB (tar shards + JSONL)

Download by part

You do not need the whole 1.1 TB. Use download.py from this repository:

hf auth login                                         # gated: request access first
python download.py --list                             # parts and sizes
python download.py meta                               # index, mixes, candidates, card (small)
python download.py rows --source cord,mcocr           # task rows of some sources
python download.py row-images --source cord --extract # only the image tars those rows need
python download.py parsing --lang vi                  # parsing shards of VI pools (or --pool cc_pdf_vi,idl)
python download.py augment --pool pdfa_lighton2       # augmented views; augment-photo for G3
python download.py bench --extract                    # benchmarks; raw-sources for raw VI task data
Part Size What
meta ~2 GB index, mixes, candidates.jsonl, curation and dedup lists, card
rows 8.9 GB task rows (JSONL)
row-images 196 GB images of the task rows (297 tars)
parsing 629 GB parsing page shards
augment 155 GB scan-style views
augment-photo 17 GB photo views (G3)
bench 24 GB benchmarks
raw-sources 12 GB raw VI task sources
wip 4.2 GB planned jobs, not training rows yet: VQA pilot + consensus votes (wip/README.md)

Curation workflow

Curation workflow

What is inside

Rows per task and language

Task Output Main sources
Page parsing Markdown, HTML tables, LaTeX; optional layout boxes ![class](x1,y1,x2,y2) VI web PDFs and scans, VI public sets, LightOnOCR-mix (pdfa), DocLayNet, IDL, olmOCR-mix, own renders
Table HTML PubTabNet, VI table crops, VI table VQA
Formula LaTeX SynthFormulaNet, UniMER, VI formula crops
Chart HTML table SynthChartNet, CoSyn, VI chart sets
KIE JSON filled from a typed template own VI renders (receipts, forms, purchase notes), CORD, MC-OCR (dev / bench)
VQA short answer VI and EN VQA sets (tables, charts, infographics, text)

Real vs synthetic

Label and image origin

  • Synthetic: own renders (receipts, forms, charts, tables, math, short and dense pages) and synthetic public sets. Their labels are exact.
  • Real: web PDFs, scans and public datasets. Labels come from a human ground truth, from the PDF text layer, or from teacher reads (LightOnOCR-3 4B / 0.8B).

Parsing pages

Parsing pages by source

Lengths and training mix

Lengths

Training mix

Mix (outputs/p1vi/mix_v2.json):

  • a target share for each task × language;
  • inside a group, sources are weighted by √rows × quality;
  • each source repeats at most 5 times;
  • parsing pages take 32 % of draws, and layout boxes are asked for on 45 % of them.

Augment

One view per recipe

Recipe What it does Views
P1 print / photocopy: low ink, show-through, binarize, dust 510,145 in total (corpus/v3_shards/aug/)
P2 capture: blur, rescale, JPEG
G1 skew + zoom (+ light P2)
G2 page curl, warp, lens, shading
R90 90° / 270° rotation (text-only targets)
G3 photo of a page: oblique, screen recapture, wrinkle, hard shadow 57,989 (corpus/v3_shards_g3/img/g3_*)
  • Labels follow the parent page. Layout boxes are moved with the geometry, and views that push boxes off the page are rejected.
  • All probabilities are in corpus/v3_shards/aug.yaml. aug_parents.txt lists the parent of every view.
  • G3 views have their own index.json and enter the mix as g3_* pools (mix_a3_g3.yaml).

Samples

Image Task Prompt → target
parse + boxes · VI page → Markdown and ![class](box) lines
table · EN crop → <table>…</table>
formula · EN crop → $$\frac{t'(r)}{\rho'(r)}=…$$
chart · VI chart → <table><tr><th>Nhà cung cấp</th>…
KIE · VI template → {"ten_cua_hang": "NHÀ HÀNG HƯNG THỊNH", "date": "2024-11-03", …}
KIE · VI template → {"carrier": "VNPost", "tracking_no": "EX4074493798", …}
KIE · EN template → {"items": [{"name": "Grilled Salmon Head", …}]}
VQA · VI "Năm nào Nicky Hayden đạt vị trí thứ 3…?" → "Năm 2005"
VQA · EN "What is the time signature of this piece?" → "4/4"

Full prompts and targets for every sample: samples.json.

Layout

corpus/p1vi/rows/<source>/*.jsonl    task rows: id, task, lang, split, images, prompt, target, licence, label_origin
corpus/p1vi/img_tars/img-*.tar       row images (path = rows[].images[i]); .tsv lists members
corpus/v3_shards/img/*.tar           parsing pages: <key>.jpg + <key>.json (text, grounding, source, licence, teacher)
corpus/v3_shards/index.json          shard list
outputs/p1/pool_all/candidates.jsonl ready parsing pages with byte offsets into the shards
corpus/v3_shards/aug/, corpus/v3_shards_g3/   augmented views (see Augment)
bench_tars/, raw_task_sources_tars/  benchmarks and raw VI task sources (tar + .tsv)
outputs/p1vi/mix_v2.json             training mix
wip/                                 planned jobs: VQA pilot, consensus votes (not in the mix)
import glob, json
row = json.loads(open(sorted(glob.glob("corpus/p1vi/rows/cord/train-*.jsonl"))[0]).readline())
# image: extract rows' images from corpus/p1vi/img_tars (members are named img/<sha256[:2]>/<sha256>.<ext>)
page = json.loads(open("outputs/p1/pool_all/candidates.jsonl").readline())
with open("corpus/v3_shards/" + page["shard"], "rb") as f:
    f.seek(page["json"][0]); meta = json.loads(f.read(page["json"][1]))      # label
    f.seek(page["img"][0]);  img = f.read(page["img"][1])                    # image bytes

Held-out data and decontamination

  • The dev and bench splits are never trained on. Benchmarks: OmniDocBench (EN), olmOCR-bench, SEA-Vision VI, MDPBench, VI dev / test, and MC-OCR VI KIE.
  • Train rows are removed when they match a benchmark: exact sha256, dHash near-duplicate checked against pixels, or a text signature (MC-OCR receipts).
  • Near-duplicate clusters are capped. Rule filters drop empty, too-long or garbled labels and bad fallback reads.

Licences

Every row and page carries a license field from its source. Some sources are non-commercial or research-only. Use the data for research and check each source's terms.

Planned (not in this release)

Only local models whose licences allow training on their outputs. Every new row will keep the model name, version and prompt id.

VQA on our own pages (VI + EN)

  • A local Qwen3.8-27B (FP8, non-thinking) reads the page transcript and writes 8 QA pairs per page: extract, lookup, reason and explain.
  • An extract answer must appear verbatim on the page; pairs that fail this check are dropped.
  • Pilot (in this release, not yet rows): 1,210 pages, 8,707 QA pairs (VI 999 pages, EN 211) in wip/vqa_pilot/. Full run: ~24k pages.

Consensus voting: several readers label the same page, and only what they agree on is kept. The first extra voter is done and is in wip/consensus/: OvisOCR3 reads of 40.6k pages (plain + boxes, with log-probs) and its boxes on 68k EN scans, matched against the current boxes.

Target Voters Kept
Parsing of weak VI pages OvisOCR3, LightOnOCR-3, PDF text layer the medoid read (closest to the others)
Layout boxes OvisOCR3 structured output vs the current boxes boxes both agree on (IoU match)
KIE on real forms, invoices, receipts local Qwen with the typed template, 2 samples fields where the samples agree
Chart → table on real charts local Qwen, 2 samples cells where the samples agree

Also planned

  • VI formulas rendered from textbook LaTeX.
  • Embedding dedup (SigLIP2 / DINOv2) to break template chains that dHash misses.
  • Human-checked VI test sets.
Downloads last month
360