Jump to content

Language model loss: Difference between revisions

From Wikibase
No edit summary
 
Line 42: Line 42:


See [[perplexity (LLM)]].
See [[perplexity (LLM)]].
== Loss and training compute budget ==
It is empirically determined
$$
L(C) \propto C^{-\alpha},
\qquad \alpha \approx 0.05.
$$
where $C$ is the [[training compute budget]].
As a consequence, halving the loss requires roughly $10^{6}$ times more compute.
<ref>{{#cite:Q3141}}</ref>

Latest revision as of 08:36, 12 November 2026

The language model loss measures how "surprised" a large language model (LLM) is by the true values of tokens it attempts to predict.

Formal definition

With model parameters $\theta$, the language model loss on training sample $\vec x=(x_1,\cdots,x_T)$:

$$ L(\theta) = -\frac{1}{T}\sum_{t=1}^{T}\log_b P_\theta(x_t \mid x_{1:t-1}) $$

$\vec x=(x_1,\cdots,x_T)$ is a text token sequence of length $T$ (e.g., ('I','am','myself','.')).

Unit

The unit of the language model loss is determined by $b$.

$b$ Unit
2 Bit
e Nat
10 Hartley

Training reports conventionally quote $L_{\text{nat}}$.

Perplexity

See perplexity (LLM).

Loss and training compute budget

It is empirically determined

$$ L(C) \propto C^{-\alpha}, \qquad \alpha \approx 0.05. $$ where $C$ is the training compute budget.

As a consequence, halving the loss requires roughly $10^{6}$ times more compute.

[1]