Skip to content

07 · E · Signal

Loss, entropy, and scaling

Cross-entropy is maximum likelihood. It decomposes into entropy plus KL. The floor is E, not zero.

Cross-entropy is maximum likelihood

The autoregressive model is a probability distribution over sequences. Maximizing the likelihood of the training documents is exactly minimizing next-token cross-entropy.

(7.0)

Why it mattersThere is no extra objective hiding behind the loss. Pretraining is MLE of the next-token categorical. Every later capability is a side effect of making that likelihood large.

Token-level cross-entropy

PyTorch CrossEntropyLoss on logits is exactly this, in nats.

(7.1)
NLL of the true next token, in nats
(7.2)
positions that are not padding / not masked

Why it mattersThis scalar is the only training signal in pretraining. Backprop exists solely to make L smaller.

Entropy plus KL

If is the true next-token distribution of the data, the expected loss splits into two terms (Cover and Thomas). Training can only shrink the second.

(7.3)
entropy of language: irreducible uncertainty
extra loss from the model being wrong

for open language, so is not achievable on a general corpus. Fitted irreducible floors on web-scale English tokenizers are often around nats/token.

Perplexity and bits-per-byte

(7.4)

Loss 2.0 nats/token is perplexity . Loss 1.69 is about 5.4. Read it as: “as uncertain as choosing among about 5–7 equally likely tokens,” on average.

Loss is not comparable across tokenizers. Bits-per-byte is the fairer comparison. If a document of bytes is tokenized into tokens:

(7.4b)
loss in bits per token
tokens per byte for this tokenizer and document

Classic estimates of English entropy are roughly 0.6–1.3 bits per character (Shannon, 1951); frontier models are often cited around ~0.7 bits per character on diverse English — already near those old bounds on many corpora.

Scaling-law shape

This is a forecast of pretraining loss, not a training step. DeepMind’s Chinchilla fit (Hoffmann et al., 2022):

(7.5)
parameter count
training tokens
estimated irreducible loss
penalty for finite model size
penalty for finite data

Their original fit put , , , , . A later replication (Besiroglu, Erdil, Barnett, 2024) put closer to and a larger data coefficient. Those numbers are estimates for a data mix and a tokenizer, not a universal constant.

Training compute is, to a standard approximation (Kaplan et al., 2020),

(7.6)
≈ 2 FLOPs/param/token for the forward pass, 4 for the backward

Minimize (7.5) along the budget line . The compute-optimal allocation is

(7.7)
≈ 0.46 on the printed Chinchilla fit
≈ 0.54
(\alpha A / \beta B)^{1/(\alpha+\beta)}

Why it mattersThe IsoFLOP experiments, which do not depend on the parametric constants, said something simpler: scale N and D equally, about twenty tokens per parameter. Chinchilla-70B was trained that way (70B × 1.4T). Kaplan had recommended many fewer tokens; that is the disagreement the floor does not care about.

StageLoss (nats)Meaning
Random initializationln V ≈ 10.8–11.8Uniform over 50k–128k tokens
Early training~4–6Crude word and syntax statistics
Small modern pretrain~2.0–2.5Competent next-token model
Strong large pretrain~1.7–2.1Near fitted irreducible floors
Narrow SFT, regular data~0.2–0.8The task is less uncertain than web text
Overfit a tiny set→ 0Memorization, not general language