The Model-Debug & ML Gate
The model is four hundred lines of PyTorch. It imports cleanly, the forward pass runs, the training loop spins, and the loss prints every step. The loss just does not go down, sitting flat at the value you would get from random guessing or climbing to NaN and staying there. You have forty-five minutes, the screen is shared, and somewhere in those four hundred lines is a planted bug doing nothing dramatic enough to throw an exception. Find it. This is the round Research Engineer candidates remember, and the one they most often lose.
The bugs are stupid, not hard, and that trips people who over-prepared. Nobody planted a subtle numerical-stability landmine in the attention denominator. They planted a mask filled with zeros instead of negative infinity, a missing call to loss.backward(), a softmax applied twice. The skill being tested is "can you sit in front of a broken training run, form a hypothesis about why the loss is flat, and check it without rereading the whole file." You are a debugger of a real run that diverged, which is most of what the job turns out to be.
log(num_classes) means the model is outputting near-uniform predictions and never updating, which points at the optimizer path, no backward(), no zero_grad(), a detached tensor, a frozen requires_grad. A loss that was learning and then exploded to NaN points at scale, a learning rate too high, a missing mask letting attention attend to the future, a division that hit zero.- 4 sections
- about 17 min
Premium lessonOpenAI interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
OpenAI interview guideKnow what OpenAI asks before you walk in.
11 coding · 6 system design · 19 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.