CoolFace
Datasetpublic

jbduran/bartholomew-dataset-v2

BART Dataset v2 The second version of the BART pretraining corpus, focused on stripping low-quality text — boilerplate and OCR corruption — out of v1. Documents 149,745 (93.44% of v1) Characters 106,274,384,672 (89.50% of v1) Tokens ~24B (estimated) Shards 473 (one per v1 shard, same basename) Source BART Dataset v1 Schema single string column text Lineage — three cumulative filtering stages over the same corpus: Institutional Books 1.0 → v1 → v2 → v3… See the full description on the dataset page: https://huggingface.co/datasets/jbduran/bartholomew-dataset-v2.

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes1.7kdownloads
Dataset Card

BART Dataset v2

The second version of the BART pretraining corpus, focused on stripping low-quality text — boilerplate and OCR corruption — out of v1.

Documents149,745 (93.44% of v1)
Characters106,274,384,672 (89.50% of v1)
Tokens~24B (estimated)
Shards473 (one per v1 shard, same basename)
SourceBART Dataset v1
Schemasingle string column text

Lineage — three cumulative filtering stages over the same corpus:

Institutional Books 1.0v1v2v3

How it was made

This phase of filtering targeted boilerplate text and OCR corruption that snuck through Institutional Books' own filters. It removed useless headers, footers and library stamps, alongside gibberish symbols and antiquated characters, through heuristic regex filters.

We also followed Michael Hla's log-prior filter (from Machina Mirabilis / gpt1900), which estimates a text sequence's unconditional log-prior probability by summing token-level log probabilities, then trims improbable or out-of-distribution tokens. Documents were kept inside a moderate GPT-2 token log-prior band of p2.5–p97.5.

Whole books are preserved as rows, and each source shard maps to one output shard of the same basename — so v1's validation shard, shard_00472.parquet, survives as v2's.

The post-1900 physics keyword filter from Hla's original approach was deliberately skipped, because this corpus intentionally keeps texts up to the 1930s.

A note on the result

We expected a major improvement in validation bits-per-byte. Our models actually saw a decline in performance after this phase — because removing the boilerplate removed most of the easy items for a model to replicate. The repetitive headers, footers and stamps were cheap tokens to predict, and stripping them made the remaining corpus genuinely harder. This is worth knowing before you choose v2 over v1: the text is cleaner, but the benchmark number moves the wrong way.

Filtering summary

StageRule
Structuralprintable character ratio >= 0.85; <= 50 OCR artifacts; >= 500 chars raw and clean
Log-priormean GPT-2 token log-prior within p2.5–p97.5, i.e. -11.039 to -9.832
Granularitywhole books kept as rows — no chunking
Skippedpost-1900 physics keyword filter (incompatible with a 1930s cutoff)
Removal reasonDocuments
prior_high3,991
prior_low3,838
ocr_artifacts2,689
Total removed10,518 (6.56%)

<details> <summary><b>Log-prior threshold calibration</b></summary>

Thresholds were calibrated on a sample of 3,946 raw documents, of which 3,890 survived structural filtering (56 removed as ocr_artifacts). Estimated prior-based removal from that sample: 5.04%.

PercentileMean log-prior
1-11.2520
2.5 (low cut)-11.0390
5-10.8738
10-10.7243
25-10.5201
50-10.3274
75-10.1492
90-9.9888
95-9.9095
97.5 (high cut)-9.8320
99-9.7501

Full values in _prior/thresholds.json; per-run detail in cleaning_report.json.

</details>

<details> <summary><b>Character accounting</b></summary>

StageCharacters
Raw (v1)118,745,375,871
After structural clean, before prior filter114,051,142,521
Kept106,274,384,672
Kept vs. raw89.50%

</details>

Schema and usage

Single string column named text.

python
from datasets import load_dataset

ds = load_dataset("jbduran/bart-dataset-v2", split="train", streaming=True)
print(next(iter(ds))["text"][:500])

Artifacts: _prior/ (log-prior thresholds and sample stats), cleaning_report.json (full run report).

Citation

Ultimately derived from Institutional Books 1.0:

bibtex
@misc{institutionalbooks2025,
  title  = {Institutional Books 1.0: A 242B Token Dataset from Harvard Library's
            Collections, Refined for Accuracy and Usability},
  year   = {2025},
  eprint = {2506.08300},
  archivePrefix = {arXiv}
}