The Dataset Viewer has been disabled on this dataset.

NexteraBERT-data-mix

Pretokenized pretraining data for NexteraBERT-Mezzoforte-220M-en: 130B training tokens of English web text and code, tokenized with the ModernBERT tokenizer (answerdotai/ModernBERT-base, vocabulary 50,368).

Mix

Source Subset Share
FineWeb-Edu sample-350BT 90.25%
DCLM-baseline 1.0 — 4.75%
StarCoderData python 2%, java 1%, cpp 1%, javascript 1% 5%

All four shards use this mix.

Files

File Use Packing Tokens Size
data/mix_1024.bin phase 1 train one example per document, up to 1,024 tokens 120B ~240 GB
data/mix_eval_1024.bin phase 1 eval same 121M ~240 MB
data/mix_8192.bin phase 2 train fixed 8,192-token blocks 10B ~20 GB
data/mix_eval_8192.bin phase 2 eval same 10M ~20 MB
  • Tokens are stored as a flat uint16 array. Every document is written as [CLS] text [SEP] (ids 50281 / 50282; [PAD] is 50283). Documents longer than the limit are split into several such segments.
  • *.meta is a JSON file with dtype, max_seq_len and pad_token_id.
  • *_1024.bin has no padding. Its *.lens file (int64) gives the length of each example.
  • *_8192.bin packs several documents into each block. Each segment is padded with 1 to 8 [PAD] tokens to a multiple of 8, and the end of a block is also padded.
  • Each source's documents are split by index modulo 100: the train shards use buckets 0–98 and the eval shards use bucket 99, so no document is in both. mix_8192.bin reads the same sources again from the start, so its documents also appear in mix_1024.bin.

Usage

# all shards (~260 GB) into ./data; use --include "data/mix_eval_*" for the eval shards only
hf download RikkaBotan/NexteraBERT-data-mix --repo-type dataset --include "data/*" --local-dir .
import json
import numpy as np

path = "data/mix_eval_1024.bin"
meta = json.load(open(path + ".meta"))
tokens = np.memmap(path, dtype=meta["dtype"], mode="r")
offsets = np.concatenate([[0], np.cumsum(np.fromfile(path + ".lens", dtype=np.int64))])
first = tokens[offsets[0]:offsets[1]]  # [CLS] ... [SEP]

blocks = np.memmap("data/mix_eval_8192.bin", dtype="uint16", mode="r").reshape(-1, 8192)

License

This mix has no single license. Each part keeps the license and terms of its source: FineWeb-Edu (ODC-By 1.0), DCLM-baseline (CC BY 4.0), and StarCoderData (The Stack Terms of Use and the original license of each file).

🩵 About me 🩵

Japanese independent researcher having shy and pampered personality. Twin-tail hair is a charm point. Interested in nlp. Usually using python and C.

X(Twitter): https://twitter.com/peony__snow

RikkaBotan Logo

Downloads last month
37

Collection including RikkaBotan/NexteraBERT-data-mix

Article mentioning RikkaBotan/NexteraBERT-data-mix