Lecture 11 · Synthetic Data for Pre-Training

Scalable AI: Bridging Theory, Understanding, and Practice · Lecture 11。个人学习讲义与配套实验,按主题整理并持续修订。

课程源码 ZIP ↓

个人整理的学习笔记,非官方讲义;课程来源与整理说明见课程介绍。配套示例未逐一运行验证。

本篇目录

Maps to: UC Berkeley EE 290/194 Scalable AI, Spring 2026 Lecture 11, Synthetic Data Powering Pre-Training (NVIDIA guest lecture by Eric W. Tramel, slides lecture_11a.pdf), with Part B, NeMo Data Designer 101 (lecture_11b.pdf). Also drawn on: Fall 2026 Lecture 9 §4, Synthetic data: generating, distilling, and rephrasing. Recommended reading (as cited on the slides): WRAP, Rephrasing the Web (arXiv:2401.16380); BeyondWeb (arXiv:2508.10975); Nemotron-CC (arXiv:2412.02595); Kang et al., Demystifying Synthetic Data in LLM Pre-training (arXiv:2510.01631); Shumailov et al., AI models collapse when trained on recursively generated data (Nature 2024); Gerstgrasser et al., Is Model Collapse Inevitable? (arXiv:2404.01413); phi-1.5 (arXiv:2309.05463); Gudibande et al., The False Promise of Imitating Proprietary LLMs (arXiv:2305.15717); NeMo Data Designer (github.com/NVIDIA-NeMo/DataDesigner). Code: code/lecture11/ contains synth.py (a rephraser, a textbook generator, sampling, verifiers, diversity metrics, a manifest, a word n-gram model) and six demos. They are built on Lecture 9’s Atlas World and training stack, so every synthetic token can be checked against the truth. Reading time: ~2 hours for the prose; ~8 minutes to run all demos.


0. How to read this lecture

0.1 Learning goals

After this lecture you should be able to:

  1. Make the economic case. Explain why token demand is structural (inference-heavy economics, overtraining, MoE), when runs catch up with the stock of human text, and why generation costs a small fraction of training.
  2. Choose a method. Distinguish generating from seed prompts, distillation and rephrasing, and say what sets each one’s coverage.
  3. Explain why rephrasing works and when it does not. It is a multiplier on scarce real data; style diversity matters more than volume; one style can fail outright (the reversal effect); and it does not replace plentiful real data.
  4. Run quality control. Know what temperature trades away, why verifiers beat model judges, how to catch regurgitation and contamination, and what a manifest must pin for reproducibility.
  5. Explain model collapse. Describe the mechanism (rare events under-sampled, tails lost, distribution narrows), why real data must stay in the mix, and why practice (adding synthetic data to real data) does not collapse.

0.2 Prerequisites and scope

  • Prerequisites: Lecture 9 (Atlas World, pretrain.py, fact probes, bits per byte); Lecture 10 (data-constrained scaling, filtering, dedup, decontamination).
  • Scope: the data wall; the three ways to make data with a model; rephrasing (WRAP, Nemotron-CC, BeyondWeb); synthetic textbooks (phi); distillation (logit and sequence-level; imitation); synthetic code and reasoning in pre-training; quality control, diversity and reproducibility (NeMo Data Designer); model collapse.
  • Not in scope today: synthetic data for post-training (SFT pipelines, RL environments; Lectures 16–17), although Data Designer reappears there.

0.3 Section → code map

SectionIdeaCode in code/lecture11/
§1tokens per parameter, the stock of text, the cost model01_why_synthetic.py
§2generate, distill, rephrase; the toolssynth.py
§3rephrasing under a data constraint; diversity vs volume02_rephrasing.py
§4textbooks from seed topics vs rephrased web03_textbooks_and_coverage.py
§5logit and sequence-level distillation; targeted imitation04_distillation.py
§6temperature, verifiers vs judges, regurgitation, manifests05_quality_and_diversity.py
§7model collapse (Gaussian; n-gram generations)06_model_collapse.py

0.4 Notation

  • PtrainP_{train}, DtrainD_{train} = trained model parameters and tokens.
  • PgenP_{gen}, DgenD_{gen} = generator parameters and generated tokens.
  • Real = human-written text.
  • Synthetic = model-generated text.
  • Page form = the template Atlas World states facts in (“the capital of X is Y .”).

1. Why synthetic data: the data wall

1.1 Is pre-training over?

The guest lecture opens with two quotes:

  • Sutskever (December 2024): “Pre-training as we know it will unquestionably end … because we have but one internet.”
  • Vinyals (November 2025), on a large jump between Gemini generations: “No walls in sight!”

Both can be true. Pre-training on web text alone hits a limit; pre-training itself is being transformed.

1.2 The pressure on data is structural

Three forces push token counts up:

  1. Inference cost dominates training. A model is trained once and served billions of times, so a smaller model trained on more data is cheaper overall (Sardana et al.).
  2. Overtraining laws hold. Gadre et al. found scaling predictions accurate up to 640× Chinchilla, with 0.7% relative error.
  3. Repetition hurts. About 4 epochs degrades dense models and about 2 degrades MoE models (Lecture 10 §3.1), so you need novel tokens, not more passes.

MoE makes it worse. Sparse MoE models are more prone to overfitting than dense ones (Fedus; Zoph). Under balanced routing, each expert sees about 1/E1/E of the training tokens, so repeats hit harder. MoE data needs scale with total parameters, not active ones (Ludziejewski; Zhao). The slide’s fit across industry models is D≈614 Nactive≈36 NtotalD \approx 614\,N_{active} \approx 36\,N_{total}. Demo 01 shows the same pattern:

modeltotalactivetokenstokens / activetokens / total
Llama 3.1 405B (dense)405B405B15.6T3939
DeepSeek-V3671B37B14.8T40022
Kimi K21.04T32B15.5T48415
Qwen3-235B-A22B235B22B36T1,636153

The stock. Public human text is about 300T tokens (Villalobos et al.). At 2.2× more tokens per year from a 15T run in 2024, one run equals the whole stock after 3.8 years, around 2028 (demo 01).

1.3 The synthetic lever and its cost

If human tokens grow scarcer while inference grows cheaper, there are two options: stop scaling data, or generate more of it. The total compute of a synthetic recipe is

Ctotal=6 PtrainDtrain⏟training+2 PgenDgen⏟generation.C_{total} = \underbrace{6\,P_{train} D_{train}}_{\text{training}} + \underbrace{2\,P_{gen} D_{gen}}_{\text{generation}}.

BeyondWeb matched RedPajama’s accuracy at 180B tokens with only 23.2B training tokens (reported; demo 01 checks the arithmetic):

recipegeneratorgen FLOPstrain FLOPstotalvs RedPajama
RedPajama, real only—08.64e218.64e21100%
BeyondWeb8B3.71e201.11e211.48e2117.2%
BeyondWeb3B1.39e201.11e211.25e2114.5%

Nemotron-CC generated 1.9T tokens with a 12B model, 4.6×10224.6 \times 10^{22} FLOPs, against 3.0×10233.0 \times 10^{23} for training an 8B model on 6.3T tokens. Generation was about 15% of training.

The price is falling. The slide’s estimates of cost per billion synthetic tokens (GPU rental held at about $2.50–3.00/hour):

  • H100 (FP8): $14–35;
  • B200 (NVFP4): $0.75–3.70;
  • the generation after (est. 2028): $0.08–0.40.

That is roughly 10× cheaper per GPU generation. The tempting conclusion is the slide’s straw man: push 5T tokens through a prompt 100 times for less than $100K and scale to 15T parameters. The rest of the lecture is about why that fails, and what works instead.


2. Three ways to make training data with a model

methodinput → outputwhat sets coverage
generateseed topics or prompts → LLM → new documentsthe seed prompts
distillprompts or pre-training text → teacher → outputs or next-token probabilitiesthe prompts, or the text the teacher scores
rephraseweb page + style → LLM → same facts, new formthe web

Generated and distilled data can only teach what the prompts ask about. Rephrased data inherits the web’s coverage.

The guest lecture’s history makes the same point:

  • The Phi series constructed knowledge from scratch: phi-1 (1.3B, about 7B synthetic textbook tokens, 50.6% HumanEval), phi-2 (about 250B tokens), phi-4 (14B, about 40% synthetic, about 400B tokens).
  • Cosmopedia, a community replication, reached 25B tokens.
  • The scaling problem. That trajectory is impressive but orders of magnitude short of the O(10T)O(10\text{T}) frontier models need. Enumerating “things a model should know” is unbounded and misses capabilities “tacitly expected” by users (Langlais), and later Phi versions went back to mixing in web data.
  • The key insight: the web already has the knowledge and the long tail. The problem is presentation and reinforcement, so repackage the knowledge instead of constructing it.

synth.py implements all three methods on Atlas World:

  • rephrase parses a document into facts, prose, sums and code. It re-states each fact in one of 8 templates (“the capital of X is Y .”, “Y is the capital of X .”, “question : what is the capital of X ? answer : Y .”, …), re-renders sums, and varies the order. Facts stay correct by construction.
  • textbook_docs writes fact-dense “lessons” about a given list of seed countries only.
  • sample_lm generates from a trained model, which makes real mistakes; verify catches them.

3. Rephrasing: transform, don’t replace

3.1 What the evidence says

The slide’s example: “In 2019, California generated about 285 TWh of electricity, with solar contributing nearly one-fifth of total generation.” becomes “California’s grid produced roughly 285 terawatt-hours in 2019, and solar power supplied close to 20% of that output.” The wording and structure change; state, year, amount and share are preserved.

The evidence:

  • WRAP (Maini et al.) rephrased C4 into 4 styles with Mistral-7B and got about a 3× training speedup: 85B rephrased tokens matched 300B real-only tokens.
  • It scales. There is no need to enumerate topics, small models work, and it parallelizes.
  • Nemotron-CC: 6.3T tokens, 1.9T of them synthetic, with quality-conditioned rephrasing. Low-quality documents get a Wikipedia-style rewrite; high-quality ones get diverse QA pairs, distillation, knowledge extraction and knowledge lists (Lecture 10 §5.3).
  • BeyondWeb names per-token information density as the main mechanism. Rephrased data reached the same accuracy with 3–8× fewer training tokens.
  • Kang et al. (1,000+ LLM variants): pure synthetic data does not outperform Common Crawl alone, but ⅓ rephrased + ⅔ web gives 5–10× faster convergence. Synthetic data is a multiplier on real data, not a replacement for it (yet).
  • Small generators. A 3B generator produced data statistically indistinguishable from an 8B one’s, at 2.7× lower cost. OLMo-2-7B, the weakest on benchmarks, produced the best synthetic data, and four model families were within 1 point of each other. The generator’s job is reformatting, not reasoning, so invest in source-quality filtering upstream, not in generator size.
  • Diversity beats volume. Lin et al.: diverse study strategies (timelines, concept maps, mnemonics) let an 8B model match Llama 3.1 405B on tail-fact recall. Kimi K2: 10 rephrasings × 1 epoch ≥ 1 rephrasing × 10 epochs. BeyondWeb: single-strategy learning curves flatten, multi-strategy ones do not, even 50× beyond Chinchilla-optimal. More tokens in the same format saturate; vary the transformation, not just the input.

The guest lecture calls this “the bitter lesson of synthetic pre-training”:

  • the elaborate approach (frontier generators, curricula, quality classifiers; Phi-style) does not scale past hundreds of billions of tokens;
  • the simple approach (small cheap models, straightforward prompts, the entire web) scales to trillions;
  • the open state-of-the-art recipe is good source data + cheap diverse rephrasing + principled mixing.

3.2 Rephrasing under a data constraint, measured

Demo 02 takes 400 wiki pages (42K tokens) as the only real data and trains the same model for 1,200 steps (1.2M tokens). It tests the 258 facts those pages mention, in three question forms:

  • the page form, used by the real pages;
  • a QA form, used by some rephrasing templates;
  • an unseen form, used by no training document.
training dataepochstrain lossheld-out wiki (bits/byte)page formQA formunseen form
real pages × ~3029.40.0801.69270.2%7.0%6.2%
real + 2 rephrasings (8 styles)9.00.9480.80878.7%62.4%11.2%
real + 29 rephrasings (1 style: “Y is the R of X”)1.01.1330.84511.2%6.6%6.6%
real + 29 rephrasings (8 styles)0.91.0700.76358.9%57.8%11.6%

(Held-out wiki floor 0.638; chance on facts about 5%.)

Four lessons:

  1. Repetition memorizes. At 30 epochs the training loss is near zero and held-out text collapses (1.692 bits/byte). The facts are learned only in the form the pages use: asked as a question, the model is near chance (7%). The knowledge is locked into its surface form.
  2. Diverse rephrasings generalize. With 29 rephrasings in 8 styles nothing is repeated, held-out text is the best of the four (0.763), and the facts are accessible as questions (57.8%) and slightly even in an unseen form. The price is some page-form accuracy (58.9% vs 70.2%), since the page form is now one style among eight. The facts all come from the real pages: coverage is inherited from the web.
  3. One style fails outright. 29 rephrasings that all say “ostrin is the capital of velmora” leave “the capital of velmora is …” at 11.2%. Knowledge does not reverse by itself; this is the reversal curse (反转诅咒) of Berglund et al. It is the sharpest form of the slides’ “diversity beats volume”.
  4. Distinct beats repeated. Two rephrasings repeated about 10 times keep page-form facts best but already overfit held-out text (0.808 vs 0.763). More distinct rephrasings, each seen once, is the better use of a fixed budget.

3.3 When rephrasing does not help

Rephrasing is a substitute for repetition, not for fresh real data. Demo 03 replaces 30% of a plentiful web set (where each page is seen about once) with rephrased web. Page-form accuracy drops (common countries 61.3% → 36.2%), because the rephrasings displace real pages and state facts mostly in other forms. Rephrasing also cannot add facts the web lacks: rare countries 20.0% → 8.8%. Synthetic data is a multiplier on scarce real data, not a substitute for plentiful real data, in line with Kang et al.’s finding that pure synthetic does not beat Common Crawl.


4. Generating from seed topics: strong benchmarks, narrow coverage

phi-1.5 (1.3B parameters) was trained on textbook-style text an LLM wrote from about 20K seed topics. It matched 5× larger models on common-sense and reasoning benchmarks, but its perplexity on the Pile was 2.1× OPT-1.3B’s (reported). As the slides put it, seed topics that match the benchmarks raise scores without any test-set leakage. Maini’s critique was “a case of comparing apples to oranges”: evaluate on data the synthetic set was not built for.

Demo 03 reproduces this. Twenty “seed” countries are the ones a benchmark asks about (mention-frequency ranks 20–39). A generator writes textbook lessons about them only. The same model trains for 800 steps on each set:

training datafacts: common (ranks 0–19)facts: seed (20–39)facts: rare (40–59)storycodeall (bits/byte)
web only61.3%16.2%20.0%0.7590.7240.762
web 70% + seed textbooks 30%47.5%100%11.2%0.7640.7380.770
seed textbooks only (phi-style)3.8%100%2.5%4.8578.9575.386
web 70% + rephrased web 30%36.2%10.0%8.8%0.7600.7270.767
  • The benchmark is solved. Seed-country facts go from 16% to 100%, with no leakage, because the seed list was chosen to match the benchmark.
  • Coverage is the price. Textbooks only: common-country facts fall to 3.8% and held-out text collapses to 5.4 bits/byte, because the generator never wrote stories, sums or code. Mixed with web at 30%, the overall damage is small (0.770 vs 0.762), but the web’s own facts suffer for the tokens the textbooks took.
  • Judge synthetic data on data it was not built for.

4.1 Seeding capabilities: synthetic code and reasoning

Rephrasing works for general text. Purpose-built synthetic data targets capabilities that barely exist on the web, and it is mixed into bulk pre-training, not just SFT, because capabilities seeded there are more durable.

Code, where synthetic data can be verified by execution:

  • phi-4’s instruction reversal: generate a problem from code and keep the matching pairs.
  • Nemotron-Code-v2: 340B tokens from 5 techniques (QA, code review, pedagogy, style rewriting, transpilation). The slide’s example transpiles a Python fib into C++; both versions become training data, so the model learns cross-language structure.
  • Qwen2.5-Coder: 5.5T tokens with self-bootstrapping and text-code grounding (+5.2 points on HumanEval + MBPP).
  • SwallowCode: +17 points on HumanEval over quality-filtered code. Rewriting beats filtering.

Reasoning:

  • Front-Loading Reasoning (Akter et al.): an 8B model on 1T tokens, 80% general + 20% reasoning data. Code improved by 9 points in pre-training (40.89% → 49.94%). The gains compounded through post-training: SFT code 7.09% → 16.75%, RL LiveCodeBench 13.16% → 32.43%.
  • NVIDIA’s RQA data decouples question generation (inspired by a STEM seed passage) from answering (the answering model has no access to the seed), forcing reasoning from knowledge rather than extraction. It has 9M samples across 8 STEM domains and, at 4–8% of the mix, lifts MMLU-Pro, Math-500 and HumanEval.
  • Echo Chamber (Zhao et al.) found that RL amplifies behaviours learned in pre-training: pre-training sets the ceiling for post-training.

The future the guest lecture sketches (Langlais’s framework) has three levels:

  1. Memory: rephrasing for knowledge retention (mature: BeyondWeb, Nemotron-CC).
  2. Logic: reasoning primitives (emerging: front-loading reasoning; RLP, reinforcement as a pre-training objective).
  3. Simulation: modelling whole environments (frontier: agentic continued pre-training).

The unifying shift is from passive data collection to active curriculum design.


5. Distillation: the teacher writes the targets

logit distillationsequence-level distillation
teacher inputordinary pre-training textprompts
targetthe teacher’s full next-token distributiontext the teacher generates
examplesmall open models (Gemma 2, Llama 3.2)synthetic textbooks

Distillation is worth its cost only if the teacher already exists or serves many students (Busbridge et al., Distillation Scaling Laws).

Demo 04 uses a teacher (width 128, 4 layers, 12,000 documents) and a student (width 48, 2 layers, 600 steps on 1,500 real documents, about 4 epochs):

modelall (bits/byte)facts (20 common countries)
teacher0.75565.0%
student, hard labels0.78618.8%
student, teacher’s soft labels0.77233.8%
student, 50/50 hard + soft0.77830.0%
student, 2,000 teacher-generated documents0.80818.8%
  • Soft labels carry more information per token. A full distribution says how uncertain the next token is and which alternatives are plausible, where one sampled token says neither. The soft-label student is better at the same data and steps, and knows more facts.
  • Sequence-level distillation copies mistakes. In the teacher’s samples, 53.7% of stated facts, 95% of sums and 97.7% of code documents were wrong: the teacher never learned arithmetic. Generated data needs verifiers (§6).
  • Cost. Logit distillation runs the teacher forward on every student token, 2×910K2 \times 910\text{K} FLOPs against the student’s own 6×105K6 \times 105\text{K}, about 3× the student’s step here.

Imitation transfers style more than knowledge. Gudibande et al. fine-tuned LLaMA on ChatGPT outputs. After broad imitation on general user chats, raters judged about 70% of answers as good as ChatGPT’s, but factual accuracy on Natural Questions dropped. Targeted imitation on 6K NQ-like prompts closed most of the gap on NQ. The student learns the teacher’s knowledge only where the prompts go.

Demo 04 Part C does targeted imitation on 20 mid-frequency countries. The student goes from 3.8% to 11.2% on them, capped by the teacher’s own 13.8%, while common countries stay put (17.5% vs 18.8%). Imitation can only transfer what the teacher knows, and only where it is asked.


6. Quality control, diversity and reproducibility

6.1 The generation pipeline as a system: NeMo Data Designer

The Data Designer tutorial frames synthetic data as manufacturing, not mining. It traces the maturity levels of synthetic data:

  1. statistical rules (regex, templates);
  2. probabilistic modelling;
  3. single-purpose generative models (GANs, fine-tuned LLMs);
  4. general-purpose LLMs;
  5. compound AI systems that orchestrate several models with samplers, validators and post-processors.

In NeMo Data Designer, a dataset is a DAG of column generators:

column typewhat it doesexample
samplerrule-based values, no LLMcategories, distributions, personas
LLM textfree-form generationquestions, rephrasings, summaries
LLM structuredschema-enforced JSONQA pairs, metadata
LLM judgequality scoring on a rubricclarity, faithfulness 1–5
LLM codecode with a language tagPython, SQL
expressionJinja2-derived columnsformatting, combining fields
seed datasetcolumns from input dataweb text from Curator

Columns reference each other through {{ templates }}, and the dependencies are resolved automatically. The tutorial pipeline is a seed column (web_text) feeding two LLM-text rephrase columns, an LLM-judge quality_score and a JSONL export. The workflow is configure → preview → iterate → scale.

The tutorial also lists the limitations:

  • model collapse (§7);
  • the cost of synthesis (every token costs inference FLOPs);
  • judge circularity (an LLM judging LLM output may share its blind spots);
  • hallucination risk (rephrasing can introduce factual errors or lose domain terms).

Multi-strategy diversity and LLM judges mitigate these risks but do not eliminate them.

6.2 Temperature, verifiers and judges, measured

Demo 05 trains a generator (width 96, 3 layers) and samples from it.

Temperature trades diversity for correctness (400 samples each):

temperaturedistinct-2self-overlapdocuments with a detected errorvalid under the world
0.50.0860.16452.8%21.2%
0.80.1440.06145.2%23.8%
1.00.1750.03748.5%12.0%
1.30.2390.02147.8%3.8%

Low temperature produces near-duplicates: self-overlap is 8× higher at 0.5 than at 1.3. High temperature produces text the world could not have produced. The detected-error rate stays near half at every temperature, because the generator never learned to add, so its sums are wrong however it samples. Temperature cannot supply missing knowledge.

Verifiers vs judges (keep the “best” half of 1,000 samples at temperature 1.0):

filterkeptwith an error
none1,00052.5%
verifiers (facts checked against the world, sums recomputed, code replayed)4750.0%
the generator judges itself (top half by its own likelihood)50085.8%
an independent model judge of the same family50082.6%

A likelihood judge can be worse than no filter. Likelihood rewards what is predictable, and the generator’s formulaic math documents are both predictable and wrong. This is “judge circularity” in its starkest form. Where a verifier exists (execution for code, recomputation for math, a knowledge source for facts), it is what removes errors.

6.3 Regurgitation, decontamination and the guardrails

Of 1,000 samples, none copies a training document exactly, but 91 share a 12-word span with one. Synthetic data must be deduplicated against its sources and decontaminated against benchmarks like any other source (Lecture 10 §3.4–3.5).

The Spring slides’ three guardrails for synthetic or post-training-style data in pre-training:

  1. Version + provenance: record the generator model and version, prompts and filter thresholds.
  2. Dedup + decontam: dedup synthetic data against raw sources and against benchmarks.
  3. Mixture controls: cap the synthetic fraction; ablate (for example 5%, 20%, 50%) and watch for regressions.

Metrics to track: synthetic fraction over time; diversity (repetition, n-gram entropy); per-source loss and spikes; acceptance-rate drift of scorers and filters; contamination overlap.

6.4 Reproducibility

Demo 05 Part D shows what a manifest must pin. The same recipe regenerated gives byte-identical output (same SHA-256). Another seed, or a generator trained one step longer, gives different bytes. So a synthetic dataset is reproducible only if its recipe pins:

  • the generator’s weights (a hash);
  • the prompts;
  • the sampling parameters and seeds;
  • the filters.

Treat it as a production dependency.


7. Model collapse

7.1 The concern

Shumailov et al. (Nature 2024) fine-tuned OPT-125m on WikiText-2, then fine-tuned each new generation only on text generated by the one before:

  • Rare events are under-sampled. Each model under-samples them, so the next model sees fewer.
  • The tails disappear first, then the distribution narrows. Scored by a model trained on the real text, later generations produce more of what the original model finds likely.

Two symptoms: loss of tail diversity, and convergence toward homogeneous outputs. The question the guest lecture asks is: does this apply to what practitioners actually do?

7.2 Collapse reproduced

A Gaussian refitted to its own samples (demo 06 Part A; median of 200 seeds):

samples per generationstd after 1 gen.after 10after 50after 200
n = 100.9290.3650.0050.000
n = 1000.9980.9150.6350.163
n = 1,0001.0011.0060.9510.808
n = 10, accumulate (real data stays in the pool)0.9560.9210.9240.924

Each fit under-represents the tails it happened not to sample, and the errors compound. More samples per generation slow collapse but do not stop it; keeping the original data does.

A trigram model of wiki pages over 10 generations (demo 06 Part B), trained only on its predecessor’s text:

generation0246810
trigram types28,33419,19514,86212,13610,4239,037
next-word entropy (nats)2.1131.9271.7851.6801.6061.520
countries mentioned (of 100)10010099969291
text from trigrams rare in the real pages19.9%20.1%19.7%19.8%20.2%20.2%
  • Combinations die out. A word combination one generation fails to sample can never come back, and the countries lost by generation 10 are all rare ones (mention-frequency ranks 39–98).
  • The distribution narrows: each context keeps fewer continuations, and the entropy falls by 28%.
  • What did not happen is instructive. The amount of text built from rare real trigrams stays at about 20%, and the typical document’s perplexity under the generation-0 model does not move (8.38 → 8.42). Resampling preserves frequencies on average: each type’s share is a martingale. Rare types go extinct one by one while the survivors grow, so diversity is lost even though every single generation looks statistically like the last.

That is what makes collapse insidious. Per-generation statistics look fine, and only the type counts, entropy and coverage reveal the loss.

7.3 Mitigation

Mixing in real data prevents collapse (Gerstgrasser et al.): accumulate, do not replace. In demo 06:

  • accumulating real + generated text holds 28,704 trigram types and all 100 countries at generation 10 (entropy 2.078);
  • half real, half generated levels off at about 20,400 types and keeps all 100 countries.

Kang et al. add that rephrasing is not textbook-style generation: rephrased data showed no degradation, while textbook-style data degraded at high fractions.

Web crawls now contain LLM-generated text, so each new crawl adds to the mix. That is one more reason provenance tracking (§6.3) matters.

The answer to the guest lecture’s question is therefore: the failure mode is recursive replacement. Practice is adding synthetic data, much of it rephrasings anchored in real documents, to real data. That does not collapse, provided diversity and coverage are monitored.


8. Summary

  1. The pressure on data is structural: inference economics, overtraining that still follows scaling laws, repetition limits (about 4 epochs dense, about 2 MoE), and MoE data needs that scale with total parameters. One run equals the stock of public human text in about 4 years at current growth.
  2. Generation is cheap next to training (BeyondWeb: 14.5–17% of RedPajama’s compute for the same accuracy; Nemotron-CC: 15%), and per-token costs fall about 10× per GPU generation.
  3. Coverage is set by the source. Generated and distilled data teach only what the prompts ask about; rephrased data inherits the web’s coverage. Seed-topic textbooks solved a matching benchmark (16% → 100%) and wrecked everything else when used alone (5.4 bits/byte).
  4. Rephrasing is a multiplier on scarce real data. Against 30× repetition, 29 diverse rephrasings gave the best held-out text (0.763 vs 1.692) and made facts answerable in new forms (58% vs 7% as questions). One style failed outright (11%, the reversal curse), and replacing plentiful real data with rephrasings hurt. Diversity beats volume; small generators suffice.
  5. Distillation: soft labels beat hard labels on the same text (0.772 vs 0.786; facts 34% vs 19%). Sequence-level distillation copies the teacher’s mistakes. Imitation transfers knowledge only where prompts point, and only up to the teacher’s own.
  6. Quality control needs verifiers. Likelihood judges kept more errors than no filter (86% vs 53%). Temperature trades diversity for validity but cannot add knowledge. Dedup and decontaminate synthetic data, and pin generator, prompts, seeds and filters in a manifest.
  7. Model collapse comes from recursive replacement: tails die, entropy falls (−28% over 10 generations), and per-generation statistics hide it. Accumulating real data prevents it. Synthetic pre-training works because it adds to real data.

9. Common pitfalls

  • Treating synthetic tokens as interchangeable with real ones: replacing plentiful real data with rephrasings hurts.
  • One rephrasing style, many copies (diversity beats volume; reversed facts do not un-reverse).
  • Seed topics that match the benchmark, evaluated on that benchmark only.
  • Trusting an LLM judge to filter LLM output without verifiers or an independent check.
  • Sampling at low temperature for “quality” and getting near-duplicates; at high temperature, getting nonsense.
  • No manifest: an unversioned generator makes a dataset impossible to reproduce or audit.
  • Forgetting to dedup and decontaminate synthetic data against its sources and the benchmarks.
  • Recursive training on generated data without real data in the mix.

10. Exercises

  1. The cost model. You train a 7B model on 2T tokens, of which 500B are rephrasings generated by a 3B model (output tokens; ignore input). What fraction of total compute is generation? What if the generator were 70B?
Answer

Training: 6×7B×2T=8.4×10226 \times 7\text{B} \times 2\text{T} = 8.4 \times 10^{22}. Generation: 2×3B×0.5T=3×10212 \times 3\text{B} \times 0.5\text{T} = 3 \times 10^{21}, i.e. 3/(84+3)=3.4%3/(84+3) = 3.4\% of the total. With a 70B generator: 7×10227 \times 10^{22}, i.e. 70/154=45%70/154 = 45\%. BeyondWeb found a 3B generator’s data as good as an 8B one’s, so the small generator is the sensible choice.

  1. Why did one style fail? In demo 02, 29 rephrasings that state every fact as “Y is the R of X” gave 11% accuracy on “the R of X is”. Explain, and name two fixes.
Answer

A causal LM learns to predict what comes after a context. Reading “Y is the R of X” teaches p(X∣Y is the R of)p(\text{X} \mid \text{Y is the R of}), not p(Y∣the R of X is)p(\text{Y} \mid \text{the R of X is}). The association is stored in the direction it was read (the reversal curse). Fixes: rephrase in many styles, including forms with the entity before the answer (demo 02’s 8 styles); keep the real pages in the mix; add QA forms that ask in the direction the model will be queried.

  1. Repetition or rephrasing? You have 100B tokens of high-quality domain text and budget for 1T training tokens of that domain. Compare repeating it 10 times with adding 9 rephrasings of it. What would you measure to decide?
Answer

Ten epochs is past the “nearly free” range (about 4), so expect memorization and worse held-out loss. Nine diverse rephrasings give each token one pass, preserve coverage and add surface-form variety. Measure: held-out loss on real domain text (not on the rephrasings), benchmark accuracy in several prompt formats, and a small ablation of rephrasing diversity (1 vs 4 vs 9 styles). Also check the rephrasings’ factual fidelity with a verifier or a sample audit.

  1. Judge circularity. A team filters generated math problems by keeping those the generator assigns high likelihood. Why might this select for errors? What would you use instead?
Answer

Likelihood measures how predictable the text is to the generator, not whether it is correct. Formulaic problems the generator has seen patterns of, including its own systematic mistakes, get high likelihood. In demo 05 the top half by self-likelihood had 86% errors vs 53% unfiltered. Use a verifier: recompute the answer, execute code, check against a solver or a knowledge source. If you must use a judge, use an independent one and audit its decisions on a labelled sample.

  1. Collapse arithmetic. A trigram appears once in a corpus of 1M trigram tokens. A new corpus of 1M tokens is sampled from the MLE model fitted to it. What is the probability that this trigram is absent from the new corpus? What does that imply after many generations?
Answer

With per-token probability p=10−6p = 10^{-6} over 10610^6 draws (approximately, ignoring context conditioning), P(absent)≈(1−10−6)106≈e−1≈0.37P(\text{absent}) \approx (1 - 10^{-6})^{10^6} \approx e^{-1} \approx 0.37. A singleton has a 37% chance of disappearing in each generation, and once gone it never returns. Over generations, almost all rare types go extinct, while the expected share of each type is preserved (a martingale), so the survivors grow. That is demo 06’s pattern: types fall from 28K to 9K while the rare-text share stays near 20%.

  1. Manifest. List the fields a synthetic-data manifest needs so that someone else can regenerate the dataset byte for byte, and one field that would let you remove it later.
Answer

To regenerate: generator identity and a weight hash; tokenizer version; prompt templates and seed inputs (or their hashes and source dataset versions); sampling parameters (temperature, top-p, max tokens) and RNG seeds; the generation code version; filter and verifier versions and thresholds; dedup settings; the output hash. To remove it later: a per-document provenance tag (source document ID and generator ID), so you can drop or reweight synthetic data by generator or source if a problem is found.

Spring 2026’s lab used NeMo Data Designer to build a rephrasing pipeline over raw web text:

  • local GPU inference;
  • multi-strategy pipelines;
  • a GPT-2 perplexity measure;
  • full-scale generation.

For a pre-training project on a fixed token budget (Assignment 2), the lessons here translate to concrete choices:

  • rephrase when you would otherwise repeat high-quality data;
  • use many styles and keep real data in the mix;
  • verify what you can;
  • evaluate on data your synthetic set was not built for.

No assignment solutions are given here; synth.py is independent of the course materials.

12. Research directions

  • Which transformations carry the most information per token? BeyondWeb points to information density; a predictive theory of which rephrasing strategies help which capabilities is open.
  • Verifiable synthetic data beyond code and math. Knowledge sources, simulators and consistency checks as verifiers for general text.
  • Reversal and format generalization. How much surface-form diversity is needed for knowledge to be usable in any form? Can training objectives remove the need?
  • Collapse monitoring at web scale. Crawls increasingly contain generated text. Cheap detectors of diversity loss (type counts, entropy, coverage of rare entities) for data pipelines.
  • Active curriculum design. From rephrasing (memory) to reasoning primitives (logic) to environment simulation: what should pre-training data look like if it is designed rather than collected?

13. Further reading

  • Maini et al., Rephrasing the Web (WRAP, arXiv:2401.16380); Maini et al., BeyondWeb (arXiv:2508.10975).
  • Su et al., Nemotron-CC (arXiv:2412.02595).
  • Kang et al., Demystifying Synthetic Data in LLM Pre-training (arXiv:2510.01631).
  • Gunasekar et al., Textbooks Are All You Need (phi-1, arXiv:2306.11644); phi-1.5 (arXiv:2309.05463); phi-4 (arXiv:2412.08905).
  • Shumailov et al., AI models collapse when trained on recursively generated data (Nature 631, 2024); Gerstgrasser et al. (arXiv:2404.01413).
  • Gudibande et al., The False Promise of Imitating Proprietary LLMs (arXiv:2305.15717); Busbridge et al., Distillation Scaling Laws (arXiv:2502.08606).
  • Berglund et al., The Reversal Curse (arXiv:2309.12288).
  • Akter et al., Front-Loading Reasoning (arXiv:2510.03264); Lin et al., Learning Facts at Scale with Active Reading (arXiv:2508.09494).
  • NVIDIA NeMo Data Designer (github.com/NVIDIA-NeMo/DataDesigner).

14. Next lecture

Lecture 12 · Optimizer Fundamentals. Part II has so far treated the optimizer as a fixed recipe (AdamW, warm-up and cosine or WSD, clipping, ϵ=10−8\epsilon = 10^{-8}, weight decay 0.1). Lecture 12 opens it up:

  • SGD, momentum, sign descent and Adam from scratch, checked against torch.optim;
  • steepest descent under different norms (why Adam behaves like sign descent);
  • schedules and warm-up, measured;
  • numerics (ε, BF16 optimizer states), batch size and the critical batch size;
  • weight decay;
  • the derivation of µP’s 1/din1/d_{in} learning-rate scaling that Lecture 9 used.

术语表 (Glossary, English → 中文)

English中文
synthetic data / real (human-written) data合成数据 / 真实(人类撰写)数据
data wall / stock of text数据墙 / 文本存量
overtraining过度训练(超出计算最优的训练)
generator / rephraser生成模型 / 改写模型
generate / distill / rephrase生成 / 蒸馏 / 改写
seed topic / seed prompt种子主题 / 种子提示
synthetic textbook合成教科书
coverage覆盖面
information density信息密度
diversity beats volume多样性胜过数量
reversal curse反转诅咒
teacher / student教师模型 / 学生模型
logit (soft-label) distillation / sequence-level distillation对数几率(软标签)蒸馏 / 序列级蒸馏
imitation模仿学习
verifier / LLM judge / judge circularity验证器 / 大模型评审 / 评审循环偏差
hallucination幻觉
temperature采样温度
distinct-n / self-overlap / compression ratio去重 n 元比例 / 自重叠度 / 压缩率
regurgitation逐字复现
manifest / provenance / reproducibility生成清单 / 数据溯源 / 可复现性
column generator / DAG / preview列生成器 / 有向无环图 / 预览
model collapse / tail / entropy模型坍缩 / 尾部 / 熵
accumulate vs replace累积 vs 替换
martingale鞅
active curriculum design主动课程设计
← 返回课程目录