CoolFace
Datasetpublic

jbduran/bartholomew-dataset-v1

BART Dataset v1 The first version of the BART pretraining corpus: pre-1930 English books drawn from Institutional Books 1.0 and filtered hard on OCR quality, language, date, and tokenizability. Documents 160,263 Characters 118,745,375,871 Tokens ~27B (estimated) Shards 473 (472 train + 1 val) Source Institutional Books 1.0 (242B tokens, ~983K documents) Schema single string column text Lineage — three cumulative filtering stages over the same corpus:… See the full description on the dataset page: https://huggingface.co/datasets/jbduran/bartholomew-dataset-v1.

sourceHugging Facemitupdated 1mo agoView on Hugging Face
1likes2.3kdownloads
Dataset Card

BART Dataset v1

The first version of the BART pretraining corpus: pre-1930 English books drawn from Institutional Books 1.0 and filtered hard on OCR quality, language, date, and tokenizability.

Documents160,263
Characters118,745,375,871
Tokens~27B (estimated)
Shards473 (472 train + 1 val)
SourceInstitutional Books 1.0 (242B tokens, ~983K documents)
Schemasingle string column text

Lineage — three cumulative filtering stages over the same corpus:

Institutional Books 1.0v1v2v3

How it was made

We kept searching for a vintage pretraining corpus and came across Institutional Books 1.0, the product of the Harvard Library's digitization and post-processing work — 242B tokens across almost a million documents.

Working from Institutional Books, we applied an aggressive OCR score threshold of 0.90, drawing on both OCRoscope and the OCR score from Google Books metadata, and required that the two metrics agree within 0.10 on any given document. We then filtered by date, rejecting any undated book outright; filtered for English, which produced by far the most rejects; and dropped text with a tokenizability score below 95 — a measure of how efficiently a tokenizer encodes the text.

This trimmed 242B tokens down to roughly 27B. We then deduplicated by book barcode and shuffled the dataset. The result is BART Dataset v1.

Filters

FieldRule
language_gen== "eng"
language_distribution_genEnglish proportion >= 0.9
date1_srcdate2_src fallbackparsed year < 1930 (undated rejected; invalid date types rejected)
ocr_score_src>= 90.0
ocr_score_gen>= 90.0
OCR agreement`\src - gen\<= 10.0`
text_analysis_gen.text_by_page_gen.tokenizability_score>= 95.0
tiny fragmentstokens >= 500, chars >= 2000, pages >= 3, sentences >= 20

Deduplication — via likely_duplicates_barcodes_gen barcode claiming; the first-seen representative is kept.

Diversity — a single shuffle buffer with uniform random eviction. Shards 00000-00449 used a 20 GB buffer; the final 23 shards, 00450-00472, used an 8 GB buffer to reduce Colab memory pressure. Books were randomly evicted once the active buffer exceeded its limit, reducing source-order clustering while preserving the corpus's natural topic distribution.

Validation split — deterministic by barcode hash: a book is val iff crc32(barcode) % 370 == 0 (~1,000 books). Resume-stable, and written as the last lexicographic shard, shard_00472.parquet.

Topic distribution

TopicDocumentsShare
LANGUAGE AND LITERATURE45,86328.62%████████████████████████████
PHILOSOPHY. PSYCHOLOGY. RELIGION29,54818.44%██████████████████
LAW13,7988.61%████████
SCIENCE13,3088.30%████████
HISTORY OF THE AMERICAS9,5435.95%██████
SOCIAL SCIENCES8,6035.37%█████
AUXILIARY SCIENCES OF HISTORY5,4043.37%███
AGRICULTURE5,2903.30%███
POLITICAL SCIENCE4,9663.10%███
EDUCATION4,3812.73%███
TECHNOLOGY3,7332.33%██
GEOGRAPHY. ANTHROPOLOGY. RECREATION3,4332.14%██
FINE ARTS3,1921.99%██
MEDICINE3,0341.89%██
MUSIC AND BOOKS ON MUSIC1,5730.98%
WORLD HISTORY AND HISTORY OF EUROPE, ASIA, AFRICA, AUSTRALIA, NEW ZEALAND, ETC.1,4810.92%
NAVAL SCIENCE1,0000.62%
GENERAL WORKS9140.57%
MILITARY SCIENCE8290.52%
BIBLIOGRAPHY. LIBRARY SCIENCE. INFORMATION RESOURCES (GENERAL)3210.20%
UNKNOWN490.03%

Per-shard topic distributions live in manifest.json under shards[].topic_distribution.

<details> <summary><b>Rejection counts and the language-filtering estimate</b></summary>

Raw rejection tallies, which are not exact — interrupted resumes counted some rejected source rows more than once:

ReasonCount
language1,172,869
date_type_invalid235,713
ocr_low209,112
language_low_english_proportion207,550
tokenizability_low45,564
duplicate35,229
year_too_recent22,962
language_distribution_missing3,059
year_unparseable612
ocr_missing3
too_few_sentences3
tokenizability_missing12

Estimated language filtering. Because exact totals weren't preserved, a clean 50,000-row dry run using the final filters was used instead: it rejected 18,851 non-English books, 8,772 books below the 90% English threshold, and 9 with missing language metadata. Extrapolated across 983,004 source rows, approximately 543,200 books (55.3%) were removed by language filtering. These are estimates, not exact counts.

Pass by date source (date1_src vs date2_src fallback recovery): date1_src 202,458, date2_src 12.

</details>

Schema and usage

Single string column named text. ZSTD-3 compression, row-group size 64. Per-document audit metadata lives separately in audit_metadata.jsonl; the training shards stay text-only.

python
from datasets import load_dataset

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

Use with nanochat

Drop-in compatible with nanochat/dataset.py. Rename the directory to base_data_climbmix/ to match DATA_DIR in nanochat/dataset.py:27, or edit that constant to point at this directory. Then re-train the tokenizer:

bash
python -m scripts.tok_train && python -m scripts.tok_eval
python -m scripts.base_train --depth=12 --window-pattern=L

Citation

This dataset is 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}
}