AlmostNobody/Pronghorn-5M-v2-Fawn
Text Generation • Updated • 110
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.
taleweave-74m-4k is a pre-tokenized, 16-bit unsigned integer (uint16) narrative corpus engineered for training compact, sub-10M-parameter language models from scratch with zero runtime tokenization overhead. It interleaves stories from roneneldan/TinyStories and ajibawa-2023/Children-Stories-Collection under a shared 4,000-token Byte-Pair Encoding (BPE) vocabulary.
| Property | Specification |
|---|---|
Training Corpus (train.bin) |
74,000,000 token IDs (uint16, ~148.0 MB raw binary) |
Validation Split (val.bin) |
Held-out evaluation split (uint16), sampled prior to training stream |
Tokenizer (tokenizer_4k.json) |
Byte-Level BPE, vocab_size = 4000 |
| Special Tokens | `<|endoftext |
| Data Access Pattern | Flat contiguous token stream designed for np.memmap |
| Target Scale | Micro / tiny causal language models (~1M–10M parameters) |
Sub-10M-parameter language models face strict embedding bottlenecks and compute constraints:
np.memmap: Storing token IDs as flat uint16 arrays (2 bytes per token) allows fast, low-memory random window sampling across context lengths (block_size such as 128, 256, or 512) without loading full text corpora into RAM.150M vs. 1B total token updates) on identical architectures.roneneldan/TinyStories and ajibawa-2023/Children-Stories-Collection to form a dedicated val.bin split before assembling the training stream, preventing data leakage.<|endoftext|>, then serialized sequentially as little-endian uint16 token IDs up to the 74,000,000-token cap.import numpy as np
import torch
from tokenizers import Tokenizer
tokenizer = Tokenizer.from_file("tokenizer_4k.json")
train_data = np.memmap("train.bin", dtype=np.uint16, mode="r")
val_data = np.memmap("val.bin", dtype=np.uint16, mode="r")
def get_batch(split: str, block_size: int = 256, batch_size: int = 32, device: str = "cpu"):
data = train_data if split == "train" else val_data
max_start = len(data) - block_size - 1
ix = np.random.randint(0, max_start, size=(batch_size,))
x = np.stack([data[i : i + block_size].astype(np.int64) for i in ix])
y = np.stack([data[i + 1 : i + 1 + block_size].astype(np.int64) for i in ix])
return torch.from_numpy(x).to(device), torch.from_numpy(y).to(device)
xb, yb = get_batch("train", block_size=128, batch_size=4)
print("Batch shapes:", xb.shape, yb.shape)
print("Sample decode:\n", tokenizer.decode(xb[0].tolist()))