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:
- Many models were undertrained (GPT-3 at 175B/300B tokens)
- Smaller well-trained models can match larger undertrained ones
- 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.
Related questions
- Explain the difference between LoRA, full fine-tuning, and prompt tuning. When would you use each?
- How do you evaluate LLMs? What benchmarks and metrics matter?
- What is the difference between encoder-only, decoder-only, and encoder-decoder transformers?
- Explain the tokenization strategies used in LLMs: BPE, WordPiece, and SentencePiece.
- Explain the self-attention mechanism in detail. What are Q, K, V and why do we use scaled dot-product attention?