Spectrum pretraining data (v3)
Built by Vardan Sharma (MSc AI, University of Edinburgh) for the Spectrum project with Vivek Iyer and Prof. Alexandra Birch.
Cleaned documents for pretraining Spectrum, an encoder-decoder LM over OmniSONAR sentence embeddings (OmniSONAR paper, Section 9). One document per row. Sentence splitting is done downstream, so there is no sentences column; n_sentences_rule is only a rough rule-based count.
Quick start
from datasets import load_dataset
ds = load_dataset("VardanSharma13/spectrum-pretrain", "hin", split="train") # or "multilingual", "english"
ds[0]["text"]
Size
- Multilingual: 58 languages, 31,972,412 documents, 17,170,212,072 words, about 1.04B sentences (rule count).
- English: 21,677,915 documents, 12,231,931,595 words, about 0.66B sentences (rule count). FineWeb-Edu, Cosmopedia and Common Corpus. DCLM-Edu is not included: the project already holds it, and FineWeb-Edu pages that also appear in DCLM-Edu were removed (4,913,103 documents).
- Speech: VoxPopuli, 16 languages, 75,776 documents, 379,665 segments, 1,050.77 hours.
Columns (text)
| column | meaning |
|---|---|
id |
unique id, <lang>-<shard>-<row> |
orig_id |
the document's id in our download of its source |
text |
the cleaned document |
lang |
ISO 639-3 code |
source / subset |
where it came from (fineweb2, sangraha, wikipedia, fineweb_edu, cosmopedia, common_corpus) |
doc_type |
web, wiki, synthetic, ... |
url, domain |
origin page (when known) |
n_words, n_chars, n_sentences_rule |
sizes |
lid_prob |
GlotLID document probability for lang |
fragile_frac |
share of lines removed as SONAR-fragile (URLs, references, IDs, number rows, menus) |
wrong_lang_frac |
share of lines removed as another language |
quality_score |
English only: FineWeb-Edu classifier score 0-5 (FineWeb-Edu and Common Corpus; NaN for Cosmopedia) |
meta |
JSON string with the source's own fields |
How it was cleaned
Each step follows a published pipeline (OmniSONAR/Spectrum, LCM, FineWeb/FineWeb-2, DCLM, MADLAD-400, Sangraha).
- Document filters: Unicode normalisation, script check, GlotLID language ID, Gopher/FineWeb repetition and quality rules, emoji and mojibake rules, PII removal (emails, phone numbers, IPs).
- Blocklist and spam: UT1 adult/gambling domain blocklist, plus a spam-keyword density rule.
- SONAR-fragile lines (LCM paper): lines that are URLs, citation/reference lines, ID tokens, number or table rows, and runs of short menu labels are removed. A document losing more than 30% of its text this way is dropped.
- Line-level language ID (MADLAD-400): lines of 40 or more characters confidently (p >= 0.8) in another language are removed. A document losing more than 30% is dropped.
- Deduplication: exact (normalised text) and MinHash near-duplicates (128 permutations, 5-word shingles, Jaccard 0.8), across all sources of a language, Wikipedia kept first. For English: exact across all sources, MinHash on Common Corpus (FineWeb-Edu is already deduplicated per dump, and the FineWeb paper found cross-dump dedup hurts).
- Boilerplate lines: lines repeated across many documents of a language (cookie banners, shop footers) are removed.
- Domain cap: no single domain above 2% of a language (Wikipedia exempt).
- Decontamination: documents sharing n-grams with FLORES, XStoryCloze, Belebele, SIB-200 (and HellaSwag for English) are removed.
- Final length check: at least 3 sentences and 30 words (100 characters for languages without spaces).
- English quality: Common Corpus documents scoring below 2 on the FineWeb-Edu classifier are dropped (the DCLM-Edu threshold).
Per language
flagged raw and flagged clean are the share of a 20,000-document sample that any quality check flags, before and after cleaning.
| lang | docs | words | sentences (rule) | near dups removed | flagged raw | flagged clean |
|---|---|---|---|---|---|---|
| arb | 814,305 | 372,023,056 | 20,512,626 | 758 | 36.2% | 35.2% |
| asm | 188,105 | 81,893,233 | 7,268,709 | 46,210 | 12.3% | 7.2% |
| ben | 583,716 | 222,876,543 | 20,049,353 | 72 | 5.9% | 4.5% |
| brx | 2,858 | 649,648 | 36,670 | 2,858 | 30.8% | 27.0% |
| bul | 504,408 | 251,052,313 | 18,742,916 | 449 | 8.2% | 6.5% |
| cat | 637,678 | 253,668,023 | 13,321,122 | 3,142 | 28.7% | 26.6% |
| ces | 636,674 | 254,830,323 | 22,229,435 | 238 | 8.0% | 3.5% |
| cmn | 1,178,203 | 1,420,425,272 | 43,860,671 | 79 | 4.7% | 2.3% |
| dan | 538,180 | 234,313,324 | 17,925,634 | 1,069 | 12.9% | 4.2% |
| deu | 1,127,348 | 475,065,846 | 39,480,121 | 173 | 12.1% | 6.8% |
| ell | 795,486 | 331,427,767 | 20,148,103 | 2,649 | 24.8% | 23.3% |
| est | 326,662 | 164,764,310 | 16,151,577 | 1,177 | 8.5% | 4.7% |
| fas | 742,001 | 449,771,322 | 22,499,590 | 1,382 | 21.9% | 19.8% |
| fin | 420,345 | 153,589,402 | 16,027,211 | 1,151 | 12.5% | 2.6% |
| fra | 1,112,377 | 532,663,584 | 34,515,968 | 363 | 16.1% | 13.6% |
| gle | 169,974 | 92,362,144 | 5,705,413 | 13,234 | 29.4% | 22.4% |
| gom | 9,594 | 2,989,082 | 256,832 | 9,719 | 35.6% | 4.4% |
| guj | 451,426 | 184,217,844 | 13,109,817 | 32,069 | 10.2% | 9.6% |
| heb | 451,031 | 219,460,838 | 16,057,964 | 1,654 | 6.0% | 4.3% |
| hin | 759,810 | 312,124,801 | 18,422,392 | 14,861 | 8.2% | 5.1% |
| hrv | 255,296 | 211,161,896 | 16,689,152 | 5,786 | 17.7% | 16.4% |
| hun | 565,734 | 264,460,187 | 21,844,021 | 169 | 12.9% | 9.8% |
| ind | 709,425 | 335,922,395 | 24,505,043 | 3,336 | 20.0% | 11.3% |
| ita | 990,153 | 468,564,599 | 27,906,469 | 1,049 | 31.2% | 28.8% |
| jpn | 959,153 | 1,183,394,810 | 41,991,359 | 23 | 4.7% | 1.6% |
| kan | 490,659 | 120,013,602 | 11,761,103 | 35,649 | 7.1% | 5.8% |
| kor | 639,607 | 219,643,739 | 22,096,823 | 1,876 | 6.6% | 1.2% |
| lit | 364,159 | 189,928,371 | 17,559,339 | 1,194 | 9.1% | 7.4% |
| lvs | 311,616 | 156,397,289 | 13,993,802 | 2,923 | 11.6% | 8.4% |
| mai | 12,302 | 4,979,380 | 369,940 | 12,485 | 38.2% | 5.8% |
| mal | 587,379 | 103,757,237 | 11,442,694 | 27,365 | 5.5% | 3.9% |
| mar | 520,699 | 164,313,130 | 13,555,333 | 13,231 | 6.0% | 5.2% |
| mlt | 131,533 | 59,903,447 | 4,280,634 | 13,165 | 23.9% | 17.9% |
| mni | 763 | 310,037 | 18,473 | 763 | 50.1% | 40.2% |
| nep | 679,695 | 194,183,730 | 13,690,582 | 393 | 6.9% | 6.8% |
| nld | 817,679 | 325,649,188 | 25,403,108 | 1,095 | 7.8% | 2.7% |
| ori | 423,295 | 118,290,740 | 10,785,068 | 226 | 6.4% | 4.9% |
| pan | 379,983 | 178,849,928 | 9,950,836 | 25,895 | 11.2% | 10.5% |
| pol | 882,714 | 337,625,776 | 30,264,702 | 213 | 7.1% | 5.6% |
| por | 1,031,417 | 471,137,594 | 29,963,299 | 325 | 18.9% | 17.0% |
| ron | 697,307 | 338,884,188 | 22,274,317 | 1,913 | 19.0% | 17.3% |
| rus | 956,589 | 622,568,237 | 55,520,856 | 229 | 8.2% | 7.2% |
| san | 160,611 | 69,642,670 | 11,929,975 | 26,460 | 26.9% | 15.4% |
| sat | 98 | 32,283 | 2,330 | 98 | 9.1% | 5.1% |
| slk | 526,035 | 203,340,133 | 18,122,115 | 2,593 | 9.0% | 4.9% |
| slv | 385,879 | 194,377,597 | 15,643,101 | 2,109 | 12.3% | 7.6% |
| snd | 219,066 | 129,274,039 | 6,423,180 | 68,223 | 21.3% | 20.7% |
| spa | 1,367,246 | 688,941,269 | 36,503,071 | 302 | 32.1% | 30.4% |
| srp | 297,835 | 172,817,107 | 12,464,023 | 5,743 | 16.2% | 15.5% |
| swe | 589,717 | 233,156,505 | 17,686,369 | 1,567 | 11.7% | 2.7% |
| swh | 253,706 | 101,741,446 | 6,069,163 | 12,424 | 25.2% | 22.4% |
| tam | 572,376 | 155,290,435 | 15,242,492 | 4,064 | 10.5% | 9.4% |
| tel | 516,044 | 127,374,686 | 13,514,011 | 150 | 6.7% | 4.2% |
| tha | 626,734 | 1,645,400,877 | 11,584,745 | 1,348 | 10.7% | 9.3% |
| tur | 770,765 | 274,295,833 | 24,140,722 | 311 | 15.4% | 11.2% |
| ukr | 677,753 | 253,283,619 | 21,523,470 | 1,051 | 11.5% | 8.9% |
| urd | 566,671 | 327,794,944 | 12,828,345 | 117 | 38.1% | 32.1% |
| vie | 584,538 | 513,340,454 | 23,513,092 | 1,200 | 13.2% | 10.9% |
| eng | 21,677,915 | 12,231,931,595 | 659,419,906 | 709,945 |
Speech: VoxPopuli
European Parliament speeches from facebook/voxpopuli (CC0), as ordered documents: a document is an unbroken run of at least 3 consecutive segments of one speech. Every segment was checked: duration 1-30 s, silence, clipping, speaking rate, and Whisper large-v3-turbo transcription compared with the VoxPopuli text (character error rate must be <= 0.5). A document is split where a segment is dropped; sentence order is never broken. Audio is 16 kHz mono 16-bit FLAC inside the parquet. FLEURS is excluded because it is a Spectrum evaluation set.
| language | docs | segments | hours | segments dropped | median CER |
|---|---|---|---|---|---|
| en | 20,583 | 99,097 | 275.82 | 6.19% | 0.0182 |
| de | 13,271 | 67,300 | 165.49 | 9.02% | 0.0419 |
| fr | 9,569 | 48,656 | 132.75 | 2.91% | 0.0159 |
| es | 7,420 | 41,113 | 119.82 | 3.55% | 0.0104 |
| pl | 5,073 | 24,659 | 68.73 | 3.33% | 0.0095 |
| ro | 4,092 | 20,634 | 64.3 | 3.61% | 0.0221 |
| it | 2,901 | 15,862 | 53.77 | 14.89% | 0.0373 |
| hu | 2,768 | 14,429 | 41.89 | 5.47% | 0.0154 |
| cs | 3,026 | 14,905 | 41.12 | 2.71% | 0.0189 |
| nl | 2,481 | 11,257 | 24.84 | 7.57% | 0.0353 |
| sk | 1,822 | 8,598 | 23.93 | 3.25% | 0.0203 |
| hr | 1,048 | 4,998 | 15.42 | 3.93% | 0.0273 |
| fi | 1,156 | 5,410 | 15.03 | 2.63% | 0.0159 |
| sl | 383 | 1,857 | 5.42 | 20.38% | 0.0513 |
| et | 124 | 605 | 1.58 | 1.93% | 0.0321 |
| lt | 59 | 285 | 0.86 | 12.97% | 0.0758 |
Segments: seg_id, doc_id, position, text, flac, sample_rate, duration_s, asr_cer. Docs: doc_id, orig_doc_id, speech, speaker, seg_ids, texts, durations_s, n_segments, total_s.
Checksums
SHA256SUMS.text and SHA256SUMS.speech list a sha256 for every file.
Licences
Each source keeps its own licence: FineWeb-2 (ODC-By), Sangraha (CC-BY-4.0), Wikipedia (CC-BY-SA-4.0), FineWeb-Edu (ODC-By), Cosmopedia (Apache-2.0), Common Corpus (open licences per document), VoxPopuli (CC0). Use within those terms.
- Downloads last month
- -