OpenAI·Machine Learning Engineer·Technical Phone Screen
- You're given a broken PyTorch transformer training pipeline (encoder-decoder with multi-head attention, AdamW, AMP, gradient accumulation, cosine LR with warmup, teacher forcing) that shows training loss diverging, validation accuracy stuck near chance, intermittent AMP crashes, and nondeterministic results across runs. Identify at least four root-cause bugs, explain the failure mode for each, show a minimal fix, and write a test or assertion that would catch each one. Then lay out a systematic debugging plan covering data preprocessing, masking, positional encodings, loss computation, optimizer state, AMP/GradScaler, seed control, and DDP config. Finally, describe your sanity checks, which metrics you'd monitor, and a small experiment to verify each fix.
“This was a lot.”