6.1.1 · HinglishScaling & Efficient Architectures

Neural scaling laws (Chinchilla, compute-optimal)

1,831 words8 min readRead in English

6.1.1 · AI-ML › Scaling & Efficient Architectures


Scaling laws exist kyun karte hain?

Empirical finding: loss ek power law plus ek irreducible floor follow karta hai.

  • = data ki entropy / Bayes error jo tum kabhi nahi beat kar sakte.
  • = error bahut kam parameters se (model function ko represent nahi kar sakta).
  • = error bahut kam data se (model jo represent kar sakta hai usse estimate nahi kar sakta).
  • Chinchilla fit: , (close hain, lekin equal nahi → optimum pe data ka role thoda zyada strong hai).

Compute-optimal split derive kaise karein (scratch se)

Goal: minimize karo budget fix rakhte hue.

Step 1 — Irreducible floor drop karo. constant hai, toh yeh affect nahi karta ki minimum kahan hai. minimize karo. Kyun yeh step? Constants optima move nahi karte; hum sirf trade-off terms ki parwah karte hain.

Step 2 — Constraint substitute karo. se, likho:

Kyun? Ab ek hi free variable hai — pure single-variable calculus.

Step 3 — Differentiate karo, zero pe set karo.

Kyun? pe unimodal hai — pehla term strictly decrease karta hai aur doosra strictly increase karta hai, isliye dono ka sum exactly ek interior minimum pe hoga jahan slope zero cross karta hai. (Globally convex hona zaroori nahi, lekin unimodality kaafi hai stationary point ko minimum guarantee karne ke liye.)

Step 4 — vs ke liye solve karo. Rearrange karne pe (VERIFY dekho):

Kyun? Kyunki hai, aur ke exponents ka sum 1 hona chahiye (inhe multiply karo toh milta hai).

Figure — Neural scaling laws (Chinchilla, compute-optimal)

WORKED EXAMPLES


COMMON MISTAKES (Steel-manned)


Flashcards

Chinchilla loss functional form kya hai?
: irreducible floor plus do power-law terms finite params aur finite data ke liye.
Dense transformer train karne ke approximate FLOPs?
(2 multiply-add ke liye × 3 fwd+bwd ke liye).
Compute ke saath ka compute-optimal scaling?
.
Compute ke saath ka compute-optimal scaling?
(data thoda tez badhta hai).
Parameter ke per tokens ke liye Chinchilla rule of thumb?
Lagbhag 20 tokens per parameter ().
Agar compute badhta hai, toh usse kaise split karte ho?
Roughly double karo aur double karo (, ).
Gopher Chinchilla ke mukable suboptimal kyun tha?
Gopher bahut bada aur data-starved tha (); comparable compute pe Chinchilla ne ~20 tokens/param pe rebalance kiya 4× chhote model ke saath aur jeeta.
Term kya represent karta hai?
Irreducible loss — data entropy / Bayes error jo tum scaling se kabhi nahi beat kar sakte.
Loss power law kyun follow karta hai (exponential kyun nahi)?
Diminishing returns: ya ki har doubling kam help karti hai; yeh constant multiplicative decay exactly ek power law hai.
ke against aur ke exponents 1 kyun sum karte hain?
Kyunki hai; aur force karte hain .
Kya compute-optimal exponents exactly 0.5 each hain?
Nahi — sirf tab agar ho. Fitted values dete hain ke liye ≈0.45 aur ke liye ≈0.55; 0.5 ek rounded shortcut hai.

Recall Feynman: ek 12-saal ke bachche ko samjhao

Socho tum exam ke liye padh rahe ho. Tum ya toh bada brain grow kar sakte ho (zyada parameters) ya zyada books padh sakte ho (zyada data). Tumhare paas sirf itne hi ghante hain (compute). Agar bahut bada brain ho aur sirf ek book padho, tum ek genius ho jiske paas sochne ke liye kuch nahi — wasteful. Agar ek library padho lekin brain bahut chhota ho, tum zyaatar bhool jaate ho. Chinchilla ne sweet spot dhundha: brain aur reading dono ko almost same speed pe badhao (reading thodi si tez), lagbhag brain ke har bit ke liye 20 pages reading. Jab bhi zyada ghante milein, brain ko roughly double karo aur roughly double padhna bhi karo.

Connections

  • Transformer architecture cost model dense attention/MLP FLOPs assume karta hai.
  • Compute budgets & FLOPs kahan se aata hai.
  • Kaplan scaling laws — purane laws jo ko over-weight karte the; Chinchilla ne data term correct ki.
  • Overfitting vs underfitting vs trade-off capacity vs estimation error hai.
  • Mixture-of-Experts — simple assumption break karta hai (sparse activation).
  • Learning rate schedules — token budget ke saath match karna chahiye taaki law hold kare.

Concept Map

fixed as

splits into

splits into

reduces

reduces

bounded by

shows

implies

minimize under C

yields

yields

explained by

grow N and D together

grow N and D together

Compute budget C

C = 6 N D

N params

D tokens

Loss power law L N D

Irreducible floor E

Diminishing returns

Compute-optimal split

N proportional to C^beta over alpha+beta

D proportional to C^alpha over alpha+beta

Chinchilla finding