Papers · Scaling laws · 2020

Scaling Laws for Neural Language Models

Jared Kaplan, Sam McCandlish, Tom Henighan and others

The notation of the Scaling laws paper, explained: its 50 displayed equations, then every symbol it uses, grouped by category and shown the way the paper writes it.

Read the paper on arXiv

Read from arXiv's HTML version: 50 displayed equations and 207 pieces of inline math. 26 symbols and constructs from the catalog.

The paper's displayed equations

Open any of them in the decoder for a symbol-by-symbol reading.

  1. (1.1)
    L(N)=(Nc/N)αN;  αN∼0.076,Nc∼8.8×1013 (non-embedding parameters)L(N)=\left(N_{\mathrm{c}}/N\right)^{\alpha_{N}};\ \ \alpha_{N}\sim 0.076,\quad N_{\mathrm{c}}\sim 8.8\times 10^{13}\ \text{(non-embedding parameters)}
    Decode →
  2. (1.2)
    L(D)=(Dc/D)αD;  αD∼0.095,Dc∼5.4×1013 (tokens)L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\ \ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\ \text{(tokens)}
    Decode →
  3. (1.3)
    L(Cmin)=(Ccmin/Cmin)αCmin;  αCmin∼0.050,Ccmin∼3.1×108 (PF-days)L(C_{\rm min})=\left(C_{\mathrm{c}}^{\rm min}/C_{\rm min}\right)^{\alpha_{C}^{\rm min}};\ \ \alpha_{C}^{\rm min}\sim 0.050,\quad C_{\mathrm{c}}^{\rm min}\sim 3.1\times 10^{8}\ \text{(PF-days)}
    Decode →
  4. (1.4)
    Bcrit(L)=B∗L1/αB,B∗∼2⋅108 tokens,  αB∼0.21B_{\rm crit}\left(L\right)=\frac{B_{\ast}}{L^{1/\alpha_{B}}},\qquad B_{\ast}\sim 2\cdot 10^{8}\text{ tokens},\ \ \alpha_{B}\sim 0.21
    Decode →
  5. (1.5)
    L(N,D)=[(NcN)αNαD+DcD]αDL(N,D)=\left[\left(\frac{N_{c}}{N}\right)^{\frac{\alpha_{N}}{\alpha_{D}}}+\frac{D_{c}}{D}\right]^{\alpha_{D}}
    Decode →
  6. (1.6)
    L(N,S)=(NcN)αN+(ScSmin(S))αSL(N,S)=\left(\frac{N_{c}}{N}\right)^{\alpha_{N}}+\left(\frac{S_{c}}{S_{\rm min}(S)}\right)^{\alpha_{S}}
    Decode →
  7. (1.7)
    N∝CαCmin/αN,B∝CαCmin/αB,S∝CαCmin/αS,D=B⋅SN\propto C^{\alpha_{C}^{\rm min}/\alpha_{N}},\quad B\propto C^{\alpha_{C}^{\rm min}/\alpha_{B}},\quad S\propto C^{\alpha_{C}^{\rm min}/\alpha_{S}},\quad D=B\cdot S\quad
    Decode →
  8. (1.8)
    αCmin=1/(1/αS+1/αB+1/αN)\alpha_{C}^{\rm min}=1/\left(1/\alpha_{S}+1/\alpha_{B}+1/\alpha_{N}\right)
    Decode →
  9. (2.1)
    N≈2dmodelnlayer(2dattn+dff)=12nlayerdmodel2 with the standard dattn=dff/4=dmodel\begin{gathered}N \approx 2d_{{\rm model}}n_{{\rm layer}}\left(2d_{{\rm attn}}+d_{{\rm ff}}\right) \\ =12n_{\rm layer}d_{{\rm model}}^{2}\quad\text{ with the standard }\quad d_{\rm attn}=d_{\rm ff}/4=d_{{\rm model}}\end{gathered}
    Decode →
  10. (2.2)
    Cforward≈2N+2nlayernctxdmodelC_{\rm forward}\approx 2N+2n_{{\rm layer}}n_{{\rm ctx}}d_{{\rm model}}
    Decode →
  11. (3.1)
    L(N)≈(NcN)αNL(N)\approx\left(\frac{N_{c}}{N}\right)^{\alpha_{N}}
    Decode →
  12. (3.2)
    L(D)≈(DcD)αDL(D)\approx\left(\frac{D_{c}}{D}\right)^{\alpha_{D}}
    Decode →

Symbols, by category

Most used first. The examples are written as the paper writes them.

Notation conventions

  1. LL, NN, DD

    Italic letters (variables) 934 uses

    A plain italic letter is a variable; conventions say what kind (x input, y target, W weights…).

  2. NcN_{\mathrm{c}}, αN\alpha_{N}, DcD_{\mathrm{c}}

    Subscript (index or label) 504 uses

    A subscript picks an element (xᵢ), a time step (h_t), a named copy (W_q), or the parameters (p_θ).

  3. (Nc/N)αN\left(N_{\mathrm{c}}/N\right)^{\alpha_{N}}, 0130^{13}, (Dc/D)αD\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}}

    Superscript (power or label) 151 uses

    Usually a power (x² = x·x), but a capital or a word up there is often just a label (W^Q).

  4. ∗\ast, ∗*, C∗C^{*}

    Star (optimal) 23 uses

    As a superscript, the optimal value: θ* is the best θ. Between two terms, convolution.

  5. B~\tilde{B}

    Tilde accent 2 uses

    A modified version of the variable: noisy, corrupted, proposed or intermediate.

  6. LR\mathrm{LR}

    Multi-letter names 1 use

    A run of italic letters like pos or model is usually one name, not a product of single letters.

Greek letters

  1. α\alpha

    Alpha 137 uses

    Often a learning rate or step size; also attention weights αᵢⱼ or a mixing weight.

  2. δ\delta

    Delta (lowercase) 3 uses

    A small change, or the error signal δ = ∂L/∂z in backpropagation.

  3. β\beta

    Beta 1 use

    Usually a decay rate (Adam’s β₁, β₂), a shift parameter in normalization, or a weight on a loss term.

Vectors and matrices

  1. ×\times

    Times (cross) 25 uses

    Usually the “by” in a shape (n × d); also plain multiplication or a cross product.

  2. ⋅\cdot

    Centre dot 9 uses

    A dot product between vectors, plain multiplication between numbers, or an empty slot f(·).

Calculus and gradients

  1. ∞\infty

    Infinity 19 uses

    Infinity; as a norm subscript, ‖x‖_∞ is the largest absolute entry.

  2. f′f^{\prime}

    Prime 8 uses

    Either a derivative, f′(x), or simply "another one": x′ is a second sample, s′ the next state.

  3. ∂L∂N\frac{\partial L}{\partial N}, ∂\partial

    Partial derivative 3 uses

    A partial derivative: how one quantity changes when one input changes and the others are held fixed.

Probability and statistics

  1. ∝\propto

    Proportional to 21 uses

    Equal up to a constant factor that does not depend on the variable of interest.

  2. pp

    Probability p(x) 18 uses

    A probability or probability density; p is usually the true or model distribution, q an approximation.

  3. ∼\sim

    Distributed as (tilde) 14 uses

    “Is drawn from” or “is distributed as”: x ~ p means x is a sample from the distribution p.

  4. ;;

    Semicolon (parameterized by) 3 uses

    In p(x; θ), the semicolon separates the variable x from fixed parameters θ.

  5. ∣|

    Given (conditional bar) 3 uses

    “Given”: p(y | x) is the probability of y given that x is known.

  6. log⁡\log

    Logarithm 1 use

    A logarithm, almost always the natural log (base e) in ML papers.

Functions and operators

  1. B∗L1/αB\frac{B_{\ast}}{L^{1/\alpha_{B}}}, NcN\frac{N_{c}}{N}, αNαD\frac{\alpha_{N}}{\alpha_{D}}

    Fraction 82 uses

    Division: the top divided by the bottom.

  2. minmin

    Max and min 19 uses

    The largest (or smallest) value, over the arguments or over the range in the subscript.

  3.   ⟹  \implies, →\to

    Arrow (maps to) 5 uses

    Maps to (f: X → Y), tends to (x → 0), or implies (⇒).

Sets, shapes and definitions

  1. ≈\approx

    Approximately equal 27 uses

    Approximately equal: often a Monte Carlo estimate or a Taylor approximation.

  2. ≫\gg, ≪\ll, >>

    Inequalities 14 uses

    Less than / greater than (or equal). ≪ means “much smaller than”.

  3. ≡\equiv

    Identically equal 6 uses

    Identically equal (for every input), or “defined as”, depending on the author.

5 things the catalog has no entry for yet
  • \rm \rm 287
  • ≳\gtrsim \gtrsim 3
  • PF\mathrm{PF} PF 2
  • Day\mathrm{Day} Day 1
  • Days\mathrm{Days} Days 1

Formulas from arXiv's HTML version of the paper, © their authors; the explanations are this site's. Title and authors as arXiv lists them.

More scaling laws papers