Skip to content
HN On Hacker News ↗

Quadrillion-parameter transformers and how to train them – Q

▲ 64 points • 62 comments • by frozenseven • 3w ago • HN discussion ↗

Pangram verdict · v3.3

We believe that this entire text is human-written.

0 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 4 of 4
SEGMENTS · AI 0 of 4
WORD COUNT 1,158
PEAK AI % 0% · §2
Analyzed
Nov 8
backend: pangram/v3.3
Segments scanned
4 windows
avg 290 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 1,158 words · 4 segments analyzed

Human AI-generated
§1 Human · 0%

Q Labs Research Contents Summary 1 Introduction 2 Parameters are all you need 3 Larger models for more epochs 4 (Fast) Ensembling as a scaling axis 5 Conclusion References TL;DR $$L = \underbrace{E\vphantom{\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}}_{\text{irreducible}} + \underbrace{\frac{A}{N^{\alpha}}\vphantom{\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}}_{\text{small model}} + \underbrace{\frac{B}{(UR)^{\beta}}\vphantom{\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}}_{\text{tokens seen}} + \underbrace{P\,(R-1)^{\delta}\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}_{\text{overfitting}} - \underbrace{\frac{F}{N^{\nu}\,U^{\epsilon}\,R^{\rho}}\left(1-\frac{1}{M}\right)^{\mu}}_{\text{ensembling}}$$ 1.Introduction The 1,000,000x sample efficiency gap between AI and humans is one of the central mysteries of the field, with no good explanation. One clue is model size: Chinchilla’s prescription for 30T tokens is a ~1.5T-parameter model, a tokens per parameter of 20:1 (Hoffmann et al., 2022). Humans, by contrast, have ~100T parameters (counting each synapse as a weight) and learn from just ~200M tokens, a tokens per parameter of 1:500,000. The tokens per parameter gap between AI and humans is thus 10,000,000x, and an important step forward for the sample efficiency gap may be to close it. On 30T tokens, we should be training quintillion-parameter neural networks. Our current networks are way too small, by seven orders of magnitude. Our new paper (Baron et al., 2026) makes progress towards this vision. Extrapolating its scaling law to a dataset of 5T tokens, the compute-optimal parameter count reaches ~7,000x the standard Chinchilla prescription at 1029 FLOPs. Given enough compute, we give prescriptions for training quadrillion-parameter networks. Figure 1. Extrapolated compute-optimal parameter count on 5T tokens, summed over every model in the ensemble. Dots are the law's prescription at each budget, and the line is a power-law fit through them. Chinchilla stops at 250B parameters, while our law keeps growing with compute. 2.Parameters are all you need Our new paper (Baron et al., 2026) finds that when the dataset is held fixed, the compute-optimal model size keeps growing with the compute budget. In this regime, we also want to increase the number of epochs and the number of ensemble members with the compute budget. By contrast, Chinchilla prescribes a fixed model size with a fixed dataset: 20 tokens per parameter. Extrapolating our paper’s prescriptions to 5T tokens, we find that the ensemble holds over 300 parameters per token at 1029 FLOPs, nearly 7,000x Chinchilla’s parameters-per-token ratio, and the count keeps growing with compute. We should be increasing parameter counts by orders of magnitude to achieve optimal performance in the multi-epoch regime. Compute is growing much faster than the supply of high quality language training data (Villalobos et al., 2024), so language models will be increasingly trained in a multi-epoch data-constrained regime. To study this regime directly, we train transformers on fixed datasets, across a range of data sizes, model sizes, and epoch count, and fit how loss depends on each. Each run also uses snapshot ensembling, averaging the predictions of checkpoints saved during training (Huang et al., 2017; Mandal et al., 2026), which lowers loss at no extra training compute. While snapshot ensembling is a bit unusual, we find that ensembling is an important technique to integrate in a first-class way within the data-constrained regime. Concretely, we fit a single scaling law that predicts the loss $L$ from four quantities: the number of unique tokens in the dataset $U$, the model size $N$, the number of epochs $R$, and the number of ensemble members $M$. The law extends the existing data-constrained scaling laws (Muennighoff et al., 2023; Lovelace et al., 2026) with one new term for ensembling: $$\begin{aligned} L(U, N, R, M) ={}& \underbrace{E\vphantom{\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}}_{\text{irreducible}} + \underbrace{\frac{A}{N^{\alpha}}\vphantom{\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}}_{\text{small model}} + \underbrace{\frac{B}{(UR)^{\beta}}\vphantom{\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}}_{\text{tokens seen}} + \underbrace{P\,(R-1)^{\delta}\left(\frac{N}{U^{\gamma}}\right)^{\kappa}}_{\text{overfitting}} \\[10pt] &- \underbrace{\frac{F}{N^{\nu}\,U^{\epsilon}\,R^{\rho}}\left(1-\frac{1}{M}\right)^{\mu}}_{\text{ensembling}} \end{aligned}$$ The first three terms come from Chinchilla: we have an irreducible cost, a term for the size of the model, and a term for the size of the dataset. The fourth term is an overfitting penalty following Lovelace et al. (2026), and the fifth is the gain from ensembling. It is zero for a single model and grows with each added model towards a ceiling. The constants and exponents are fit to our runs. 3.Larger models for more epochs Prior data-constrained scaling laws hold weight decay fixed across scales (Lovelace et al., 2026). These pre-existing laws predict loss increasing with compute, and don't consider that we can use larger models with more regularization as part of the scaling law. Existing transfer rules don’t fix this problem. MuP covers learning rate, but not weight decay (Yang et al., 2022). The weight decay heuristics contradict each other (Wang and Aitchison, 2025; Bergsma et al., 2025; Qiu et al., 2025), and none account for epochs. So we fit power laws for how these hyperparameters should scale in terms of unique data, model size, and epochs. We find that optimal weight decay grows steeply with epochs and with model size. With larger compute budgets and fixed datasets, we should train larger models for more epochs. This follows the finding from Kim et al. (2026), but goes further by giving concrete prescriptions for the training parameters. Figure 2. How the hyperparameter prescription is built. Left: at each grid cell, a quadratic fit over effective learning rate and weight decay locates the optimum. Middle: power laws through those optima, here weight decay against epochs for three model sizes on 50M tokens. Right: at 16x the fitted compute, our law lands near the optimum while fixed-hyperparameter rules miss. Furthermore the law extrapolates well. We find that it is near-optimal at 16x of the fitted compute, and within 0.01 nats of the optimal loss on every axis we test. We find that each prior heuristic would miss on at least one axis. Extrapolated to 5T tokens, the parameter count our data-constrained scaling law prescribes is ~7,000x larger than Chinchilla would predict at 1029 FLOPs, and the models train for several epochs each. 4.(Fast) Ensembling as a scaling axis While our models are much bigger than Chinchilla would prescribe, we would like to scale parameter counts further in order to improve sample efficiency. We explore ensembling through the snapshot ensembles of q0 (Mandal et al., 2026), and through deep ensembles (Lakshminarayanan et al., 2017). With snapshot ensembling, we save checkpoints from different points in a single training run and average their predictions (Huang et al., 2017; Mandal et al., 2026).

§2 Human · 0%

Since the checkpoints come from one run, this costs no extra training compute.

§3 Human · 0%

To make the checkpoints diverse, we train with a cyclic learning rate in the second half of training, which repeatedly raises and lowers the learning rate in one-epoch cycles. At the lowest learning rate of each cycle, we observe that the model converges to good solutions. We find that cycling the learning rate is better than holding the learning rate at its peak, and averaging the snapshots’ predictions lowers loss further. We hypothesize that this procedure works because of mode connectivity (Garipov et al., 2018): the good solutions are joined by low-loss paths, so short cycles can reach different strong models without much training. We also include deep ensembling in our scaling laws.

§4 Human · 0%

Deep ensembling trains independent models with different seeds and averages their predictions (Lakshminarayanan et al., 2017), so each member costs a full training run.