Datasets:
Update README: parquet now primary, bin archived to data_bin/
Browse files
README.md
CHANGED
|
@@ -6,21 +6,58 @@ language:
|
|
| 6 |
- en
|
| 7 |
size_categories:
|
| 8 |
- 1B<n<10B
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# Stew-10B
|
| 12 |
|
| 13 |
-
10,000,000,000 GPT-2 tokens
|
| 14 |
-
|
| 15 |
-
(~1 GB) each. Every document is followed by `<|endoftext|>` (id 50256).
|
| 16 |
|
| 17 |
-
|
|
| 18 |
-
|---|---|---|---|
|
| 19 |
-
|
|
| 20 |
-
|
|
| 21 |
-
| mlfoundations/dclm-baseline-1.0 | - | 25% | 2,500,000,000 |
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
```python
|
| 26 |
import numpy as np
|
|
@@ -28,11 +65,25 @@ from huggingface_hub import hf_hub_download
|
|
| 28 |
|
| 29 |
path = hf_hub_download(
|
| 30 |
"wonder-ai/Stew-10B",
|
| 31 |
-
"
|
| 32 |
repo_type="dataset",
|
| 33 |
)
|
| 34 |
tokens = np.memmap(path, dtype=np.uint16, mode="r")
|
| 35 |
print(tokens.shape, tokens[:16])
|
| 36 |
```
|
| 37 |
|
| 38 |
-
Each
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- en
|
| 7 |
size_categories:
|
| 8 |
- 1B<n<10B
|
| 9 |
+
pretty_name: Stew-10B
|
| 10 |
+
tags:
|
| 11 |
+
- pretraining
|
| 12 |
+
- gpt2
|
| 13 |
+
- tokenized
|
| 14 |
+
configs:
|
| 15 |
+
- config_name: default
|
| 16 |
+
data_files:
|
| 17 |
+
- split: train
|
| 18 |
+
path: data/*.parquet
|
| 19 |
---
|
| 20 |
|
| 21 |
# Stew-10B
|
| 22 |
|
| 23 |
+
**10,000,000,000 GPT-2 tokens** pre-tokenized and packaged for language-model
|
| 24 |
+
pretraining. Available in **two formats** in this repo:
|
|
|
|
| 25 |
|
| 26 |
+
| Format | Location | Size | Rows | Best for |
|
| 27 |
+
|---|---|---|---|---|
|
| 28 |
+
| **Parquet** (primary) | `data/*.parquet` | 14.55 GB | 4,882,800 | HF `datasets`, streaming, dataset viewer |
|
| 29 |
+
| **Raw uint16 binary** | `data_bin/*.bin` | 18.63 GB | — | nanoGPT-style training, zero-copy `memmap` |
|
|
|
|
| 30 |
|
| 31 |
+
Both formats contain the exact same token stream — the parquet files are a
|
| 32 |
+
re-packaging of the `.bin` shards into fixed-length token windows of **2048 tokens** per row.
|
| 33 |
+
|
| 34 |
+
## Mixture (10B tokens)
|
| 35 |
+
|
| 36 |
+
| Source | Config | Share |
|
| 37 |
+
|---|---|---|
|
| 38 |
+
| `wikimedia/wikipedia` | `20231101.en` | 25% (2.5B) |
|
| 39 |
+
| `openbmb/Ultra-FineWeb` | `en` | 50% (5.0B) |
|
| 40 |
+
| `mlfoundations/dclm-baseline-1.0` | — | 25% (2.5B) |
|
| 41 |
+
|
| 42 |
+
- Tokenizer: `gpt2` (fast / Rust BPE), vocab size 50257
|
| 43 |
+
- Every document is terminated with `<|endoftext|>` (token id `50256`)
|
| 44 |
+
- 20 shards, named `train-XXXXX-of-00020.{parquet,bin}`
|
| 45 |
+
|
| 46 |
+
## Loading — Parquet (recommended)
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from datasets import load_dataset
|
| 50 |
+
|
| 51 |
+
ds = load_dataset("wonder-ai/Stew-10B", split="train", streaming=True)
|
| 52 |
+
for ex in ds:
|
| 53 |
+
tokens = ex["input_ids"] # list of 2048 ints
|
| 54 |
+
break
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
Schema:
|
| 58 |
+
- `input_ids`: `fixed_size_list<int32>[2048]` — one training window per row
|
| 59 |
+
|
| 60 |
+
## Loading — Raw binary (fastest for training)
|
| 61 |
|
| 62 |
```python
|
| 63 |
import numpy as np
|
|
|
|
| 65 |
|
| 66 |
path = hf_hub_download(
|
| 67 |
"wonder-ai/Stew-10B",
|
| 68 |
+
"data_bin/train-00000-of-00020.bin",
|
| 69 |
repo_type="dataset",
|
| 70 |
)
|
| 71 |
tokens = np.memmap(path, dtype=np.uint16, mode="r")
|
| 72 |
print(tokens.shape, tokens[:16])
|
| 73 |
```
|
| 74 |
|
| 75 |
+
Each `.bin` is a flat little-endian `uint16` stream; the full set reconstructs
|
| 76 |
+
to 10,000,000,000 tokens in order.
|
| 77 |
+
|
| 78 |
+
## Reconstruction note
|
| 79 |
+
|
| 80 |
+
The parquet files were generated from the `.bin` files by reshaping the token stream into 2048-token rows (any trailing tokens that did not fill a full row were dropped per shard).
|
| 81 |
+
Document boundaries are preserved in both formats via the EOS token.
|
| 82 |
+
|
| 83 |
+
## Licensing
|
| 84 |
+
|
| 85 |
+
Each source retains the licensing of its upstream dataset. Please consult the
|
| 86 |
+
original dataset cards before use:
|
| 87 |
+
- Wikipedia: CC BY-SA 3.0 / GFDL
|
| 88 |
+
- Ultra-FineWeb: see `openbmb/Ultra-FineWeb`
|
| 89 |
+
- DCLM: see `mlfoundations/dclm-baseline-1.0`
|