Junior interview questionAsked at Netflix · interview write-up
When would you use mean squared error versus cross-entropy? And what is LoRA?
Model answer
MSE for regression, cross-entropy for classification. Cross-entropy is the negative log-likelihood of the right class; with softmax its gradient is just predicted minus true, so confident mistakes get big updates, while MSE on probabilities gives them small ones.
LoRA freezes the weights and trains a small low-rank update, so fine-tuning is far cheaper.
Practise the rest
35 Training questions, 492 in all, each with a model answer. Free.
More from Netflix interview questions.
More Training interview questions
- Implement masked cross-entropy in NumPy that stays numerically stable, with label smoothing and a temperature.
- Build a pipeline that finds math documents in web crawls and scores their quality.
- Explain KL divergence for language models: which direction is which, what happens when supports don't match, and how it's used as a regulariser.
- Explain Adam and its bias correction, and why AdamW decouples weight decay.
- Explain policy types in RL and modern policy-gradient methods such as TRPO, PPO and GAE, then compare linear attention and grouped-query attention.
- Predict whether an ad impression is clicked within 24 hours at a 0.7% positive rate, with high-cardinality IDs and delayed labels: how do you build and assess the model?