Skip to content
nonconvexcard

Fit a scaling law and derive the compute-optimal allocation

CodingAdvanced⏱ 3 hoursDL Theoryscaling lawsfittingcompute optimalextrapolation

Problem

Given synthetic loss data of the form L(N,D)=E+AN−α+BD−β\mathcal L(N,D) = E + AN^{-\alpha}+BD^{-\beta} with noise, fit the five parameters and derive the compute-optimal allocation.

  1. Fit by nonlinear least squares in log space and report parameter uncertainties.
  2. Derive N⋆(C)N^\star(C) and D⋆(C)D^\star(C) from the fit.
  3. Show how sensitive the allocation exponents are to the fitted α,β\alpha,\beta.
  4. Demonstrate the extrapolation risk by fitting on a restricted range and predicting outside it.

Implement it, then check the implementation against something you can verify independently.

Write it

Solve it here10 tests · Python runs in your browser
⌘/Ctrl + ↵ to run · limit 120s · draft saved in this browser
10 tests will run against your code. The first run downloads the Python runtime — several megabytes, once per browser.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Derive the compute-optimal allocationLLMsProofIntermediate30 min
Implicit bias of gradient descent on underdetermined least squaresDL TheoryProofIntermediate30 min
The irreducible loss is the conditional entropyLLMsProofIntermediate30 min
What fitting random labels rules outDL TheoryProofIntermediate30 min
Rotary embeddings encode relative position exactlyDeep LearningProofAdvanced30 min