Conclusion

Numerical stability is part of model behavior.

You have seen the main deep-learning failure modes and fixes:

  • dtype choice affects range, precision, memory, and speed
  • FP16 and BF16 are useful but require care
  • overflow and underflow come from values outside representable ranges
  • log-sum-exp and stable softmax avoid dangerous exponentials
  • epsilons guard small denominators
  • NaN and infinity are alarms
  • mixed precision trades memory and speed against stability

The next chapter introduces a framework only after these moves are visible. At that point, framework code should feel like compression of known ideas: tensors, gradients, modules, losses, optimizers, and data loading.