Debug a broken GPT training notebook containing NaNs, a mask bug, and shifted labels

Research Engineering & Debugging5 / 8

Chapter 255 / 8

Research Engineering & Debugging

Debug a broken GPT training notebook containing NaNs, a mask bug, and shifted labels

Hard
Target interface
training_step(model, input_ids, attn_mask_bias)

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.