Datasets:

Modalities:
Text
Formats:
parquet
ArXiv:
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
identifier
stringlengths
44
55
dataset
stringclasses
1 value
mime_type
stringclasses
3 values
tokens
listlengths
4
2.37M
score
float32
0
13.4k
s3://data.kl3m.ai/documents/fr/00-02297/xml.json
fr
application/xml
[ 40, 22328, 42, 211, 129203, 126995, 25662, 42, 211, 129211, 40, 20591, 25524, 395, 63, 495, 19527, 1041, 23881, 407, 20591, 42, 211, 129211, 40, 72631, 42, 7842, 290, 280, 2245, 407, 72631, 42, 211, 129211, 40, 29947, 42, 129006, 13937,...
2.448527
s3://data.kl3m.ai/documents/fr/00-02053/txt.json
fr
text/plain
[ 71, 5776, 5014, 11379, 3939, 24, 3242, 1903, 331, 36602, 24, 3669, 480, 24, 3171, 6460, 211, 71, 21879, 73, 211, 71, 34642, 4152, 979, 25, 67774, 73, 211, 11150, 280, 1799, 5014, 13578, 7402, 280, 2589, 18322, 2379, 747, 129195, 20575...
0.138647
s3://data.kl3m.ai/documents/fr/00-02297/pdf.json
fr
text/plain
[ 5776, 5014, 2009, 5137, 26, 3939, 24, 233, 128387, 2026, 2009, 22693, 24, 3669, 414, 24, 3171, 2009, 7420, 4237, 960, 126629, 7833, 563, 280, 1799, 8425, 126629, 8862, 761, 24, 233, 126842, 608, 26, 233, 128025, 5901, 1177, 12956, 679, ...
0.006371
s3://data.kl3m.ai/documents/fr/00-02053/pdf.json
fr
text/plain
[ 5776, 5014, 2009, 5137, 26, 3939, 24, 233, 128387, 1903, 2009, 16031, 24, 3669, 480, 24, 3171, 2009, 7420, 4152, 979, 126629, 6613, 6009, 14205, 126629, 3394, 1940, 126629, 289, 39488, 661, 95, 126629, 15981, 126629, 18014, 233, 128387, 1...
0.342421
s3://data.kl3m.ai/documents/fr/00-02361/pdf.json
fr
text/plain
[ 33, 11773, 1799, 5014, 2009, 5137, 26, 3939, 24, 233, 128387, 2026, 2009, 22693, 24, 3669, 414, 24, 3171, 2009, 7420, 126629, 129006, 2203, 290, 6861, 24, 7875, 126629, 55977, 4015, 24, 318, 129072, 4124, 24, 5078, 126629, 6728, 1216, 2...
0.305833
s3://data.kl3m.ai/documents/fr/00-02297/txt.json
fr
text/plain
[ 71, 5776, 5014, 11379, 3939, 24, 3242, 2026, 331, 29778, 24, 3669, 414, 24, 3171, 6460, 211, 71, 21879, 73, 211, 71, 3986, 4237, 960, 73, 211, 11150, 280, 1799, 5014, 13578, 7402, 280, 2589, 18322, 2379, 747, 129195, 20575, 26, 1635, ...
0
s3://data.kl3m.ai/documents/fr/00-02361/txt.json
fr
text/plain
[ 71, 5776, 5014, 11379, 3939, 24, 3242, 2026, 331, 29778, 24, 3669, 414, 24, 3171, 6460, 211, 71, 21879, 73, 211, 71, 34642, 520, 11773, 25, 33, 12308, 73, 211, 11150, 280, 1799, 5014, 13578, 7402, 280, 2589, 18322, 2379, 747, 129195, ...
0.243178
s3://data.kl3m.ai/documents/fr/00-02053/xml.json
fr
application/xml
[ 40, 22328, 42, 211, 129203, 126995, 25662, 42, 211, 129211, 40, 20591, 25524, 395, 63, 495, 19527, 1041, 26500, 407, 20591, 42, 211, 129211, 40, 72631, 42, 127684, 743, 328, 5521, 233, 127098, 270, 2019, 26974, 310, 16162, 5038, 407, 72...
8.246833
s3://data.kl3m.ai/documents/fr/00-02361/xml.json
fr
application/xml
[ 40, 22328, 42, 211, 129203, 126995, 25662, 42, 211, 129211, 40, 20591, 25524, 395, 63, 495, 19527, 1041, 25140, 407, 20591, 42, 211, 129211, 40, 72631, 42, 12177, 310, 3067, 5451, 233, 127098, 270, 2019, 407, 72631, 42, 211, 129211, 40,...
13.266942
s3://data.kl3m.ai/documents/fr/00-02387/pdf.json
fr
text/plain
[ 33, 11376, 1799, 5014, 2009, 5137, 26, 3939, 24, 233, 128387, 2026, 2009, 22693, 24, 3669, 414, 24, 3171, 2009, 7420, 126629, 29, 2823, 6414, 391, 1874, 401, 1139, 301, 280, 126629, 52791, 95, 1303, 14299, 24, 27382, 389, 83932, 2870, ...
0.626646
s3://data.kl3m.ai/documents/fr/00-02387/txt.json
fr
text/plain
[ 71, 5776, 5014, 11379, 3939, 24, 3242, 2026, 331, 29778, 24, 3669, 414, 24, 3171, 6460, 211, 71, 21879, 73, 211, 71, 34642, 520, 11376, 25, 33, 12303, 73, 211, 11150, 280, 1799, 5014, 13578, 7402, 280, 2589, 18322, 2379, 747, 129195, ...
3.501201
s3://data.kl3m.ai/documents/fr/00-02387/xml.json
fr
application/xml
[ 40, 22328, 42, 211, 129203, 126995, 25662, 42, 211, 129211, 40, 20591, 25524, 395, 58, 495, 14510, 1694, 8037, 11092, 407, 20591, 42, 211, 129211, 40, 29947, 42, 55061, 3272, 4435, 389, 2379, 290, 3007, 310, 6925, 407, 29947, 42, 211, ...
14.037082
s3://data.kl3m.ai/documents/fr/00-02448/txt.json
fr
text/plain
[ 71, 5776, 5014, 11379, 3939, 24, 3242, 1903, 331, 36602, 24, 3669, 480, 24, 3171, 6460, 211, 71, 21879, 73, 211, 71, 34642, 520, 12981, 25, 1818, 818, 73, 211, 11150, 280, 1799, 5014, 13578, 7402, 280, 2589, 18322, 2379, 747, 129195, ...
0.837138
s3://data.kl3m.ai/documents/fr/00-02448/pdf.json
fr
text/plain
[ 5776, 5014, 2009, 5137, 26, 3939, 24, 233, 128387, 1903, 2009, 16031, 24, 3669, 480, 24, 3171, 2009, 7420, 520, 12981, 126629, 14178, 1724, 2117, 280, 4227, 388, 126629, 657, 1646, 714, 1311, 1531, 24, 301, 126629, 49175, 27436, 5695, 3...
0.869315
s3://data.kl3m.ai/documents/fr/00-02448/xml.json
fr
application/xml
[ 40, 22328, 42, 211, 129203, 126995, 25662, 42, 211, 129211, 40, 20591, 25524, 395, 58, 495, 14510, 1694, 8037, 11092, 407, 20591, 42, 211, 129211, 40, 70101, 16117, 16631, 233, 128387, 18537, 25, 815, 10133, 72201, 70101, 42, 211, 129211,...
19.08749
s3://data.kl3m.ai/documents/fr/00-02476/txt.json
fr
text/plain
[ 71, 5776, 5014, 11379, 3939, 24, 3242, 1903, 331, 36602, 24, 3669, 480, 24, 3171, 6460, 211, 71, 21578, 4866, 73, 211, 71, 34642, 4090, 1208, 25, 33, 12195, 73, 211, 11150, 280, 1799, 5014, 13578, 7402, 280, 2589, 18322, 2379, 747, ...
0.893606
End of preview. Expand in Data Studio

KL3M Data Project

Note: This page provides general information about the KL3M Data Project. Additional details specific to this dataset will be added in future updates. For complete information, please visit the GitHub repository or refer to the KL3M Data Project paper.

Changelog

2026-10-01: markup cleanup of text documents

Why. 868,117 of the 2,351,503 text documents (36.9%; the GovInfo txt renditions, stored as text/plain) still carried GovInfo's HTML page wrapper (<html><head><title>…</title></head><body><pre> … </pre></body></html>), with inline <a>, <span>, <SUP> and <INF> tags, Cloudflare e-mail-protection <script> blocks and HTML character references such as &#160;. The text/markdown documents (the html renditions) carried entities such as &rdquo; and &sect;, and 65,813 of them were wrapped in a Markdown code fence or a single backtick.

What changed. 1,412,907 of 3,115,383 documents (45.4%; 60.1% of the 2,351,503 text documents: 525,122 text/markdown, 887,785 text/plain) were cleaned. For those rows only tokens and score changed. The rules are conservative: they remove markup, never legal content. GPO bracketed headers and citations such as [Federal Register Volume …], [[Page …]] and [FR Doc. …] are kept. Inline tags are unwrapped (their text is kept); whitespace is only normalized where an outer wrapper or end marker was removed (leading blank lines dropped, one trailing newline).

Rule Documents Hits
<script>/<style> blocks removed whole 415,595 415,598
GovInfo HTML wrapper removed (<html>…<pre> and </pre></body></html>; the <title> repeats the [Federal Register Volume …] header) 868,117 868,117
Markdown code fence around the whole document removed 62,915 62,915
Single backtick around the whole document removed 2,898 2,898
HTML character references decoded (&#160;, &rdquo;, &sect;, &lt;, …) 874,192 13,783,401
Cloudflare-mangled mailto anchors with broken quoting removed (the address text is kept) 3,061 6,609
Inline tags unwrapped, inner text kept: <a …>, <span …>, <SUP>, <INF>, <sub>, GPO <E T=…>, <P>, <HD1–6> 868,177 9,560,658
Orphan GPO closing tags </GPH>/</MATH> in PDF-extracted text removed 19,460 109,570

Tokens: 13,546,975,855 → 13,363,920,652 in total (5,158,446,851 → 4,975,391,648 in the cleaned documents).

What did not change.

  • File names, schema (column names, types, order), row order, row count and identifier, dataset and mime_type values.
  • application/xml documents (GPO XML/MODS/PREMIS); their markup is the content.
  • Every document the rules did not touch: its tokens and score are bit-identical to the previous revision.

Known residuals.

  • In the GovInfo pages, Cloudflare had replaced many e-mail addresses with [email protected] before the documents were collected. The visible placeholder text is kept; the obfuscated addresses in the removed data-cfemail attributes were not decoded (they remain in the previous revision).
  • GPO text-format glyph codes such as <bullet>, <greek-m>, <plus-minus> and angle-bracketed URLs and e-mail addresses are content and are kept.
  • Running page headers/footers in PDF renditions (e.g. VerDate … with NOTICES) and occasional NUL bytes are not markup and are unchanged.
  • A few documents (about one per file) were double-escaped at the source (&amp;le;); entities are decoded in one pass only, so these now read &le;.
  • Malformed references without a terminating ; (e.g. &ltR&gt]) and non-HTML GPO codes such as &E; are left as they are.
  • Two rows hold a stored Cloudflare error page instead of a document (2019-02850/txt.json: 502 Bad Gateway; 2024-10839/txt.json: 500 Internal Server Error); they are left as they are.

Tokenization. Cleaned text was re-encoded with kl3m-004-128k-cased exactly as before: Tokenizer.encode(text).ids on the whole document, no special tokens added, no padding or truncation. Decoding and re-encoding unchanged documents reproduces their stored tokens exactly (54,500/54,500 checked). score was recomputed with the kl3m-data quality metrics (get_metrics), which reproduce the stored scores of unchanged documents exactly.

Previous revision. f4dc27e0bd42dc3400472a5f7a980043967a6fa1. To use the data exactly as it was before this cleanup, pin it:

from datasets import load_dataset
ds = load_dataset("alea-institute/kl3m-data-fr", revision="f4dc27e0bd42dc3400472a5f7a980043967a6fa1")

Description

This dataset is part of the ALEA Institute's KL3M Data Project, which provides copyright-clean training resources for large language models.

Dataset Details

  • Format: Parquet files containing document text and metadata
  • License: CC BY 4.0
  • Tokenizer: The tokens field uses the kl3m-004-128k-cased tokenizer, a case-sensitive 128K vocabulary tokenizer optimized for legal, financial, and enterprise documents

Abstract

Practically all large language models have been pre-trained on data that is subject to global uncertainty related to copyright infringement and breach of contract. This creates potential risk for users and developers due to this uncertain legal status. The KL3M Data Project directly confronts this critical issue by introducing the largest comprehensive training data pipeline that minimizes risks related to copyright or breach of contract.

The foundation of this project is a corpus of over 132 million documents and trillions of tokens spanning 16 different sources that have been verified to meet the strict copyright and licensing protocol detailed in the project. We are releasing the entire pipeline, including:

  1. The source code to acquire and process these documents
  2. The original document formats with associated provenance and metadata
  3. Extracted content in a standardized format
  4. Pre-tokenized representations of the documents
  5. Various mid- and post-train resources such as question-answer, summarization, conversion, drafting, classification, prediction, and conversational data

All of these resources are freely available to the public on S3, Hugging Face, and GitHub under CC-BY terms. We are committed to continuing this project in furtherance of a more ethical, legal, and sustainable approach to the development and use of AI models.

Legal Basis

This dataset is fully compliant with copyright law and contractual terms. The content is included based on the following legal foundation:

  • Public domain materials
  • US government works
  • Open access content under permissive licenses
  • Content explicitly licensed for AI training

Papers

For more information about the KL3M Data Project, please refer to:

Citation

If you use this dataset in your research, please cite:

@misc{bommarito2025kl3mdata,
  title={The KL3M Data Project: Copyright-Clean Training Resources for Large Language Models},
  author={Bommarito II, Michael J. and Bommarito, Jillian and Katz, Daniel Martin},
  year={2025},
  eprint={2504.07854},
  archivePrefix={arXiv},
  primaryClass={cs.CL}
}
@misc{bommarito2025kl3m,
  title={KL3M Tokenizers: A Family of Domain-Specific and Character-Level Tokenizers for Legal, Financial, and Preprocessing Applications},
  author={Bommarito II, Michael J. and Katz, Daniel Martin and Bommarito, Jillian},
  year={2025},
  eprint={2503.17247},
  archivePrefix={arXiv},
  primaryClass={cs.CL}
}

About ALEA

The ALEA Institute is a non-profit research organization focused on advancing AI for business, law, and governance. Learn more at https://aleainstitute.ai/.

Downloads last month
633

Models trained or fine-tuned on alea-institute/kl3m-data-fr

Collection including alea-institute/kl3m-data-fr

Papers for alea-institute/kl3m-data-fr