Interview prep for AI research engineers

87 questions from AI lab interviews, with worked answers and short video explanations.

Asked at

You switch training to fp16 and the gradients round to zero

Training stabilityMedium

You move a training run from fp32 to fp16 to halve activation memory and use tensor cores; the forward pass looks fine, but the loss eventually diverges. Many backward-pass activation gradients are below about , the smallest positive fp16 value, so they round to zero.

What would you change so those gradients survive in fp16?

  1. AKeep an fp32 master copy of the weights and apply each update to it.
  2. BRaise the learning rate so that every weight update comes out bigger.
  3. CMultiply the loss by a big constant, then divide the gradients by it.
  4. DLower the learning rate and stretch the warmup out over more steps.

Formats

  1. Multiple choice

    Four options, one best, and why each of the other three fails.

  2. Short answer

    The interviewer's follow-up, checked against a model answer and its key points.

  3. Video

    The setup and each option, shown in 3D.

Where the questions come from

Our academic partnerships, people in our network who've interviewed at AI labs, university courses and their exams, industry partners, and interview reports on Glassdoor and Reddit. We rewrite each question so it stands on its own, with a worked answer.

Free questions

All 87 questions

Resources

Courses, textbooks and guides, from Karpathy's Zero to Hero to Stanford CS336 and DeepMind's scaling book.

See all 31

Pro

$15 / month

or $120 a year ($10 a month)

Every question, answer and video. New questions weekly.

See plans