"A training record is a small object with a large blast radius."
Overview
Data format standards define the mathematical and engineering contract between raw examples and the training loop. In an LLM training run, data is not an inert pile of text; it is the empirical distribution that defines the examples, losses, risks, and capabilities the model will see.
This section is written as LaTeX Markdown. Inline mathematics uses $...$, and display
equations use `
`. The goal is to connect data engineering decisions to mathematical objects such as records , token sequences , filters , hashes , mixture weights , and empirical expectations.
The scope is deliberately narrow: this chapter owns the training-data pipeline. Tokenizer design, GPU training systems, benchmark methodology, alignment objectives, and production MLOps each have their own canonical chapters. Here we study the data objects that those later systems consume.
Prerequisites
Companion Notebooks
| Notebook | Description |
|---|---|
| theory.ipynb | Executable demonstrations for data format standards |
| exercises.ipynb | Graded practice for data format standards |
Learning Objectives
After completing this section, you will be able to:
- Define records, schemas, token streams, shards, and provenance identifiers
- Distinguish raw documents, pretraining records, SFT messages, and preference pairs
- Validate JSONL-style examples with deterministic type and key checks
- Explain when JSONL, Parquet, Arrow, or tokenized binary formats are appropriate
- Use stable hashes to identify records and preserve reproducibility
- Design metadata fields for source, license, language, quality, and split information
- Connect schema design to downstream loss computation and evaluation isolation
- Recognize format errors that silently change the training objective
Study Flow
- Read the pages in order and pause after each page to restate the main definition or theorem.
- Run
theory.ipynbwhen you want to check the formulas numerically. - Use
exercises.ipynbafter the reading path, not before it. - Return to this overview page when you need the chapter-level navigation.