Datasets:
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.
Swahili Pretraining Corpus (tokenized)
The pre-training corpus used to train Benjamin-png/swahili-gpt-71m
from scratch — ~2.15 billion tokens of real Swahili text, already tokenized
and ready for language-model training.
Contents
| File | What it is |
|---|---|
train.bin |
Training tokens — a flat uint16 array of token IDs (~2.15B tokens, ~4.3 GB) |
val.bin |
Held-out validation tokens (same format) |
swahili_tokenizer.model |
The SentencePiece tokenizer (32k vocab, byte_fallback) used to produce the IDs |
meta.json |
Token counts, vocab size, dtype, and the list of sources |
How to read it
import numpy as np, sentencepiece as spm
data = np.memmap("train.bin", dtype=np.uint16, mode="r") # token IDs
sp = spm.SentencePieceProcessor(); sp.load("swahili_tokenizer.model")
print(sp.decode(data[:50].tolist())) # peek at the text
The IDs correspond only to the included tokenizer (vocab 32000). The tokenizer
was trained on 30M cased sentences, with byte_fallback=True so it never emits
<unk> (handles capitalization, proper nouns, and arbitrary characters).
Sources & attribution
This is a derivative, tokenized blend. Full credit to the original corpora:
- Inkuba-Mono-Swahili (Alfaxad) — the bulk of the data.
- Mendeley Swahili Corpus (CC BY 4.0).
- A locally-cleaned Swahili corpus.
meta.json lists the sources included (sources_done).
Why publish the tokenized form?
Sharing the exact train.bin + tokenizer makes the 71M model's training fully
reproducible — anyone can train on the identical token stream. To rebuild from
the raw sources instead, see build_corpus_bin.py in the
project repo.
License
CC BY-4.0, matching the source corpora. Please keep attribution.
- Downloads last month
- 208