Explain Mixed Precision Training With FP16, BF16, and Loss Scaling

Last updated: November 29, 2026

Quick Overview

Explain how mixed precision training works, why fp16 needs loss scaling while bf16 usually does not, and which operations should stay in fp32.

Meta
Machine Learning
Machine Learning Engineer
Meta
November 29, 2026
Machine Learning Engineer
Phone Screen
Machine Learning
Medium

0

0

0 solved


Explain how mixed precision training works, why fp16 needs loss scaling while bf16 usually does not, and which operations should stay in fp32.

Almost every model trained at Meta uses mixed precision to cut memory and use tensor cores. The interviewer checks number format knowledge (exponent versus mantissa bits) and practical rules that keep training stable.

What the Interviewer Expects
  • Compare fp32, fp16, and bf16 exponent and mantissa bits
  • Explain why small gradients underflow in fp16
  • Describe dynamic loss scaling step by step
  • Explain fp32 master weights and why small updates vanish in low precision
  • List operations kept in fp32
Key Topics to Cover
mixed precision
bf16
fp16
loss scaling
numerical precision
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • What happens to the loss scale when an overflow occurs?
  • Why might fp8 training need per-tensor scaling factors?
  • Why can bf16 weights without fp32 master copies stall training late in the run?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Mixed precision means compute-heavy operations (matrix multiplies, convolutions) run in a 16-bit format while precision-sensitive parts stay in fp32. Goals: roughly half the activation memory and much...

Approach

Start from the formats, identify the two failure modes (range and precision), and show the fix for each....


Submit Your Answer
Markdown supported