Datasets:
token_ids uint16 |
|---|
2,381 |
5,331 |
2,811 |
288 |
467 |
11,993 |
421 |
18,889 |
12 |
2,598 |
4,842 |
8,295 |
8,545 |
220 |
23 |
11 |
220 |
1,107 |
52,000 |
2,226 |
262 |
683 |
3,595 |
12,722 |
286 |
32,845 |
286 |
220 |
1,107 |
17,049 |
754 |
3,571 |
2,186 |
288 |
262 |
3,571 |
286 |
262 |
1,412 |
11 |
497 |
12,058 |
858 |
288 |
3,667 |
1,969 |
421 |
597 |
5,331 |
12,997 |
13 |
2,714 |
12,333 |
1,918 |
12,219 |
379 |
4,031 |
12 |
2,785 |
4,432 |
6,369 |
11 |
519 |
5,957 |
487 |
3,080 |
283 |
2,390 |
283 |
6,182 |
322 |
3,629 |
3,093 |
11 |
15,004 |
1,702 |
11,078 |
283 |
262 |
5,475 |
12,333 |
283 |
262 |
11,640 |
287 |
7,329 |
322 |
262 |
7,460 |
13 |
653 |
357 |
67 |
5,181 |
1,820 |
615 |
556 |
6,009 |
283 |
946 |
FineWeb Tokenized
What is it?
This is a pre-tokenized version of the HuggingFaceFW/fineweb dataset (currently in-progress, tokenization of the ~15 trillion tokens corpus is ongoing). The data is being pre-processed and tokenized using the AnisoleAI BPE tokenizer (52,022 vocabulary size) and packed into compact uint16 Parquet shards.
By distributing the pre-tokenized corpus, we eliminate the CPU and tokenization bottlenecks in pre-training pipelines. You can stream these shards directly into your training pipeline without any on-the-fly tokenization or preprocessing overhead.
How to download and use
You can load the tokenizer directly from this repository:
from tokenizers import Tokenizer
tokenizer = Tokenizer.from_pretrained("anisoleai/fineweb-tokenized")
Stream a shard with PyArrow
The most efficient way to use this dataset is to stream the Parquet files and read the token IDs directly as NumPy arrays:
import pyarrow.parquet as pq
import numpy as np
from huggingface_hub import hf_hub_download
# Download a single shard
path = hf_hub_download(
repo_id="anisoleai/fineweb-tokenized",
filename="data_1/shard-00000.parquet",
repo_type="dataset",
)
# Load the token IDs as a flat uint16 array
pf = pq.ParquetFile(path)
table = pf.read()
tokens = np.array(table["token_ids"].to_pylist(), dtype=np.uint16)
print(f"Loaded {len(tokens):,} tokens.")
Using Hugging Face datasets
To load a shard using the standard Hugging Face datasets library:
from datasets import load_dataset
ds = load_dataset(
"anisoleai/fineweb-tokenized",
data_files="data_1/shard-00000.parquet",
split="train",
)
print(ds[0])
# {'token_ids': [9906, 11, 1917, 0, 52002, ...]}
Dataset Structure
Data Format
Each Parquet file contains a single column:
| Column | dtype | Description |
|---|---|---|
token_ids |
uint16 |
Flat list of token IDs for all documents concatenated sequentially. An <EOS> token (ID 52002) marks the end of each document and acts as the boundary. |
The data is not padded. Each shard contains approximately 2 billion tokens (~4 GB raw, ~2.5 GB Snappy-compressed).
Shards are organized by worker directories:
data_1/shard-00000.parquet
data_1/shard-00001.parquet
...
data_2/shard-00000.parquet
...
Tokenizer Details
The tokenizer configuration is stored in tokenizer.json at the root of the repository.
- Vocabulary Size: 52,022
- Type: Byte-Pair Encoding (BPE)
- Special Tokens:
<EOS>(ID52002)
Credits & Attribution
This dataset is a tokenized derivative of FineWeb, created by Hugging Face:
Penedo, G., Kydlíček, H., allal, L. B., Lozhkov, A., Mitchell, M., Raffel, C., Von Werra, L., & Wolf, T. (2024).
FineWeb: decanting the web for the finest text data at scale.
arXiv preprint arXiv:2406.17557.
Processing and tokenization pipeline was built by AnisoleAI.
Citation
If you use this dataset, please cite the original FineWeb paper alongside this work:
@misc{anisoleai2026fineweb-tokenized,
title = {FineWeb Tokenized},
author = {AnisoleAI},
year = {2026},
howpublished = {Hugging Face Datasets},
url = {https://huggingface.co/datasets/anisoleai/fineweb-tokenized},
}
@misc{penedo2024fineweb,
title = {FineWeb: decanting the web for the finest text data at scale},
author = {Guilherme Penedo and Hynek Kydl{\'i}{\v{c}}ek and Loubna Ben allal
and Anton Lozhkov and Margaret Mitchell and Colin Raffel
and Leandro Von Werra and Thomas Wolf},
year = {2024},
eprint = {2406.17557},
archivePrefix = {arXiv},
primaryClass = {cs.NE},
}
- Downloads last month
- 59,850