Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

FineWeb Tokenized

FineWeb Tokenized: Pre-tokenized version of the FineWeb dataset by AnisoleAI
> 4 trillion tokens of the pre-tokenized data the 🌐 web has to offer

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> (ID 52002)

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
6,327,108

Paper for anisoleai/fineweb-tokenized