--- license: other task_categories: - text-generation language: - en size_categories: - 1B "The World My is a test of the" ``` ## What's actually in each row Each row in the parquet files contains **one training window of exactly 2,048 tokens** under the column `input_ids`. That's roughly 1,500 words of English text per row, which is a standard context length for pretraining smaller GPT-style models. Rows are packed back-to-back from the original token stream, with documents separated by the special `<|endoftext|>` marker (token ID `50256`). So within a single row you might find the end of one Wikipedia article, the EOS token, and then the start of a web page — this is the standard "packed sequences" format used by nanoGPT, GPT-NeoX, Megatron, and basically every modern pretraining codebase. ## Where the text came from Stew-10B is a careful mix of three well-known English pretraining corpora, blended at the token level to hit exact proportions: | Source | Share | Tokens | What it is | |---|---|---|---| | [`wikimedia/wikipedia`](https://huggingface.co/datasets/wikimedia/wikipedia) (`20231101.en`) | 25% | 2.5B | Clean, encyclopedic English — the "high-quality" anchor | | [`openbmb/Ultra-FineWeb`](https://huggingface.co/datasets/openbmb/Ultra-FineWeb) (English split) | 50% | 5.0B | Filtered Common Crawl — broad coverage of the open web | | [`mlfoundations/dclm-baseline-1.0`](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0) | 25% | 2.5B | DataComp-LM baseline — aggressively filtered web text | The mix is designed to balance **quality** (Wikipedia), **diversity** (FineWeb), and **scale-trained signal** (DCLM) in roughly the proportions that have been shown to work well in recent small-model pretraining recipes. ## How to use it ### Option 1: Hugging Face `datasets` (easy mode) ```python from datasets import load_dataset ds = load_dataset("Monster-Code/Stew-10B-tokenized", split="train", streaming=True) for row in ds: tokens = row["input_ids"] # a list of 2048 integers # ...feed into your model break ``` Streaming is recommended because the full dataset is around 25 GB and you probably don't want all of it on disk at once. ### Option 2: Raw binary files (fast mode) If you're running something like nanoGPT and want zero-overhead access, there's a second copy of the data stored as raw `uint16` binary files under `data_bin/`. These are flat token streams you can memory-map directly: ```python import numpy as np from huggingface_hub import hf_hub_download path = hf_hub_download( "Monster-Code/Stew-10B-tokenized", "data_bin/train-00000-of-00020.bin", repo_type="dataset", ) tokens = np.memmap(path, dtype=np.uint16, mode="r") print(tokens.shape) # (500_000_000,) print(tokens[:16]) # first 16 token IDs ``` Each `.bin` file holds 500 million tokens (1 GB), and there are 20 of them. Concatenated in order, they reconstruct the full 10-billion-token stream. ## File layout ``` Monster-Code/Stew-10B-tokenized/ ├── data/ ← the parquet files (what `datasets` loads) │ ├── train-00000-of-00020.parquet │ ├── train-00001-of-00020.parquet │ └── ... (20 files total) └── data_bin/ ← same tokens as raw uint16 binary ├── train-00000-of-00020.bin ├── train-00001-of-00020.bin └── ... (20 files total) ``` Both folders contain the same tokens in the same order. Pick whichever format fits your pipeline. ## Technical details - **Tokenizer:** `gpt2` (the fast / Rust implementation from `tokenizers`) - **Vocabulary size:** 50,257 - **End-of-document marker:** `<|endoftext|>` (token ID `50256`), inserted after every document - **Sequence length (parquet):** 2,048 tokens per row - **Total tokens:** 10,000,000,000 (exact — enforced during the build) - **Total parquet rows:** approximately 4,882,812 - **Parquet schema:** `input_ids: fixed_size_list[2048]` - **Parquet compression:** zstd level 3 - **Binary format:** little-endian `uint16`, no header, no padding ## Licensing This dataset is a derivative work combining three upstream sources. **Each source retains its original license** — you are responsible for complying with all of them if you use this dataset: - **Wikipedia** → CC BY-SA 3.0 and GFDL ([details](https://huggingface.co/datasets/wikimedia/wikipedia)) - **Ultra-FineWeb** → see the [original dataset card](https://huggingface.co/datasets/openbmb/Ultra-FineWeb) - **DCLM-baseline** → see the [original dataset card](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0) No additional restrictions are imposed by this repository, but the dataset is marked `license: other` because the upstream licenses are mixed and you need to read them yourself before any downstream use. ## Citation If you use Stew-10B in research, please cite the three underlying datasets. This repository is a repackaging and does not claim original authorship of the text content.