Test-time compute is extra computation spent while answering each question: voting over samples, verifier selection, revision, search and RL-trained long chains of thought. A reproducible simulation shows what caps the gain, what a fooled verifier does and why wall-clock time differs.
How many FLOPs, GPU hours and bytes of memory does training a model need? This page works out where 6ND comes from, what MFU measures, why model states cost 16 bytes per parameter, how activation memory scales, and how to sanity-check reported GPU hours.
From Kaplan to Chinchilla: why loss falls as a power law in parameters, data and compute, how to split a compute budget between parameters and tokens, and why today's models are trained on far more data than the compute-optimal amount.
One page for the estimates you reuse most: counting parameters, training compute (about 6ND), memory for weights, training state and the KV cache, the bandwidth bound on decoding speed, and the LoRA and pass@k formulas, each with a standard-library script checked against published numbers.
Snell et al. (2024) study how to spend inference compute on MATH: the best method depends on question difficulty, and allocating by difficulty needs up to about 4 times less compute than best-of-N. I recompute the paper's FLOPs exchange rate and replicate a small part with Qwen2.5.
Meta's Llama 3 paper (2024) gives the full recipe for three dense Transformers (8B, 70B, 405B): 15T tokens of pre-training, 128K context, 4D parallelism on 16K H100s, and six rounds of SFT, rejection sampling and DPO. This post recomputes its tables and flags numbers that do not add up.
The GPT-4 report emphasizes predictable loss scaling, image input and safety evaluation while withholding architecture, data and compute details. It also explains why specific capabilities may remain unpredictable.
LLaMA is a family of 7B to 65B foundation models from Meta (2023), trained on public data only. The paper reports LLaMA-13B beating GPT-3 175B on most benchmarks. This post covers the inference-budget argument, data, architecture, training cost and evidence, and which claims need a discount.
For a fixed training budget, how big should the model be and how many tokens should it see? DeepMind's 400-model study says parameters and data should grow together (about 20 tokens per parameter); the 70B Chinchilla then beat the 280B Gopher at equal compute. Numbers re-checked here.
The Switch Transformer simplifies mixture-of-experts routing to top-1, balances load with an expert capacity and an auxiliary loss, and pre-trains up to 7x faster than T5 at equal FLOPs per token. This page recomputes the paper's numbers and simulates capacity overflow.
GPT-1, GPT-2 and GPT-3 are three scale-ups of one decoder-only Transformer; what changes is how a task reaches the model: fine-tuning, zero-shot text, or few-shot examples in the context. This page rechecks the papers' numbers and measures perplexity and in-context learning on GPT-2.
OpenAI's 2020 paper trained Transformers of 768 to 1.5 billion parameters on WebText2 and found that loss falls as a power law in parameters, data and compute, almost regardless of shape. At a fixed budget, grow the model first (size ∝ compute^0.73). A breakdown that checks the numbers.