text stringlengths 9.36k 10.5M |
|---|
"By H. Z. DARRAH\n\nInd 3648.98 \n\nHarvard College Library \n\nLOMES DEMIAE VERI 171915 DIAN \n\nFR(...TRUNCATED) |
"3 2044 010 165 553\n\n22465.32 (2) VERI TAS HARVARD \n\nCOLLEGE LIBRARY\n\nANGELA PISANI. \n\nSECON(...TRUNCATED) |
"3 2044 004 561 254\n\nU510590.18 \n\nHARVARDIAN \n\nSIGILL RISTO \n\nIN NOVAN \n\nHarvard College L(...TRUNCATED) |
"HARVARD \n\nDIVINITY \n\nSCHOOL \n\nAndover Hang\n\nTheological Library\n\nISIS UNVEILED: \n\nA MAS(...TRUNCATED) |
"US5974.7.1 \n\nHARVARD COLLEGE LIBRARY \n\nVE RI TAS \n\nFROM THE FUND IN MEMORY OF THE TWENTIETH M(...TRUNCATED) |
"Talks with Young Men. Sufidential\n\nThe gift of \n\nAlfred Dwight Sheffield HARVARD COLLEGE LIBRAR(...TRUNCATED) |
"VERO TAS HARVARD COLLEGE \n\nLIBRARY\n\nA BLUE-STOCKING. \n\nBY MRS. EDWARDES, 66 \n\nAUTHOR OF FOU(...TRUNCATED) |
"3 2044 010 545 580\n\n10475.25(2) VETERI TAS \n\nHARVARD COLLEGE LIBRARY\n\nMEMOIRS \n\nOF \n\nDOCT(...TRUNCATED) |
"HARVARD UNIVERSITY \n\nVERI TAS TÀ \n\nLIBRARY OF THE GRADUATE SCHOOL OF DESIGN\n\nHARVARD UNIVERS(...TRUNCATED) |
"702 3 2044 010 007 649 \n\nTEARLY\n\nPractically a ceston of the тельный брителния (...TRUNCATED) |
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:
Institutional Books 1.0 → v1 → v2 → v3
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
| Field | Rule |
|---|---|
language_gen |
== "eng" |
language_distribution_gen |
English proportion >= 0.9 |
date1_src → date2_src fallback |
parsed 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 fragments | tokens >= 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
| Topic | Documents | Share | |
|---|---|---|---|
| LANGUAGE AND LITERATURE | 45,863 | 28.62% | ████████████████████████████ |
| PHILOSOPHY. PSYCHOLOGY. RELIGION | 29,548 | 18.44% | ██████████████████ |
| LAW | 13,798 | 8.61% | ████████ |
| SCIENCE | 13,308 | 8.30% | ████████ |
| HISTORY OF THE AMERICAS | 9,543 | 5.95% | ██████ |
| SOCIAL SCIENCES | 8,603 | 5.37% | █████ |
| AUXILIARY SCIENCES OF HISTORY | 5,404 | 3.37% | ███ |
| AGRICULTURE | 5,290 | 3.30% | ███ |
| POLITICAL SCIENCE | 4,966 | 3.10% | ███ |
| EDUCATION | 4,381 | 2.73% | ███ |
| TECHNOLOGY | 3,733 | 2.33% | ██ |
| GEOGRAPHY. ANTHROPOLOGY. RECREATION | 3,433 | 2.14% | ██ |
| FINE ARTS | 3,192 | 1.99% | ██ |
| MEDICINE | 3,034 | 1.89% | ██ |
| MUSIC AND BOOKS ON MUSIC | 1,573 | 0.98% | █ |
| WORLD HISTORY AND HISTORY OF EUROPE, ASIA, AFRICA, AUSTRALIA, NEW ZEALAND, ETC. | 1,481 | 0.92% | █ |
| NAVAL SCIENCE | 1,000 | 0.62% | █ |
| GENERAL WORKS | 914 | 0.57% | █ |
| MILITARY SCIENCE | 829 | 0.52% | █ |
| BIBLIOGRAPHY. LIBRARY SCIENCE. INFORMATION RESOURCES (GENERAL) | 321 | 0.20% | █ |
| UNKNOWN | 49 | 0.03% | █ |
Per-shard topic distributions live in manifest.json under shards[].topic_distribution.
Rejection counts and the language-filtering estimate
Raw rejection tallies, which are not exact — interrupted resumes counted some rejected source rows more than once:
| Reason | Count |
|---|---|
language |
1,172,869 |
date_type_invalid |
235,713 |
ocr_low |
209,112 |
language_low_english_proportion |
207,550 |
tokenizability_low |
45,564 |
duplicate |
35,229 |
year_too_recent |
22,962 |
language_distribution_missing |
3,059 |
year_unparseable |
612 |
ocr_missing |
3 |
too_few_sentences |
3 |
tokenizability_missing |
12 |
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.
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.
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:
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:
@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}
}
- Downloads last month
- 1,125