The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
text: string
source: string
category: string
id: string
token_est: int64
total_elapsed_seconds: double
peak_ram_mb: double
config: struct<max_ram_gb: double, min_free_disk_gb: double, scratch_cap_gb: double, batch_size: int64, zstd (... 787 chars omitted)
child 0, max_ram_gb: double
child 1, min_free_disk_gb: double
child 2, scratch_cap_gb: double
child 3, batch_size: int64
child 4, zstd_level: int64
child 5, shuffle_buckets: int64
child 6, dedup_capacity: int64
child 7, dedup_fp_rate: double
child 8, min_text_len: int64
child 9, edu_min_score: double
child 10, mix: struct<general_web: struct<budget_bytes: int64, fineweb_edu: struct<share: double, dataset: string>, (... 508 chars omitted)
child 0, general_web: struct<budget_bytes: int64, fineweb_edu: struct<share: double, dataset: string>, dclm_baseline: stru (... 35 chars omitted)
child 0, budget_bytes: int64
child 1, fineweb_edu: struct<share: double, dataset: string>
child 0, share: double
child 1, dataset: string
child 2, dclm_baseline: struct<share: double, dataset: string>
child 0, share: double
child 1, dataset: string
child 1, synthetic_textbook: struct<budget_bytes: int64, cosmopedia: struct<share: double, dataset: string>, llm_generated: struc (... 32 chars omitted)
child 0, budget_bytes: int64
child 1, cosmopedia: struct<share: double, dataset: string>
child 0, sh
...
: int64
child 4, tokens: int64
child 5, path: string
child 6, stopped: string
child 6, instruction_ultrachat: struct<category: string, target_bytes: int64, docs: int64, bytes: int64, tokens: int64, path: string (... 34 chars omitted)
child 0, category: string
child 1, target_bytes: int64
child 2, docs: int64
child 3, bytes: int64
child 4, tokens: int64
child 5, path: string
child 6, config: string
child 7, stopped: string
child 7, codeparrot_clean: struct<category: string, target_bytes: int64, docs: int64, bytes: int64, tokens: int64, path: string (... 18 chars omitted)
child 0, category: string
child 1, target_bytes: int64
child 2, docs: int64
child 3, bytes: int64
child 4, tokens: int64
child 5, path: string
child 6, stopped: string
child 8, synthetic_llm: struct<category: string, target_bytes: int64, docs: int64, bytes: int64, tokens: int64, path: string (... 43 chars omitted)
child 0, category: string
child 1, target_bytes: int64
child 2, docs: int64
child 3, bytes: int64
child 4, tokens: int64
child 5, path: string
child 6, topics_generated: int64
child 7, stopped: string
child 9, final: struct<bytes: int64, docs: int64, shards_merged: int64, path: string, done: bool>
child 0, bytes: int64
child 1, docs: int64
child 2, shards_merged: int64
child 3, path: string
child 4, done: bool
to
{'pipeline': Value('string'), 'created_at': Value('timestamp[s]'), 'total_elapsed_seconds': Value('float64'), 'peak_ram_mb': Value('float64'), 'final_corpus': {'bytes': Value('int64'), 'docs': Value('int64'), 'shards_merged': Value('int64'), 'path': Value('string'), 'done': Value('bool')}, 'categories': {'general_web': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'synthetic_textbook': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'math': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'instruction': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'code': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}}, 'per_source': {'skipped': {}, 'fineweb_edu': {'category': Value('string'), 'target_bytes': Value('int64'), 'docs': Value('int64'), 'bytes': Value('int64'), 'tokens': Value('int64'), 'path': Value('string'), 'config': Value('string'), 'stopped': Value('string')}, 'dclm_baseline': {'category': Value('string'), 'target_bytes': Value('int64'), 'docs': Value('int64'), 'bytes': Value('int64'), 'tokens': Value('int64'), 'path': Value('string'), 'shards_processed': Value('int64'), 'stopped': Value('string')}, 'cosmopedia': {'category': Value('string'), 'target_bytes': Val
...
Value('int64'), 'path': Value('string'), 'done': Value('bool')}}, 'dedup': {'checked': Value('int64'), 'dupes_removed': Value('int64'), 'unique_added': Value('int64'), 'capacity': Value('int64'), 'fp_rate': Value('float64'), 'bloom_bits': Value('int64'), 'bloom_hashes': Value('int64')}, 'skipped_sources': {}, 'config': {'max_ram_gb': Value('float64'), 'min_free_disk_gb': Value('float64'), 'scratch_cap_gb': Value('float64'), 'batch_size': Value('int64'), 'zstd_level': Value('int64'), 'shuffle_buckets': Value('int64'), 'dedup_capacity': Value('int64'), 'dedup_fp_rate': Value('float64'), 'min_text_len': Value('int64'), 'edu_min_score': Value('float64'), 'mix': {'general_web': {'budget_bytes': Value('int64'), 'fineweb_edu': {'share': Value('float64'), 'dataset': Value('string')}, 'dclm_baseline': {'share': Value('float64'), 'dataset': Value('string')}}, 'synthetic_textbook': {'budget_bytes': Value('int64'), 'cosmopedia': {'share': Value('float64'), 'dataset': Value('string')}, 'llm_generated': {'share': Value('float64'), 'model': Value('string')}}, 'code': {'budget_bytes': Value('int64'), 'codeparrot_clean': {'dataset': Value('string')}}, 'math': {'budget_bytes': Value('int64'), 'open_web_math': {'dataset': Value('string')}}, 'instruction': {'budget_bytes': Value('int64'), 'openhermes': {'share': Value('float64'), 'dataset': Value('string')}, 'ultrachat': {'share': Value('float64'), 'dataset': Value('string')}}}, 'llm_budget_bytes': Value('int64'), 'llm_model': 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
text: string
source: string
category: string
id: string
token_est: int64
total_elapsed_seconds: double
peak_ram_mb: double
config: struct<max_ram_gb: double, min_free_disk_gb: double, scratch_cap_gb: double, batch_size: int64, zstd (... 787 chars omitted)
child 0, max_ram_gb: double
child 1, min_free_disk_gb: double
child 2, scratch_cap_gb: double
child 3, batch_size: int64
child 4, zstd_level: int64
child 5, shuffle_buckets: int64
child 6, dedup_capacity: int64
child 7, dedup_fp_rate: double
child 8, min_text_len: int64
child 9, edu_min_score: double
child 10, mix: struct<general_web: struct<budget_bytes: int64, fineweb_edu: struct<share: double, dataset: string>, (... 508 chars omitted)
child 0, general_web: struct<budget_bytes: int64, fineweb_edu: struct<share: double, dataset: string>, dclm_baseline: stru (... 35 chars omitted)
child 0, budget_bytes: int64
child 1, fineweb_edu: struct<share: double, dataset: string>
child 0, share: double
child 1, dataset: string
child 2, dclm_baseline: struct<share: double, dataset: string>
child 0, share: double
child 1, dataset: string
child 1, synthetic_textbook: struct<budget_bytes: int64, cosmopedia: struct<share: double, dataset: string>, llm_generated: struc (... 32 chars omitted)
child 0, budget_bytes: int64
child 1, cosmopedia: struct<share: double, dataset: string>
child 0, sh
...
: int64
child 4, tokens: int64
child 5, path: string
child 6, stopped: string
child 6, instruction_ultrachat: struct<category: string, target_bytes: int64, docs: int64, bytes: int64, tokens: int64, path: string (... 34 chars omitted)
child 0, category: string
child 1, target_bytes: int64
child 2, docs: int64
child 3, bytes: int64
child 4, tokens: int64
child 5, path: string
child 6, config: string
child 7, stopped: string
child 7, codeparrot_clean: struct<category: string, target_bytes: int64, docs: int64, bytes: int64, tokens: int64, path: string (... 18 chars omitted)
child 0, category: string
child 1, target_bytes: int64
child 2, docs: int64
child 3, bytes: int64
child 4, tokens: int64
child 5, path: string
child 6, stopped: string
child 8, synthetic_llm: struct<category: string, target_bytes: int64, docs: int64, bytes: int64, tokens: int64, path: string (... 43 chars omitted)
child 0, category: string
child 1, target_bytes: int64
child 2, docs: int64
child 3, bytes: int64
child 4, tokens: int64
child 5, path: string
child 6, topics_generated: int64
child 7, stopped: string
child 9, final: struct<bytes: int64, docs: int64, shards_merged: int64, path: string, done: bool>
child 0, bytes: int64
child 1, docs: int64
child 2, shards_merged: int64
child 3, path: string
child 4, done: bool
to
{'pipeline': Value('string'), 'created_at': Value('timestamp[s]'), 'total_elapsed_seconds': Value('float64'), 'peak_ram_mb': Value('float64'), 'final_corpus': {'bytes': Value('int64'), 'docs': Value('int64'), 'shards_merged': Value('int64'), 'path': Value('string'), 'done': Value('bool')}, 'categories': {'general_web': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'synthetic_textbook': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'math': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'instruction': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}, 'code': {'bytes': Value('int64'), 'docs': Value('int64'), 'tokens': Value('int64'), 'sources': List(Value('string'))}}, 'per_source': {'skipped': {}, 'fineweb_edu': {'category': Value('string'), 'target_bytes': Value('int64'), 'docs': Value('int64'), 'bytes': Value('int64'), 'tokens': Value('int64'), 'path': Value('string'), 'config': Value('string'), 'stopped': Value('string')}, 'dclm_baseline': {'category': Value('string'), 'target_bytes': Value('int64'), 'docs': Value('int64'), 'bytes': Value('int64'), 'tokens': Value('int64'), 'path': Value('string'), 'shards_processed': Value('int64'), 'stopped': Value('string')}, 'cosmopedia': {'category': Value('string'), 'target_bytes': Val
...
Value('int64'), 'path': Value('string'), 'done': Value('bool')}}, 'dedup': {'checked': Value('int64'), 'dupes_removed': Value('int64'), 'unique_added': Value('int64'), 'capacity': Value('int64'), 'fp_rate': Value('float64'), 'bloom_bits': Value('int64'), 'bloom_hashes': Value('int64')}, 'skipped_sources': {}, 'config': {'max_ram_gb': Value('float64'), 'min_free_disk_gb': Value('float64'), 'scratch_cap_gb': Value('float64'), 'batch_size': Value('int64'), 'zstd_level': Value('int64'), 'shuffle_buckets': Value('int64'), 'dedup_capacity': Value('int64'), 'dedup_fp_rate': Value('float64'), 'min_text_len': Value('int64'), 'edu_min_score': Value('float64'), 'mix': {'general_web': {'budget_bytes': Value('int64'), 'fineweb_edu': {'share': Value('float64'), 'dataset': Value('string')}, 'dclm_baseline': {'share': Value('float64'), 'dataset': Value('string')}}, 'synthetic_textbook': {'budget_bytes': Value('int64'), 'cosmopedia': {'share': Value('float64'), 'dataset': Value('string')}, 'llm_generated': {'share': Value('float64'), 'model': Value('string')}}, 'code': {'budget_bytes': Value('int64'), 'codeparrot_clean': {'dataset': Value('string')}}, 'math': {'budget_bytes': Value('int64'), 'open_web_math': {'dataset': Value('string')}}, 'instruction': {'budget_bytes': Value('int64'), 'openhermes': {'share': Value('float64'), 'dataset': Value('string')}, 'ultrachat': {'share': Value('float64'), 'dataset': Value('string')}}}, 'llm_budget_bytes': Value('int64'), 'llm_model': 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.
SLM Pretraining Corpus
A curated English pretraining corpus for small language models: 1,131,717 documents,
~1.28 billion tokens (estimated), 5.36 GB uncompressed text delivered as a
1.87 GB zstd-compressed JSONL file. Every record carries a text, source,
category, id, and a token estimate, so you can filter, sample, or shard without
extra tooling.
The corpus mixes general web, synthetic textbooks, code, math, and instruction data in a deliberate ratio, built streaming-first from public sources on an 8 GB RAM machine.
Quickstart
pip install datasets
from datasets import load_dataset
# Full corpus, streamed (no full download to disk)
ds = load_dataset(
"json",
data_files="https://huggingface.co/datasets/salisai/slm-pretrain-corpus/resolve/main/final_corpus.jsonl.zst",
split="train",
streaming=True,
)
for doc in ds:
print(doc["category"], doc["source"], doc["token_est"])
break
Small and fast for prototyping — a 100-document preview file:
sample = load_dataset(
"json",
data_files="https://huggingface.co/datasets/salisai/slm-pretrain-corpus/resolve/main/sample_100.jsonl.zst",
split="train",
)
Filter by category before use:
code_docs = (doc for doc in ds if doc["category"] == "code")
Record format
One JSON object per line (zstd compressed), no nested structures:
| Field | Type | Description |
|---|---|---|
text |
string | The document content |
source |
string | Upstream source name, e.g. fineweb_edu |
category |
string | One of general_web, synthetic_textbook, code, math, instruction |
id |
string | Stable document id (<source>-<index>) |
token_est |
int | Token estimate, len(text) // 4 (no tokenizer needed) |
Contents
| Category | Documents | Tokens | Raw bytes | Share of docs | Share of tokens |
|---|---|---|---|---|---|
| general_web | 560,238 | 687,862,243 | 2.85 GB | 49.5% | 53.5% |
| instruction | 260,000 | 176,918,211 | 0.75 GB | 23.0% | 13.8% |
| synthetic_textbook | 197,079 | 180,359,022 | 0.75 GB | 17.4% | 14.0% |
| math | 64,000 | 120,535,235 | 0.50 GB | 5.7% | 9.4% |
| code | 50,400 | 119,133,903 | 0.50 GB | 4.5% | 9.3% |
| Total | 1,131,717 | 1,284,808,614 | 5.36 GB | 100% | 100% |
Per-source breakdown
| Source | Category | Documents | Tokens | Raw bytes |
|---|---|---|---|---|
| FineWeb-Edu (sample-10BT) | general_web | 409,600 | 484,127,502 | 2.00 GB |
| DCLM-baseline-1.0 | general_web | 150,638 | 203,734,741 | 0.84 GB |
| Cosmopedia | synthetic_textbook | 196,800 | 180,236,466 | 0.75 GB |
| DeepSeek-generated passages | synthetic_textbook | 279 | 122,556 | 0.5 MB |
| OpenHermes-2.5 | instruction | 196,800 | 85,980,200 | 0.37 GB |
| UltraChat-200k | instruction | 63,200 | 90,938,011 | 0.37 GB |
| OpenWebMath | math | 64,000 | 120,535,235 | 0.50 GB |
| CodeParrot-clean | code | 50,400 | 119,133,903 | 0.50 GB |
Upstream sources
| Source | Upstream dataset | Used for |
|---|---|---|
| FineWeb-Edu | HuggingFaceFW/fineweb-edu | general web (edu score >= 3.0) |
| DCLM-baseline | mlfoundations/dclm-baseline-1.0 | general web |
| Cosmopedia | HuggingFaceTB/cosmopedia | synthetic textbooks (8 configs) |
| DeepSeek-generated | deepseek-chat API | synthetic passages |
| OpenHermes | teknium/OpenHermes-2.5 | instruction / dialogue |
| UltraChat | HuggingFaceH4/ultrachat_200k | instruction / dialogue |
| OpenWebMath | open-web-math/open-web-math | math / reasoning |
| CodeParrot | codeparrot/codeparrot-clean | code |
Curation details
The corpus was produced by a streaming pipeline (load_dataset(..., streaming=True)),
so no source dataset was ever fully downloaded or held in memory:
- FineWeb-Edu filtered with an edu score cutoff of 3.0 (scale 0-5).
- Minimum document length of 200 characters (300 for instruction records).
- Dedup: on-disk Bloom filter (8,000,000 capacity, 0.0005 false-positive rate) over SHA1 of normalized text prefixes, removing near-duplicate web boilerplate between FineWeb and DCLM.
- Shuffling: bucket-based (256 zstd buckets, shuffled in RAM, concatenated).
- Build statistics: 1,999 seconds elapsed, 979.6 MB peak RAM, zstd level 3, no source skipped.
The full machine-readable build report is in dataset_manifest.json.
Files
| File | Size | Description |
|---|---|---|
final_corpus.jsonl.zst |
1.87 GB | The full corpus, shuffled, 1,131,717 records |
sample_100.jsonl.zst |
~140 KB | First 100 records for fast prototyping |
dataset_manifest.json |
6 KB | Sizes, per-category breakdown, dedup stats, config snapshot |
Licensing
This corpus is a mix of independently licensed public datasets. Each document retains the terms of its upstream source — see the links in the table above for the license of each component (e.g. FineWeb-Edu and DCLM are ODC-By, Cosmopedia, CodeParrot and UltraChat are Apache-2.0/MIT-family, OpenHermes-2.5 is MIT). This repository does not impose an additional license on the mixed corpus; verify the source licenses against your intended use before redistributing derivative works.
- Downloads last month
- 26