MLCrack

    LLMS & TRANSFORMERS · INTERVIEW QUESTION

    What is the scaling laws relationship between model size, data, and compute?

    🔴 advanced · Pre-training & Fine-tuning

    Hint: Think about the Chinchilla optimal ratio and power-law relationships.

    Answer

    Kaplan et al. (2020) showed loss follows power laws: L ∝ N^{-α_N}, L ∝ D^{-α_D}, L ∝ C^{-α_C} where N=parameters, D=data tokens, C=compute. The Chinchilla insight (Hoffmann et al., 2022): their compute-optimal training experiments suggest roughly 20 tokens per parameter. In that setting, 70B parameters corresponds to about 1.4T training tokens. This is not a universal prescription: inference cost, data quality, architecture and deployment volume can favor training smaller models on more tokens. Implications:

    1. Many models were undertrained (GPT-3 at 175B/300B tokens)
    2. Smaller well-trained models can match larger undertrained ones
    3. Data quality matters enormously at scale.

    Recent work shows data quality can shift the scaling curves favorably — high-quality data is more important than raw quantity.