Mixed precision runs most operations in 16 bit (fp16 or bf16) while keeping a master copy of the weights and certain reductions in fp32. That roughly halves memory and uses tensor cores, so it is substantially faster. The risk with fp16 is underflow: small gradients round to zero, which is why loss scaling exists. bf16 keeps fp32's exponent range, so it largely avoids that.
Why interviewers ask this
Almost every serious training run uses it, so interviewers expect more than the name. The valuable part is knowing why fp16 needs loss scaling and why bf16 does not, which requires understanding the difference between range and precision in floating point. Mentioning that you keep master weights and softmax or norm reductions in fp32 shows you know where the numerics actually break.
How to structure your answer
- Say what runs in low precision and what stays in fp32.
- State the memory and speed benefit concretely.
- Explain fp16 underflow and dynamic loss scaling.
- Contrast bf16 range against fp16 precision and give your default.
Example answer
You keep a master copy of the weights in fp32 but run the forward and backward passes in 16 bit, so activations and gradients are half the size and the matmuls hit tensor cores. In practice that is roughly half the memory and often close to double the throughput, which can be the difference between a run fitting on your hardware and not. The classic failure is fp16 underflow. fp16 has only five exponent bits, so very small gradients flush to zero, and small gradients are exactly the ones that matter late in training. That is what dynamic loss scaling fixes: multiply the loss by a large factor before backward so gradients land in representable range, unscale before the optimizer step, and back the factor off when you see infinities. bf16 keeps eight exponent bits, the same range as fp32, and pays for it with fewer mantissa bits, so it underflows far less and generally needs no loss scaling at all. My default now is bf16 on anything Ampere or newer. And I keep reductions like softmax, layer norm, and the loss itself in fp32, because summing thousands of terms in 16 bit loses accuracy fast.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- Why does bf16 trade mantissa bits for exponent bits, and when does that hurt?
- What symptoms would tell you loss scaling is misconfigured?
- Does mixed precision change your choice of learning rate?
Related machine learning engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions