Scaling and Data Mixtures

Scaling claims are empirical models with narrow support, not universal laws. This stage uses small experiments to allocate compute while exposing uncertainty, confounding and regimes where the fitted relationship fails.

Section 4 of 11 · 9 units · about 43 hours

0/9

By the end you can Fit a scaling or mixture relationship with identifiable variables, uncertainty and residuals; validate one held-out configuration; preserve one failed regime; and state the budget decision it changes plus the range where it must not be used.

Units

Build it

Mini project · about 18 to 24 hours

Measured scaling predictions and a bounded budget decision

Extend lmlab with a small measured scaling and mixture study using the reliable trainer, existing decoder family and corpus. Reserve configurations before fitting, test predictions rather than importing published exponents, and choose the next experiment from uncertainty and all-attempt cost on your GPU or CPU.

  1. 1Build scaling/'s fixed-token and fixed-compute planner using the tested decoder. Before training, check parameter conventions, output-head and attention FLOPs, masks and token denominators against analytical counts and tensor inventories; retain unique/processed-token definitions, memory predictions, omitted costs and study-wide budget caps.
  2. 2Pass TensorTonic's Fit a Data Power Law with a Noise Floor and compare its prescribed fitter with raw nonlinear and no-floor fits on constructed truth. Check analytical allocation against numerical minimization and reject unsupported frontier minima; retain convergence diagnostics and full-precision fits.
  3. 3Pilot runtime and peak memory, then freeze a capacity-by-exposure matrix with a matched-compute pair, repeated fitting cells and reserved configuration. Train terminal runs independently under fixed tokenizer, evaluation and tuning contracts across paired seeds; audit identifiability and commit the reserved prediction before its run.
  4. 4Reuse the muP worksheet for measured initialization and early-update coordinate checks across widths and seeds; pass TensorTonic's Diagnose muP Width Invariants. Compare learning-rate-by-batch sweeps and transferred versus neighboring rates at matched tokens and tuning budgets; retain actual updates, warmup exposure and unreached targets.
  5. 5Fit domain response curves from realized proportions of your existing source corpora; freeze and test an excluded proportion with uncertainty. At matched processed tokens, compare repeated subsets with fresh data and filtered data with unique-token-matched random subsets; retain domain losses, exposure and prediction errors.
  6. 6Run a CPU recursive-fit diagnostic against fresh sampling, declaring variance conventions. Cross unchanged/annealed schedules and original/synthetic data from the smallest complete decoder checkpoint at matched tokens across paired seeds. Use licensed or decoder-generated text; retain general-domain loss, provenance, overlap/diversity audits and pilot-capped generation/continuation costs.
  7. 7Measure the reserved error against the frozen rule; retain residual and influence plots, floor/objective sensitivity, declared resampling units and failed regimes. Regenerate evidence from all study records, audit confounds and recommend capacity, tokens, mixture or replication with uncertainty, boundaries and a decisive next experiment.
What you hand in
  • The scaling/ planner, measured run matrix, fit implementations and committed held-out predictions linked to registry/.
  • Residual, influence, uncertainty, width-transfer, mixture, repetition and synthetic-continuation evidence with all attempts and costs retained.
  • Clean evidence-regeneration transcript and skeptical budget decision with supported range, negative regime and next decisive experiment.
How to check it
How it's graded

Counts and prediction discipline

Pass: Your count and fitting oracles pass before training. Measured independent terminal runs conserve declared budgets; repeated cells quantify seed variation, identifiability is audited and reserved predictions precede their runs.

Great: An ill-conditioned surface triggers a simpler identifiable question rather than precise unsupported exponents; held-out misses remain in the evidence.

Mechanism and uncertainty evidence

Pass: Residual and influence checks retain valid high-loss and unfinished attempts distinctly. Declared resampling units support conditional uncertainty; measured transfer, held-out mixtures, repetition controls and schedule/data continuations isolate their stated contrasts.

Great: The CPU recursive diagnostic separates estimator bias from path behavior, while general-domain loss and synthetic provenance bound decoder-level conclusions without asserting inevitable collapse.

Reproducible budget judgment

Pass: Clean regeneration rebuilds tables from immutable records. The all-attempt ledger includes pilots, tuning, generation, retries and evaluation; the decision names uncertainty, confounds, a retained failure regime and the next falsifying experiment.

Great: Plausible fits reverse an allocation, so the learner chooses an informative replication instead; an independent baseline rerun confirms the strongest supported conclusion.

Resources

  • CS336 Assignment 3 - ScalingStanford University

    Read the handout Sections 2 and 3, then fit IsoFLOP profiles and a scaling law to the public data/isoflops_curves.json with residuals and one held-out prediction. The hosted training API and leaderboard need enrollment, and the tests need postgres and keys, so the graded half is out of reach; add a small local sweep of your own and keep the failed runs. Pair it with the Lecture 9 and 11 slides (lecture_09.pdf, lecture_11.pdf in stanford-cs336/lectures).

  • Scaling Laws for Neural Language ModelsOpenAI

    Read Sections 1 and 2 (the three power laws in Equations 1.1 to 1.3), Figure 1 and Section 6 (optimal allocation). Reproduce one fit and list every assumption that differs from your experiment: fixed batch size, one schedule length and single-epoch data. Read Porian et al. before trusting its allocation rule.

  • Training Compute-Optimal Large Language ModelsGoogle DeepMind

    Study Figure 1, Section 3.2 (IsoFLOP profiles over nine compute budgets), Section 3.3 (the parametric loss in Equation 2) and Appendix D.2 (the fitted constants in Equation 10). Recreate the conclusion only within the range your run matrix supports; read Besiroglu et al. on the Approach 3 fit.

  • Resolving Discrepancies in Compute-Optimal Scaling of Language Models (Porian et al., 2024)Tel Aviv University and University of Washington

    Read Figure 1 and Sections 3 to 5: the Kaplan and Chinchilla allocation gap closes once last-layer FLOPs, warmup length and scale-dependent optimizer tuning are fixed. It also gives learning-rate and batch-size fits and shows AdamW beta2 matters at small batches.

  • Chinchilla Scaling: A Replication Attempt (Besiroglu et al., 2024)Epoch AI

    Read all seven pages after Chinchilla: the Approach 3 estimates disagree with Approaches 1 and 2, the reported intervals are implausibly narrow, and refitting reconstructed data restores agreement. It targets Approach 3, not the IsoFLOP evidence.

  • DeepSeek LLM, Section 3 (Scaling Laws)DeepSeek-AI

    Read Sections 3.1 and 3.2: batch-size and learning-rate trends with compute, and the model and data allocation fit. Its data mix is bilingual, so the exponents are specific to it.

  • Data Mixing Laws: Optimizing Data Mixtures by Predicting Language Modeling Performance (Ye et al., 2024)Fudan University

    Read Section 3 (the exponential law for per-domain loss as a function of mixture proportions, Equations 1 and 6) and Table 1. It interpolates within tested proportions; it does not extrapolate.

  • The Curse of Recursion: Training on Generated Data Makes Models Forget (Shumailov et al.; Nature 2024)University of Oxford

    Read Sections 1 to 4 on model collapse: training on generated data loses the tails of the original distribution. Keep it beside every synthetic-data decision; it does not show that any synthetic data collapses a model.

  • The Smol Training Playbook - Scaling Laws and Data MixtureHugging Face

    Read the scaling-laws section and the SmolLM3 data-mixture ablations for how a small team chose model size, token count and mixture under a fixed budget. Cite section names; the numbers are specific to SmolLM3.

  • 2 OLMo 2 Furious, Section 4 (Mid-training Recipe)Allen Institute for AI

    Read Sections 4.1 to 4.5: learning-rate annealing, the Dolmino mid-training mix, math microanneals and checkpoint soups. It is the curriculum and annealing case the scaling papers lack.

  • Modern LLM Notebook - Scaling LawsWalking Labs

    Use notebooks-en/part2-training/14-scaling-laws.ipynb for a compact bridge among Kaplan, Chinchilla, muP, FLOPs and memory. Treat its calculations as exercises to verify, not as evidence for extrapolation; its prices are dated samples.

  • TensorTonic - Scaling Laws I and IITensorTonic

    Solve Fit a Data Power Law with a Noise Floor (cs336-l09-fit-data-power-law), Extrapolate Data-Mixture Scaling Curves (cs336-l09-data-mixture-extrapolation), Estimate Critical Batch Size (cs336-l09-critical-batch-size), Recover an IsoFLOP Compute-Optimal Frontier (cs336-l09-isoflop-optimal-frontier), Fit Learning-Rate and Batch-Size Scaling (cs336-l11-hyperparameter-scaling-fit) and Diagnose muP Width Invariants (cs336-l11-mup-invariant-diagnostics). Supplied-data drills are preparation, not a measured scaling result. Public test cases check the listed edge cases, not gradients or the hidden grader, so keep your own tests beside each solution.

  • Applied Science Research Laboratory - Scaling StudyRoadmap-Final

    Borrow the preregistration, matched-budget, uncertainty, residual and negative-result requirements for the scaling experiment.

  • Maximal Update Parametrization: width-transfer checksMicrosoft Research

    Read Basic Usage, How mup Works Under the Hood, Current Limitations, and Coord Check through Tips for Coord Check at commit 1981497. Use as a design reference, not an installation requirement; skip Wider is Always Better, which is not a finite-run guarantee.

  • Scaling Data-Constrained Language ModelsHugging Face Research

    Read Section 3 (the data-constrained law, in which repeated tokens lose value at a fitted rate), Appendix A (its derivation) and Sections 5 and 6 (up to about four epochs of repetition cost little; returns fall quickly after that), then inspect the reproducibility repository (https://github.com/huggingface/datablations). Use one small repeated-data experiment to challenge the compute-optimal assumption.

  • DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining (Xie et al., 2023)Stanford and Google

    Read Section 2 (Group DRO over domain weights with a small proxy) and Section 4. A larger proxy can do worse, so proxy scale does not transfer automatically.

  • Beyond Chinchilla-Optimal: Accounting for Inference in Language Model Scaling Laws (Sardana et al., 2024)Databricks

    Read Section 2 (training plus inference cost for a target quality and inference demand) and Sections 4 and 6 (results and real-world cost). Its demand model is illustrative.