Training a neural network has a few knobs that have to be set before the run starts. Three words are needed before the knobs make sense. The loss is one number that says how wrong the model's guesses are on a batch of data, and training is the business of pushing it down. The gradient is a list with one entry per weight, saying which way to nudge that weight to lower the loss a little. The optimiser is the rule that turns the gradient into an actual change in the weights.
The learning rate is how big a step the optimiser takes on each update. Weight decay is how hard the weights are pulled back toward zero, which keeps them from growing without limit. Warmup is the short period at the start of a run where the learning rate ramps up from zero. A sweep is running training several times with different settings for these and keeping the best run. Every new model or dataset starts with the same chore, sweep, pick the best run and throw the rest away.
| name | what it is |
|---|---|
| nanochat | A small open codebase for training GPT-style models end to end. We use it for the model, the data and the hand-tuned defaults. |
| AdamW | The standard optimiser for transformers. It adapts the step size for each weight and applies weight decay separately. |
| Muon | A newer optimiser for weight matrices that reshapes each update so all of its directions get a similar step size. We use it for the matrices and AdamW for the embeddings. |
| schedule-free | A family of optimisers from Defazio and others that removes the learning rate schedule by averaging the weights over the run. It still needs a learning rate and a weight decay chosen. |
| ASHA | Asynchronous successive halving, a sweep method that starts many runs and stops the worst ones early. |
| GRPO | Group-relative policy optimisation, a reinforcement learning method that scores each attempt against a group of other attempts from the same situation instead of learning a separate network to predict the score. |
| PPO | Proximal policy optimisation, the standard reinforcement learning update that limits how far one update can move the policy. |
An ASHA sweep, which starts many runs and stops the bad ones early, costs about six full training runs. The schedule-free sweep we compare against took eight. The whole thing is repeated for the next architecture or the next corpus, because nothing learned in one sweep carries to the next.
A learning rate schedule is the planned curve of the learning rate across the run, warmup included, so the step size is decided in advance for every moment of training. Schedule-free optimisers remove that curve by averaging the weights over the run instead. They still need their top-level settings chosen, and they do not learn from past runs either.
JEL is a small policy network, a neural network whose output is a decision rather than a prediction. It watches a training run and adjusts the learning rate and weight decay as it goes, by multiplying whatever the base optimiser would have used. It is trained once with reinforcement learning, which means it learns from a reward signal by trial and error, across a few hundred short training runs. After that it is reused.
We measure the trained model by validation bits per byte, the average number of bits the model needs to encode each byte of held-out text, so lower is better. Held-out text is text kept out of training so the score says how the model does on what it has not seen. A parameter is one learned number in the model, and the transformer here has 73 million of them. On that model JEL beats the best of an eight-run schedule-free sweep by 2.5% in bits per byte. It lands within 8.4% of a hand-tuned upper bound.
Training the controller cost the equivalent of 5.6 training runs, which is less than the sweep it replaces. The surprising part is how little it needs to see.
The reinforcement learning setup
A reinforcement learning problem needs episodes, states, actions and rewards. An episode is one attempt from start to finish, the state is what the controller gets to see, the action is what it does, and the reward is the score it gets back. Here an episode is one training run from random initialisation to steps.
Every steps the controller reads a state and emits two real numbers as its action, . The base optimiser then runs the next 50 steps with its two hyperparameters scaled by numbers derived from that action. The base optimiser is not replaced. It keeps its update rule, its momentum and its schedule, and the controller only multiplies two of its knobs. Momentum is the optimiser's running average of past gradients, which smooths the direction each step is taken in.
That is what makes the thing safe to bolt on. A controller that outputs the learning rate directly has to learn what a sensible learning rate is from scratch. A controller that outputs a multiplier starts from the base optimiser's answer and learns a correction to it.
A bit of maths now, none of it deep. The raw action is a real number, and a multiplier has to be positive. It should also treat halving and doubling as symmetric moves. So the action is squashed and then exponentiated,
and the hyperparameters for the next 50 steps are , and likewise for weight decay.
Read the mapping from the inside out. The tanh is a squashing function that takes any real number to a value strictly between and , so the policy cannot ask for something absurd however far it wanders. Multiplying by stretches that to . The exponential then turns it into a multiplier between 0.01 and 100.
Geometrically the action lives on a log scale. An action of multiplies by some and an action of divides by the same . Zero is the identity, and a step of fixed size in is the same relative change whether the base learning rate is large or small. That is the sense in which the controller does not care about units, and it is why the same policy can be reused on a different base without re-learning them.
A hundred-fold range was enough to reach good settings from a base we set poor on purpose, without instability. Expanding the action to four dimensions, with separate multipliers per optimiser, made the final model worse.
The state is one number,
the fraction of the run completed. Nothing else. We tried gradient norms, which measure how large the gradient is as one number, loss histories and momentum statistics, and every one of them made the final model worse.
A policy that sees only the clock can only learn a schedule, a function from progress to multiplier. That is the right amount of expressiveness for 400 episodes of experience. A policy that also sees the loss or the gradient norm can react to them, and with this little data it can also fit their noise.
There is a second argument from what the reward already carries. The reward measures how much the loss fell over the last 50 steps. So information about how well optimisation is going reaches the policy through the reward without the policy needing to observe it as a state.
The reward at decision point is
with the average loss on a fixed probe set, the gradient norm and penalty weights. The first term pays the controller for the loss it removed over its 50 steps. The second would punish large gradients and the third would punish jerky changes in the action. Both ended up at zero. Loss improvement alone was the signal, and adding either penalty hurt.
The probe set is four batches drawn from the training split by a separate iterator. So it is the same four batches at every decision point of every episode, not whatever is being trained on at that moment. The real validation set is never read during meta-training, which is our name for the outer loop that trains the controller. That matters because the controller is being optimised against this number across hundreds of episodes, and whatever it is optimised against stops being a fair measure of how well the model generalises.
Returns and baselines
A policy gradient method adjusts the policy in the direction that makes rewarded actions more likely, and to do that it needs to assign credit to each action. The return from decision is the discounted sum of rewards from there to the end of the episode,
The discount shrinks rewards that arrive later, so a reward decisions ahead counts as much.
With both penalties at zero each reward is a difference of consecutive probe losses, and a sum of consecutive differences telescopes. Each loss is added once and subtracted once, and only the two ends survive. Ignoring the discount, , the probe loss at the moment of the decision minus the probe loss at the end of the run. With and a dozen decisions per episode the discount barely bites, so the return is close to that.
The controller is credited, at every decision, for how far the loss eventually falls from where it stood. That is the right thing to be credited for. A learning rate that makes the next 50 steps look good and the last 300 look bad should not be rewarded, and under this return it is not.
Raw returns make a poor learning signal because they are dominated by things the action did not cause. Early decisions have large returns simply because there is more loss left to shed, and late ones have small returns for the opposite reason. A baseline fixes that. Subtracting any quantity that does not depend on the action leaves the expected gradient unchanged and removes the shared part of the variance, which is the spread in the returns that every action sees alike.
Classic actor-critic methods learn a second network, the critic, to predict the expected return and use it as that baseline. GRPO uses a group of samples from the same state instead, and that is the tool used here. Eight episodes run in parallel per update, one on each of eight GPUs, the graphics processors that do the training arithmetic. Because they are all at the same step-in-episode at the same moment, the eight returns at step are eight samples from the same state. Their mean is the baseline for that step,
where is the set of all samples at step-in-episode across the eight episodes. The advantage is how much better this episode's decision at step turned out than the group's at the same step. An action that beat the group is pushed up, one that lost is pushed down, and the overall level of the return, which the action did not control, cancels.
GRPO without the normalisations
Standard GRPO does two more things to the advantage. It divides by the episode length, and it standardises within each group, dividing by the group's standard deviation so that every group's advantages have the same spread. Here that was the difference between a policy that learns and one that does not.
Entropy is a measure of how spread out the policy's choices are, and a policy with zero entropy always picks the same action. With the normalisations the policy's entropy collapsed within ten updates and it converged to one fixed action. Without them, keeping only the group mean baseline, entropy stayed between 0.3 and 0.5 for all fifty updates.
Our reading of why is this. Dividing each group's advantages by that group's standard deviation rescales every step to the same spread. At a step where the eight actions genuinely mattered the returns differ by a lot. At a step where they barely mattered the returns differ by a little, and that little is mostly noise.
Standardising makes those two steps look the same size to the gradient. So the noise at the unimportant steps is amplified until it is as loud as the signal at the important ones. The length normalisation rescales everything by a constant that carries no information when every episode has the same length.
In this problem returns correlate strongly with position in the episode, and that is the situation in which these normalisations bias the learning signal. Whatever the full mechanism, the empirical result is what we went with, and it is the reason the advantage above has no denominator.
The policy itself is a Gaussian over the two action coordinates, so each action is drawn from a bell curve with a mean and a standard deviation that the network sets. The mean is where the bell is centred and the standard deviation is its width, how far a typical draw lands from the centre. The network has a single input, two hidden layers of 64 tanh units and four outputs. The outputs are the two means and two log standard deviations, with the log standard deviations clamped to and initialised at , which is a starting standard deviation of about 0.61 in action space.
The entropy of a Gaussian is a function of its standard deviation alone. So entropy collapse means the standard deviations have shrunk until the policy emits nearly the same action every time and nothing new is tried.
The policy is updated with the clipped PPO objective, where PPO is the standard update that limits how far the policy can move in one step,
with as defined above and . The ratio is how much more likely the action has become under the new policy than under the policy that generated it. Multiplying the advantage by it is importance sampling, which corrects for the data having come from an older policy and lets the same eight episodes be reused for several gradient steps. Here that is four passes over the data in minibatches of 64, where a minibatch is a slice of the collected decisions used for one gradient step.
The clip stops the ratio from being pushed past , so a single large advantage cannot drag the policy far from the one that collected the data. The policy learning rate is .
The learned policy
The base hyperparameters are set low on purpose, a learning rate of and weight decay of for every parameter group, with no per-group tuning. A parameter group is a set of weights that share one learning rate, and here the embeddings and the matrices are the two groups.
The hand-tuned configuration uses nanochat's defaults instead. Those are a learning rate of 0.3 for the embeddings and 0.02 for the Muon matrices, with a weight decay of 0.2 scaled by to 0.8. So the controller starts from a point a person would never pick and has to find its way toward something better using one multiplier shared across all groups.
The learned policy raises both multipliers steadily through the run. The median learning-rate multiplier reaches roughly three and the weight-decay multiplier roughly four by the end, read off the paper's figure. It has learned that the base is too conservative and that the right correction grows as training goes on.
What it cannot do is treat the embeddings and the matrices differently, because the multiplier is shared. That is one candidate for where the remaining gap to hand-tuning lives.
Results
The model is a 6-layer decoder-only transformer, the same kind of architecture as GPT, with width 384, 3 attention heads of head dimension 128 and 73.5M parameters. It trains for 561 steps at 524K tokens per step, 294M tokens in all, on nanochat pretraining data with a 32,768-token vocabulary.
A few of those terms need unpacking. A token is a word or a piece of a word, and the vocabulary is the list of all the tokens the model can read or write, here 32,768 of them. The width is how many numbers the model carries for each token between layers. Attention is the part of a layer where each token looks at the tokens before it and pulls in what it needs, and a head is one independent copy of that operation. Three heads run side by side, each working with 128 of the 384 numbers.
The optimiser is hybrid AdamW and Muon. AdamW with momentum settings and handles the embeddings and Muon handles the matrices. The schedule is warmup, flat, warmdown, with the last 40% of the run as warmdown, where the learning rate ramps back down toward zero.
Meta-training ran 50 updates of 8 episodes each. The sequence length is how many tokens the model reads in one go. Every episode is a full 561 steps at sequence length 128 instead of 2048, which makes an episode about sixteen times cheaper. That is 400 episodes and 5.6 full-run equivalents of wall-clock time on 8 A100 GPUs, where wall-clock means time on a clock rather than a count of operations.
| method | val BPB at 561 | train loss |
|---|---|---|
| schedule-free, best of an 8-run sweep | 1.203 | 3.932 |
| JEL | 1.173 | 3.810 |
| hand-tuned upper bound | 1.082 | 3.507 |
| same base, controller off | 1.453 | 4.718 |
The controller-off row is the clean counterfactual, since it shares every setting with JEL except the multipliers. The 19.3% between them is what the controller contributes.
Against the schedule-free sweep JEL is 2.5% better at about the same compute. The sweep's best configuration, a schedule-free learning rate of 2.0 with no weight decay and no warmup, was found by trying eight. Against the hand-tuned bound JEL is 8.4% behind, and that bound carries knowledge of the architecture and data that one number cannot.
At deployment the controller adds under 0.5 ms every 50 steps, under 0.3% of the training cost. After the one-time 5.6 runs, each new training run costs one run, against six to eight for a sweep.
What it does not say
The result means that a reusable schedule can be learned from a clock, a loss difference and a group baseline, and that the learning is cheaper than one sweep. The three things that made it work are the ones that were removed rather than added, the richer state, the penalties and the GRPO normalisations.
- One model size, 73M, and a short run of 561 steps were tested, so transfer to 350M to 1B models and to runs of tens of thousands of steps is untested.
- The controller was meta-trained and evaluated on the same architecture and data, which is the setting where a learned schedule should do best.
- The gap to hand-tuning is real. Per-optimiser control might close some of it, and early experiments on simpler architectures suggest so.
- Richer states hurt here with 400 episodes, which may be overfitting rather than a law.
- The 5.6 run equivalents are wall-clock on 8 GPUs at sequence length 128, not a count of floating point operations.
What stands is that a state of one number, a loss difference and a group baseline without the usual normalisations are enough to learn a reusable schedule, and that it pays for itself after the first sweep it replaces.
References
- Shao et al., DeepSeekMath: pushing the limits of mathematical reasoning in open language models, 2024.
- Schulman et al., Proximal policy optimization algorithms, 2017.
- Defazio, Mishchenko and Jagiello, The road less scheduled, 2024.
- Li et al., A system for massively parallel hyperparameter tuning, MLSys, 2020.
- Liu et al., Muon is scalable for LLM training, 2025.
- Loshchilov and Hutter, Decoupled weight decay regularization, ICLR, 2019.
- Xu et al., Learning an adaptive learning rate schedule, 2019.
- Thérien et al., μLO: compute-efficient meta-generalization of learned optimizers, 2024.