Super-hard

Implement a mixed-precision loop (bf16 compute, fp32 master weights) with loss scaling on

Optimization & Training Dynamics · Problem 5 of 5

Chapter 05Optimization & Training Dynamics

Implement a mixed-precision loop (bf16 compute, fp32 master weights) with loss scaling on

Super-hardProblem 5 / 5

Implement a mixed-precision loop (bf16 compute, fp32 master weights) with loss scaling on a toy MLP, including a deliberate overflow and recovery.

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

Hints