NanoGPT Slowrun: 10x Data Efficiency with Infinite Compute
TL;DR Highlight
An ensemble of 1.8B models trained on 100M tokens matched a baseline using 1B tokens.
Who Should Read
An ML-adjacent developer training small models on limited data who wants better results per training token.
Core Mechanics
- Ensembling gave 10x data efficiency
- An ensemble of 1.8B models (18B params total) was trained on 100M tokens.
- It matches what a standard LM baseline gets with 1B tokens.
- It runs opposite to Chinchilla
- Chinchilla suggests about a 5M parameter model for 100M tokens.
- This setup uses a model 3600x larger.
- Chain distillation improved the ensemble
- Models are trained in sequence, and each one distills only from the one before it.
- With 8 models, individual loss plateaued near 3.20 while ensemble loss reached 3.126.
- That moved data efficiency from 7x to 8x.
- Ensembles tolerate longer training
- Going from 12 to 18 epochs worsened individual loss from 3.295 to 3.310.
- Ensemble loss improved from 3.185 to 3.166.
- Very heavy regularization
- They used weight decay 1.6 and dropout 0.1.
- Standard weight decay is about 0.1, so this is 16x higher.
- Looping and architecture tweaks helped
- Mid-training, layers 15-24 of a 30-layer model are looped 4 times.
- XSA, EMA, U-Net skips, SwiGLU and value embeddings also gave gains.
Community Reactions
- Opinion that synthetic data makes the premise weak
- A commenter argued compute can generate more data, so the compute-outpaces-data assumption is doubtful.
- They noted industry already trains small models on 10-400x more tokens than Chinchilla-optimal.
- Opinion that serving cost is the real question
- One commenter asked about total training plus serving cost.
- They wondered whether you must serve the whole ensemble or can compress it into one model.
- Concern about quality control
- One commenter read data efficiency as fewer parameters for the same quality.
- They saw this as more parameters with less data and no clear quality control.
- Joke about the loss formula
- A commenter noted the T terms look needless since T is set to 1.0.
How to Apply
- Try the chain distillation loss today
- Add a distillation loss to your small-model training code, using the previous model as teacher.
- Start with alpha 0.5 and T 1.0, and log individual and ensemble loss separately.
- Train longer when planning an ensemble
- Push epochs past where a single model overfits.
- Check whether ensemble loss keeps falling even as individual loss worsens.
- Sweep weight decay much higher
- With small data and a big model, search weight decay well above the default 0.1.
- Use the rule that larger models need more regularization to set the range.
- Measure serving cost first
- Calculate how inference cost grows with the number of ensemble members.
- The post does not say if it compresses into one model, so test it yourself.
Try It
# Chain distillation loss for a PyTorch training loop (simple version of the post's algorithm)
# pip install torch
import torch
import torch.nn.functional as F
def chain_distill_loss(student_logits, teacher_logits, targets, alpha=0.5, T=1.0):
ce = F.cross_entropy(student_logits.view(-1, student_logits.size(-1)), targets.view(-1))
kl = F.kl_div(
F.log_softmax(student_logits / T, dim=-1),
F.softmax(teacher_logits / T, dim=-1),
reduction='batchmean',
)
return (1 - alpha) * ce + alpha * (T ** 2) * kl
# Usage: teacher is the immediately preceding model (frozen)
# with torch.no_grad():
# t_logits = teacher(x)
# loss = chain_distill_loss(student(x), t_logits, y)
# Inference: average logits of all models
# logits = torch.stack([m(x) for m in models]).mean(0)Terminology
Related Papers
Quadrillion-parameter transformers and how to train them
On fixed data, much bigger models with scaled weight decay and ensembling keep loss falling as compute grows.
Astra can read and write weights to improve Qwen
An LLM edited Qwen3.5-0.8B's weights directly, lifting MATH-500 from 7.9% to 48.1%.
Show HN: Qwen3-4B with the AI writing tics trained out
Distilling Qwen3-4B with LoRA cut its AI-writing slop score from 121 to 12.5 per 1000 words
Dust: Pretraining Transformers Without Backpropagation
Adding per-token noise to activations lets transformers pretrain without backpropagation, rivaling backprop.
Show HN: TurboGPT: train 22KiB transformer in 13s
A CUDA C++ project trains a tiny byte-level GPT in under a minute.
I had Gemini train its own replacement for $9
Fine-tuning GLiNER on $9 of Gemini labels reached 0.83 F1 locally.
Learning to solve hard problems in RL for LLMs by never giving up
Cutting compute on easy problems and retrying hard ones in RL raised accuracy on the hardest problems
Training a 3.8B LLM to 0.384 CORE for $998
A 3.8B LLM trained on 8 B200s in 43 hours for $998 scored 0.384 on CORE.