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.

TT-TNT Corpus Recipe

This is a recipe, not a corpus. It contains pinned source revisions and deterministic scripts that reconstruct a ~400M-token English pretraining blend byte-for-byte, plus the provenance record from the build that produced it. No corpus text, tokenizer, or model weights are stored in this repository.

The blend is built for episod/tt-tnt (public), a hand-rolled, nanollama3-lineage, Llama-3-architecture language model trained with tt-metal's ttml trainer on Tenstorrent Blackhole hardware. The design goal is a small model with an oblique, observational voice -- closer to Fabre's insect notebooks or Fort's anomaly-collecting than to a chat assistant -- built out of nine licence-audited sources rather than one scraped dump.

Full source, including the training entrypoint, corpus pipeline, and every script named in this card, lives at github.com/tsingletaryTT/tt-tnt.

The recipe changed on 2026-08-14 -- read this before reproducing

If you built this corpus before 2026-08-14, your sha256 will not match the one recorded in this card, and that is expected -- you built a different (older) recipe, not a wrong one.

The blend previously carried zero document separators: scripts/prepare_corpus.py wrote each document as text + "\n\n", which spells a document boundary exactly the way a paragraph break inside a document is spelled, so nothing downstream could tell them apart. That was a regression against the older, TinyStories-only pipeline the currently-published model's predecessor used, which carried 662,878 separators. train/tokenization.py then encoded the corpus line-by-line and dropped blank lines, so those unmarked boundaries contributed zero tokens: the trained model never saw an end-of-document token at all, which is the documented cause of tt-tnt-v1's mid-generation topic drift and its failure to terminate cleanly.

The fix, landed the same day: scripts/prepare_corpus.py now terminates every document with a line holding exactly </s> (the trained tokenizer's eos token, id 2), scripts/blend_corpus.py closes each source's truncated final pass with the same separator so the nine source-to-source seams aren't unmarked transitions either, and train/corpus.py gained CorpusSource.rows_per_document (64 for poetry only) so the one source whose upstream row is a line of verse -- not a document -- doesn't fire an end-of-document token every ~7 words.

Why a recipe and not the data

The blend cannot be redistributed as one file. 46% of it is under 2 mutually incompatible share-alike (copyleft) licences:

  • tinystories -- 31% of the blend -- is CDLA-Sharing-1.0
  • wikipedia_simple -- 15% of the blend -- is CC-BY-SA-3.0

CDLA-Sharing-1.0 and CC-BY-SA-3.0 both require derivatives to be shared under their own terms; neither is compatible with being folded into a single file under the other's licence, or under any third licence. There is no legal way to concatenate them into one redistributable artifact. The source repository's own generated licensing document says it plainly: "We do not redistribute the corpus."

So this repository ships what actually can be shared: pinned dataset revisions, a deterministic blending script, and a recorded SHA-256 so that anyone with access to the (still separately licensed) upstream sources can reconstruct the exact same blend and verify it byte-for-byte.

What's in this repository

Copied as-is from a checkout of the tt-tnt code repository, directory structure preserved:

Path What it is
train/corpus.py The source registry -- one entry per source: HF repo, pinned revision, licence, target share, author/bookshelf selectors, repetition factor, and (for poetry only) how many consecutive rows make up one document. This is the payload; everything else operates on it.
scripts/fetch_corpus.py Downloads each source at its pinned revision.
scripts/prepare_corpus.py Cleans and normalises fetched text (e.g. strips Project Gutenberg header/footer boilerplate) and terminates every document with a </s> separator.
scripts/measure_corpus.py Measures real per-source token availability against the trained tokenizer; writes the availability report the shares are settled against.
scripts/blend_corpus.py Deterministically assembles the final blend from prepared sources and the availability report, closing each source's truncated tail with a separator; writes blend.txt and both provenance manifests.
scripts/check_disk_space.py Preflight check -- refuses to start a fetch if the volume doesn't have room.
docs/corpus_licensing.md Per-source licence table, generated from train/corpus.py by the code repo's scripts/render_licensing.py (not included here -- this is its output, not the generator).
docs/corpus_blend.md The provenance narrative: what the last real build actually produced, source by source, the document-boundary accounting, and why real repetition differs from the declared upsample ceiling.
docs/measurements/blend_manifest.json The machine-readable provenance record written by blend_corpus.py itself: per-source emitted tokens, achieved share, repetition factor, and the blend's SHA-256.

These scripts are not standalone. fetch_corpus.py, prepare_corpus.py, measure_corpus.py, and blend_corpus.py import train.paths and (in fetch_corpus.py's case) scripts.build_gutenberg_catalogue from the code repository -- neither is duplicated here. To actually run them, clone the tt-tnt code repository and either drop these files into place at the same relative paths or run them from that checkout directly.

The headline number

399,508,203 tokens against a 400,000,000 token budget -- 491,797 short, -0.123%.

This is the sum of nine separate tokenizer calls, one per source, each over that source's own emitted text (see "Honest measurements" below for the second, different count of the same blend). blend.txt SHA-256 24f3d112e04696630ff6553dbd9440ce77b54a54204b17b589ee2ec4cfc9f4d1.

The share table

Source Slice Target share Licence Pinned revision Declared upsample Achieved share Real repetition
tinystories backbone 31% CDLA-Sharing-1.0 (share-alike) f54c09fd23315a6f9c86f9dc80f725de7d8f9c64 1x 31.046% 0.2768x
gutenberg_children backbone 15% MIT (packaging); public domain (texts) 28973b04f28fd7be4a6186a042bc26159d4366ca 2x 15.014% 1.7516x
wikipedia_simple grounding 15% CC-BY-SA-3.0 (share-alike) b04c8d1ceb2f5cd4588862100d08de323dccfbaa 1x 14.918% 0.8763x
spine spine 13.5% MIT (packaging); public domain (texts) 28973b04f28fd7be4a6186a042bc26159d4366ca 3x 13.495% 2.061x
procedural agentic 12% MIT (packaging); public domain (texts) 28973b04f28fd7be4a6186a042bc26159d4366ca 4x 12.013% 3.9109x
folklore folklore 8% MIT (packaging); public domain (texts) 28973b04f28fd7be4a6186a042bc26159d4366ca 2x 8.029% 1.5041x
weird weird 4% MIT (packaging); public domain (texts) 28973b04f28fd7be4a6186a042bc26159d4366ca 3x 3.999% 2.2724x
poetry weird 1% CC0-1.0 fcd42e249fed48dbd1d3b9b969528ef9298d3464 1x 0.989% 0.1305x
flavour flavour 0.5% MIT (packaging); public domain (texts) 28973b04f28fd7be4a6186a042bc26159d4366ca 4x 0.496% 3.4759x

"Real repetition" is the fraction of a source's available text actually used (emitted_tokens / available_tokens), and it is not the same as upsample: upsample in the registry is a ceiling enforced by measure_corpus.py's availability gate, not a claim about how much repetition is applied.

Honest measurements

Two token counts exist for this corpus. Both are real and directly verifiable, and neither corrects the other -- they measure two different things.

399,508,203 tokens is in docs/measurements/blend_manifest.json, written by the blend build itself. It is the sum of nine separate tokenizer calls, one per source, each over that source's own emitted text, chunked into paragraphs exactly the way scripts/measure_corpus.py chunks a source file for its availability check.

391,921,555 tokens (352,729,403 train / 39,192,152 validation, of which 798,771 are the </s> document separator) is what one tokenizer call over the finished, concatenated blend.txt actually produces -- the number train/tokenization.py writes out and the number a training run over this revision would actually read.

Why they differ: BPE merges do not cross an encode() call, so tokenizing nine chunks separately and tokenizing their concatenation as one string can legitimately merge a different set of byte pairs at every chunk boundary -- millions of them (measure_corpus.py splits on every paragraph break, not just the eight source-to-source seams), each one a place a merge can differ between the two measurements.

The gap is 7,586,648 tokens, or 1.90% of the manifest total. Use 399,508,203 for per-source blend provenance (how the blend was assembled); use 391,921,555 / 352,729,403 / 39,192,152 for what a training run over this revision actually consumes.

Licensing, stated honestly

Per-source licences (also in docs/corpus_licensing.md, generated from the registry so it cannot drift from the code that defines it):

  • tinystories (31%) -- CDLA-Sharing-1.0, share-alike.
  • gutenberg_children (15%) -- MIT (packaging); public domain (texts).
  • wikipedia_simple (15%) -- CC-BY-SA-3.0, share-alike.
  • spine (13.5%) -- MIT (packaging); public domain (texts).
  • procedural (12%) -- MIT (packaging); public domain (texts).
  • folklore (8%) -- MIT (packaging); public domain (texts).
  • weird (4%) -- MIT (packaging); public domain (texts).
  • poetry (1%) -- CC0-1.0.
  • flavour (0.5%) -- MIT (packaging); public domain (texts).

The share-alike sources (tinystories, wikipedia_simple) are why this repo exists in its current form. Whether model weights trained on share-alike data constitute a Data Derivative under CDLA-Sharing-1.0 or CC-BY-SA-3.0 is unsettled law and practice. This project does not assert that trained weights escape those obligations. Anyone publishing weights trained with this recipe should reach their own conclusion rather than inherit this one. This is a stated position, not legal advice.

Project Gutenberg material is public domain as text; the aggregation datasets we fetch it through carry their own separate, permissive terms (recorded per-source above).

Reproduction

Requires a checkout of the tt-tnt code repository (these files are copies of what lives there at specific paths) with its Python dependencies installed. From the repo root:

python scripts/check_disk_space.py     # refuses to start if the volume is too full
python scripts/fetch_corpus.py         # downloads each source at its pinned revision
python scripts/prepare_corpus.py       # cleans/normalises fetched text, adds </s> boundaries
python scripts/measure_corpus.py       # -> docs/measurements/corpus_availability.json
python scripts/blend_corpus.py         # -> artifacts/corpus/blend.txt + both manifests

The blend is deterministic: same pinned sources, same availability report, same bytes, same SHA-256, every time. Verify a reconstruction against the recorded checksum:

sha256sum artifacts/corpus/blend.txt
# expected: 24f3d112e04696630ff6553dbd9440ce77b54a54204b17b589ee2ec4cfc9f4d1

Known limitations

These are documented plainly in the source repository, not smoothed over:

  • flavour sits close to its arithmetic ceiling. It draws from only 7 books (Stein and Legge's I Ching translation) and its measured availability yields a hard ceiling close to its 0.5% target share -- about 0.075 percentage points of headroom. A further ~13% drop in measured availability would put even 0.5% out of reach at the current 4x repetition cap.
  • spine and weird share exactly one book. Gutenberg text 30092, a 14-contributor anthology, is matched independently by a spine author (Hudson, W. H.) and a weird author (Blackwood, Algernon) -- the same underlying text can surface in both slices.
  • Charles Fort has exactly one book in the source dataset (sedthh/gutenberg_english) despite being a design anchor for the spine slice's observational-mystical voice.
  • The shipped tokenizer was trained on an earlier revision of this blend. There's a circular dependency: tokenizer -> per-source token availability -> settled shares -> blend -> tokenizer. Availability has to be measured in tokens, which needs a tokenizer; shares are settled against that availability; the blend realizes the shares; and retraining the tokenizer on the resulting blend would change availability again. The loop doesn't converge on its own, so it's deliberately cut: the shipped tokenizer reflects a slightly earlier state of the registry than the blend described in this card. This is called out in docs/corpus_blend.md as known and accepted, with the measured cost bounded. The document-separator fix does not deepen this limitation: </s> was already in the tokenizer's vocabulary as a special token, so the new separators encode to exactly one id each with no retrain required to represent them.

Link to the model

episod/tt-tnt (public) is the model this corpus recipe supports: a hand-rolled, nanollama3-lineage, Llama-3-architecture language model -- RoPE, RMSNorm, SwiGLU, grouped-query attention -- trained from random initialization with tt-metal's ttml trainer on Tenstorrent Blackhole hardware. See the model card there for the full training record and an honest evaluation of the result.

Link to the code

github.com/tsingletaryTT/tt-tnt is the source repository this recipe is copied out of -- training entrypoint, corpus pipeline, packaging, and the full documented build, including the dead ends.

Downloads last month
45

Models trained or fine-tuned on episod/tt-tnt-corpus