The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
estimated_prior_removed_pct: double
high: double
low: double
mean_log_prior_percentiles: struct<1: double, 10: double, 2.5: double, 25: double, 5: double, 50: double, 75: double, 90: double (... 39 chars omitted)
child 0, 1: double
child 1, 10: double
child 2, 2.5: double
child 3, 25: double
child 4, 5: double
child 5, 50: double
child 6, 75: double
child 7, 90: double
child 8, 95: double
child 9, 97.5: double
child 10, 99: double
prior_band: list<item: double>
child 0, item: double
sample_prior_docs: int64
sample_raw_docs_seen: int64
sample_structural_kept: int64
sample_structural_removed: struct<ocr_artifacts: int64>
child 0, ocr_artifacts: int64
text: string
to
{'text': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
estimated_prior_removed_pct: double
high: double
low: double
mean_log_prior_percentiles: struct<1: double, 10: double, 2.5: double, 25: double, 5: double, 50: double, 75: double, 90: double (... 39 chars omitted)
child 0, 1: double
child 1, 10: double
child 2, 2.5: double
child 3, 25: double
child 4, 5: double
child 5, 50: double
child 6, 75: double
child 7, 90: double
child 8, 95: double
child 9, 97.5: double
child 10, 99: double
prior_band: list<item: double>
child 0, item: double
sample_prior_docs: int64
sample_raw_docs_seen: int64
sample_structural_kept: int64
sample_structural_removed: struct<ocr_artifacts: int64>
child 0, ocr_artifacts: int64
text: string
to
{'text': Value('string')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
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
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
| Stage | Rule |
|---|---|
| Structural | printable character ratio >= 0.85; <= 50 OCR artifacts; >= 500 chars raw and clean |
| Log-prior | mean GPT-2 token log-prior within p2.5–p97.5, i.e. -11.039 to -9.832 |
| Granularity | whole books kept as rows — no chunking |
| Skipped | post-1900 physics keyword filter (incompatible with a 1930s cutoff) |
| Removal reason | Documents |
|---|---|
prior_high |
3,991 |
prior_low |
3,838 |
ocr_artifacts |
2,689 |
| Total removed | 10,518 (6.56%) |
Log-prior threshold calibration
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%.
| Percentile | Mean 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.
Character accounting
| Stage | Characters |
|---|---|
| Raw (v1) | 118,745,375,871 |
| After structural clean, before prior filter | 114,051,142,521 |
| Kept | 106,274,384,672 |
| Kept vs. raw | 89.50% |
Schema and usage
Single string column named text.
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:
@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
- 968