--- license: other language: - pl tags: - text - polish - corpus - pretraining pretty_name: Fabryka Track Polish training mix size_categories: - n>1M --- # Fabryka Track Polish training mix (100 MB/source pack) This dataset is the verified corpus pack used by `track.fabryka.ai` for training-pipeline tests. It contains UTF-8 text samples plus one JSON metadata file per source and `catalog.json`. The bounded sources were materialized from fixed Hugging Face revisions. `bytes` in the catalog is the exact UTF-8 byte size; the current Track byte-token trainer counts one byte as one training token. This is a reproducible workflow pack, not a claim that each source is fully represented. HPLT and FineWeb2 are 100-document viewer samples; the other sources are bounded to approximately 100 MB each. ## Sources See `catalog.json` for revisions, upstream URLs, document counts, hashes, and sampling details. ## Files - `.txt`: concatenated UTF-8 text - `.json`: source metadata and exact SHA-256 - `catalog.json`: complete manifest ## Training table schema `data/train.jsonl` has one approximately 1 MB chunk per row and these columns: - `source_key`, `source_name`, `category` - `source_repo`, `source_revision`, `source_url` - `source_documents`, `source_bytes` - `chunk_index`, `chunk_bytes` - `text` Use `source_key` or `category` to build a weighted mixture. `chunk_bytes` is the exact UTF-8 size of the row and can be summed for accounting. ## Build your own mix Load the table, group by `source_key`, and sample rows with weights. This example gives Wikipedia 40%, EUR-Lex 30%, and literature 30%: ```python from datasets import load_dataset from collections import defaultdict import random ds = load_dataset("SlayerLab/fabryka-track-polish-mix", split="train", streaming=True) weights = {"wikipedia": .40, "eurlex": .30, "wolne_lektury": .15, "wikisource": .15} rows = ((r["text"], r["source_key"]) for r in ds if r["source_key"] in weights) by_source = defaultdict(list) for text, source in rows: by_source[source].append(text) mix = [] for source, weight in weights.items(): n = round(1000 * weight) mix.extend(random.choices(by_source[source], k=n)) random.shuffle(mix) ``` For a streaming pipeline, keep a per-source iterator and draw the next source with `random.choices(..., weights=...)`; this avoids materializing the full corpus. Use `chunk_bytes` to stop at an exact byte-token budget. ![Corpus size by source](source_sizes.png) ## What can this corpus train? The canonical expanded sources contain **655.4M UTF-8 byte tokens**. With the current byte-token trainer, a useful planning rule is: | Model size | 20:1 budget | Fit in this corpus? | |---:|---:|:---:| | 8M | 160M tokens | Yes | | 16M | 320M tokens | Yes | | 32M | 640M tokens | Barely; only ~2.4% remains | | 50M | 1B tokens | No | | 100M | 2B tokens | No | The 20:1 line is a Chinchilla-style planning heuristic, not a guarantee of model quality. This dataset uses bytes rather than a subword tokenizer, so the equivalent BPE-token count and the best training ratio will differ. ![Chinchilla-style scaling budget](scaling_budget.png) For a robust 32M run, target at least 800M–1B fresh tokens or allow a documented repeat factor. Larger models require more source text or a larger mix.