What Helped at a Fixed Budget of One Billion Tokens?
Once I settled on a training recipe, I wanted to know how much of the result came from the model's design. I trained two designs from scratch, each with about 50.7M parameters, on a billion tokens of English web text. One used the original GPT-2 building blocks. The other used the Llama-style blocks I started with in Pinwheel. Each cell is one run, scored in bits per byte (BPB) on the same held-out pages. Lower is better.
| Architecture | Original recipe, large batch and cosine decay | New recipe, small batch and cooldown to zero |
|---|---|---|
| GPT-2 style | 1.1543 | 1.1072 |
| Llama style | 1.1212 | 1.0850 |
The most revealing comparison runs diagonally across the table. The older GPT-2 design trained with the new recipe beat the Llama design trained with the original recipe. Within each column, the Llama design still came out ahead. Several parts of the architecture changed together, including how the model represents position and computes attention. I can measure the difference between the two complete designs here. To assign credit to any one part, I would have to change it on its own.
Changing how the weights are updated
After each batch, the model computes a gradient that tells it how changing its weights would affect the loss. An optimizer uses those gradients to choose an update. I started with AdamW, which keeps track of past gradients for each parameter. I then tried Muon, which adjusts a whole matrix of weights together. I switched the 70 large matrices inside the Transformer blocks to Muon and kept AdamW for the vocabulary table and normalization weights.
With the new recipe, AdamW averaged 1.0890 BPB over three runs of one billion tokens each. The two Muon runs scored 1.0716 and 1.0708, averaging 1.0712. Muon processed about 2.5% fewer tokens per second. During the earlier phase when the learning rate was constant, AdamW had to read about 40% more tokens to reach the same score. That was enough to justify the small slowdown, and I kept Muon.
Why did the untrained model want to repeat the last token?
Pinwheel shares one vocabulary table between input and output. When a token comes in, the model looks up its row of numbers. To predict the next token, it compares the final representation with every row in that same table.
I tried setting the two output matrices in each block to zero at initialization. Each block then starts by passing its input straight through. At the end of the stack, the model still holds the vector for the token it just read. That vector gets a high score against its own row in the output table. Before training had even started, the model was already inclined to predict the previous token again. Its initial loss was 12.77, worse than the 9.01 I would expect from uniform guesses. Reducing the initial scale of the vocabulary weights by a factor of ten brought that tendency under control.
I also tried QK-Norm. Attention works by comparing what one position is looking for with what the other positions contain. QK-Norm adjusts the scale of the vectors involved, which keeps the matching scores from growing too large. At my usual learning rate, adding QK-Norm on its own improved BPB by just 0.0035 in a 300M-token run. Adding it to Muon along with the two initialization changes gave me 1.0619 BPB on average over two runs of one billion tokens each. A third run brought the three-run mean to 1.0624. This became v1.
One final change was cheap enough to test on a single run. I averaged weights saved during the cooldown to see if it would smooth out the last few updates. The final weights scored 1.0636, the simple average scored 1.0669, and two averages that gave more weight to recent updates also fell short. With the learning rate already down to zero, I kept the final weights. Muon implementation · Experiment tree