Document offsets for train_bpe_8192.bin so SerializedDataset samples windows inside one story. int64, 2,717,701 entries: offsets[0]=0, a boundary after every eos (token 0), and offsets[-1]=542,716,836=len(bin); the final story has no trailing eos. Split on eos rather than the pickle's rows, which merge some adjacent stories.
Adds only train_gpt2_offsets.npy and valid_gpt2_offsets.npy. Int64 token-position boundaries include initial zero and the final sentinel, with each segment ending at GPT-2 EOS 50256. Token binaries are unchanged. Train: 8,009,770 segments; validation: 3,999. Full binaries matched pinned SHA-256 checksums, and no exact whole-segment train/validation duplicates were found. Near-duplicates and original source-document identities were not verified.
<name>_offsets.npy is int64, length n_spans+1; span d is data[off[d]:off[d+1]]
and ends in its own eos (gpt2 50256, bpe_32768 0). Enables doc-aware window
sampling so no training window straddles a document boundary.
Spans are EOS-delimited, which is not identical to the .pickle document list:
150 source documents contain a literal <|endoftext|> in their text, so the
valid set yields 59,059 spans where the pickle has 58,909 documents (0.25%).
Token counts match exactly and no tokens are left uncovered.
train 2,399,397 spans mean 1127.0 median 718 max 98,371 (gpt2)
valid 59,059 spans mean 1115.0 median 713 max 47,241 (gpt2)