Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

FineWeb 10BT, tokenized with a two-phase 50,304-token SuperBPE vocabulary (GPT-2 split pattern)

All of HuggingFaceFW/fineweb sample-10BT, pre-tokenized in the binary shard format used by modded-nanogpt, with a custom SuperBPE vocabulary trained with BatchBPE (v2) on the same corpus.

This is the text modded-nanogpt trains on, and phase 1 of the vocabulary uses GPT-2's split pattern, the pattern of modded-nanogpt's own GPT-2 tokens (kjj0/fineweb10B-gpt2). A run on this dataset therefore differs from the modded-nanogpt baseline only in the vocabulary.

See also the FineWeb-Edu datasets built the same way, which compare phase-1 digit-splitting rules: alexandermorgan/fineweb-edu10B-superbpe50304-3digit and alexandermorgan/fineweb-edu10B-superbpe50304-nodigitsplit.

Source documents 14,868,862 (every document in sample-10BT)
Total tokens 8,110,155,862
Validation fineweb_val_000000.bin, the first 100,000,000 tokens
Training fineweb_train_000001.bin … fineweb_train_000081.bin, 100,000,000 tokens each except the last (10,155,862)
Vocabulary size 50,304 (50,303 merges/bytes + <|endoftext|>)
Document separator <|endoftext|> = 50303, prefixed to every document
Compression ≈5.70 bytes/token (all documents, separators excluded)

Using it with modded-nanogpt

  1. In data/cached_fineweb10B.py, change the repo id:
    hf_hub_download(repo_id="alexandermorgan/fineweb10B-superbpe50304-gpt2split", ...)
    
    File names and the data/fineweb10B/ destination are the same as the GPT-2 original, so the training and validation file paths need no change.
  2. Download at most 81 training chunks, e.g. python data/cached_fineweb10B.py 9. The script's default of 103 chunks will fail on chunk 82, which does not exist.
  3. Set BOS_ID = 50303 (in train_gpt.py, or track_1_short/data.py in recent versions). modded-nanogpt hard-codes GPT-2's <|endoftext|> id (50256); in this vocabulary 50256 is the ordinary token '.\nZ'.

GPT(vocab_size=50257) is padded to 50,304, so every id here (0–50303) fits.

Validation loss is not comparable to GPT-2 runs

Per-token cross-entropy depends on the tokenizer. This vocabulary puts more text in each token than GPT-2 does, so the same number of validation tokens also covers more text. To compare runs that use different vocabularies, convert to bits per byte: val_loss × (val tokens / val UTF-8 bytes) / ln 2, using the same validation text for every vocabulary.

Shard format

int32[256] header
    header[0] = 20240520   # magic
    header[1] = 1          # version
    header[2] = ntok
uint16[ntok] tokens

Documents are concatenated in stream order, each prefixed with <|endoftext|> (50303). As in modded-nanogpt's own fineweb.py, a document that does not fit in a shard continues at the start of the next one, so training shards do not begin with 50303.

Tokenizer

File What it is
superbpe_50304.tiktoken 50,303 mergeable ranks (ids 0–50302), base64 + rank. This is exactly what the shards were encoded with.
superbpe_50304_config.json pat_str, the phase-1 split pattern, the special token and the SuperBPE transition id.
models/FW10B_superbpe_gpt2_split_size_50304_freq_cutoff_64_2026-10-01.model The BatchBPE model, with <|endoftext|> = 50303. Load it with BatchTokenizer(pattern=None).load(...).
04_upload_superbpe_fineweb_dataset.py The script that made and uploaded this dataset.
import tiktoken
from tiktoken.load import load_tiktoken_bpe
enc = tiktoken.Encoding(name="superbpe_50304", pat_str=r"[\s\S]+",
                        mergeable_ranks=load_tiktoken_bpe("superbpe_50304.tiktoken"),
                        special_tokens={"<|endoftext|>": 50303})

Use this encoding with the same document splitting as 04_upload_superbpe_fineweb_dataset.py (split_doc: split at blank lines, then cut paragraphs longer than 8,192 characters at a space). pat_str=r"[\s\S]+" means tiktoken itself does no pretokenization.

Reclaimed dead bytes. The 13 byte values that cannot occur in well-formed UTF-8 (0xC0, 0xC1, 0xF5–0xFF) have no single-byte tokens. Their ids (192, 193, 245–255) hold the first 13 learned merges instead. The base alphabet is 243 bytes, with id == byte value.

SuperBPE. Tokens 0–45,297 never cross a GPT-2 pretokenization boundary. Tokens 45,298–50,302 (5,005 of them) are learned without word boundaries, and 4,210 of them span whitespace. That is why encoding must not pretokenize at word boundaries: a standard split pattern would make most of those tokens unreachable.

How the vocabulary was built

  1. Phase 1, ordinary BPE, 243 → 45,298 tokens (90%). Trained with BatchBPE on FineWeb sample-10BT with a freq_cutoff of 64, using GPT-2's split pattern (tiktoken writes this regex differently, but the two split text identically):
    '(?:[sdmt]|ll|ve|re)| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+
    
    freq_cutoff drops every pretokenized chunk that occurs fewer than 64 times in the dataset from the first wave of merges. A token for such a chunk can still be created in the second wave.
  2. Phase 2, SuperBPE, 45,298 → 50,303. Every document was first encoded with the phase-1 vocabulary under the phase-1 split pattern and flattened into one sequence of token ids. Merges then continued on those ids with no boundaries at all (BatchBPE pattern=None), up to 50,303 tokens. <|endoftext|> was then appended as 50303.

License

Inherits ODC-By v1.0 from FineWeb.

Downloads last month
151